Therapy Planning as Constraint Satisfaction: A Computer-Based .... For example, in ART Critic, a fix- ... a domain concept, into fix-constraints, a method concept.
Therapy Planning as Constraint Satisfaction: A Computer-Based Antiretroviral Therapy Advisor for the Management of fHV D. Scott Smith, M.D.,t John Y. Park,* and Mark A. Musen, M.D., Ph.D.*
tDivision of Infectious Diseases and Geographic Medicine, and *Stanford Medical Informatics, Department of Medicine, Stanford University School of Medicine, Stanford, CA We applied the Protegi methodology for building knowledge-based systems to the domain of antiretroviral therapy. We modeled the task of prescribing drug therapy for HIV, abstracting the essential characteristics of the problem solving. We mapped our model of the antiretroviral-therapy domain to the class of constraint-satisfaction problems, and reused the propose-and-revise problem-solving method, from the Protfg6 library of methods, to build an antiretroviral therapy advisor, ART Critic. Careful modeling and using Protig,6 allowed us to build a useful and extensible knowledge-based application rapidly. BENEFITS OF FORMAL MODELING Therapy planning is a common, complex task in medicine. On cursory examination, the task appears to be composed of common elements across the various medical specialties: A clinician takes as inputs various observed parameters of the patient's status, and applies her medical knowledge to formulate an optimal therapy. However, when we examine the different specialties in more detail, we see many differences, both in decision-making concepts, and in processing. In some medical specialties, observable inputs translate directly to therapies; in other specialties, significant processing is required to infer patients' internal states; particular states may then suggest various therapies in specific ways. Even when clinical domains use similar data, further analysis demonstrates differences in the underlying reasoning processes. In this paper, we take a formal approach to modeling the planning task for antiretroviral therapy. We follow a prescribed series of steps, to abstract the general form and properties of the task. Because of the diversity of therapy-planning tasks across domains, we must ask what we can gain by modeling this process explicitly, instead of building a simple rule-based system based on straightforward, unstructured transcriptions of rules elicited from a domain expert. We offer two strong rationales for careful modeling: First, we believe that the resulting systems will be more understandable, robust, and maintainable, and will give higher quality answers than unstructured systems. Second, modeling allows us to recognize commonalities across tasks that enable us to reuse reasoning components, not just
1091-8280/98/$5.00 © 1998 AMIA, Inc.
across medical specialties, but also across divergent domains, saving development effort. GOALS OF HIV TREATMENT To optimize antiretroviral therapy, a clinician must answer questions about a particular patient and then must weigh options. Starting with a simple scenario, for a patient who has never had therapy, the clinician asks, "What is the best regimen, given this patient's needs?" She collects baseline information, including relevant history of certain disease states (history of pancreatitis, hepatitis, renal insufficiency) and current clinical symptoms and physical exam findings that may affect specific therapy choices (such as baseline neuropathy). Finally, laboratory parameters (e.g., CD4 count, HIV viral RNA load, and complete blood count) are obtained. If the patient has, for example, baseline peripheral neuropathy or moderate neutropenia, specific drugs will be eliminated from consideration, thus excluding several combination therapies. There are two primary reasons to adjust therapy: to accommodate toxicities associated with a specific drug, and to modify a regimen when loss of activity of drugs, or HIV resistance occurs. Viral resistance is evaluated indirectly with CD4 counts and HIV RNA viral-load measurements. The strategies for modifying therapy for toxicity or loss of activity are different. A computer-based model for management of patients with drug-resistant mutations has been described.' MODELING OF ART CRITIC: AN ANTIRETROVIRAL THERAPY ADVISOR ART Critic uses an automated strategy to optimize therapy recommendations for patients with HIV. One of the key elements of our design was to create ART Critic's underlying model. Antiretroviral therapy planning is based on numerous empirically derived facts, and heuristic decision criteria; it lacks strong, first-principle theories that we could encode as simple mathematical or algorithmic formulations. A principled knowledge-based approach allowed us to encode the expertise of the domain practitioner directly. We used Protege,2 a shell for designing and building structured, knowledge-based systems. Protdge and Component-Based Reuse Protege makes a strong distinction between declarative, domain-specific knowledge, and domainneutral, problem-oriented procedural knowledge-
627
been formulated and analyzed by the knowledgeengineering community. We found that the elements of the antiretroviral therapy task closely mirror elements of a class known as constraint satisfaction problems. A constraint-satisfaction problem involves modeling the world as a set of object and state variables that must have values assigned to them. The constraints take the form of restrictions and relationships among the variables that define a valid solution. The task is to assign values to all of the required variables such that all the constraints are satisfied simultaneously. For some problems, the desired solution is the set of all valid ranges for the variables' values. For other problems, a set of single-valued assignments is sufficient; the solution depends on the domain-specific task instance. Previous Protege remodeling experiments involving constraint-satisfaction problems covered a wide range of domains.456 One of our applications was the task of predicting a ribosome conformation.4 We modeled the domain as a set of molecular objects in 3-dimensional space, and empirical data and chemical properties were used to formulate upper and lower distance constraints on the spatial relationships between these objects. Building the Prot6ge model of antiretroviral therapy as a constraint-satisfaction task began with formulation of descriptions of domain entities and concepts. Our knowledge sources included domain experts, journal articles, textbooks and websites. We modeled a set of 11 antiretroviral drugs, and added the concept of a therapy class to model multi-drug therapy, with slots for the component drugs, as well as slots for description of potential associated adverse effects. Other slots pointed to documented research on the particular combination therapy. Classes modeled the patient's observed physiological status variables and higher-level concepts such as toxicity events. A set of patient-parameter class instances tracked relevant inferred parameters, such as internal physiological state, and optimal future therapy adjustments (see Figure 1).
the problem-solving methods.3 Prominent design features of Prot6ge include the extensive use of formal ontologiest to organize knowledge; the automated construction of domain-specific knowledgeacquisition tools based on these ontologies; a library of general, reusable problem-solving methods; and a way to connect methods to domain ontologies. Protege's goals are ease of domain-specific knowledge acquisition and maintenance, and reusability of knowledge-based artifacts. Protege prescribes a multistep methodology for building complete knowledge-based applications. The steps in modeling and constructing a system are (1) define a domain ontology that describes the classes of concepts in the domain of interest; (2) select a problem-solving method that provides a computational strategy for solving the task to be automated (and whose data requirements are embodied in a method ontology); (3) define mapping relations, which are instances of classes in the mapping ontology, that identify how elements of the domain ontology can satisfy the data requirements of the problem-solving method; (4) generate automatically from the domain ontology a knowledge-acquisition tool, which can be used by the domain expert to populate the domain knowledge base. Antiretroviral Therapy as Constraint Satisfaction Within the context of a Prot6ge knowledgeengineering project, the building of a knowledgebased system starts with exploratory discussions between the domain expert and the knowledge or system engineer. The purpose is to formulate a appropriate model for the decision making task. The topics of analysis include the types of concepts and entities in the domain, their interrelationships, and the classes of rules that the user might want to instantiate. When we analyzed the antiretroviral therapy task, we found critiquing and revising a drug therapy includes checking for problem states (e.g. toxicity events, and loss of activity). This task is performed by reviewing the patient data, formulating candidates for new therapies, checking these candidates for potential problems, and reformulating them until a satisfactory regimen is found. There are often multiple satisfactory alternatives, and these can be ranked by other parameters. The developer then takes this description of the domain task and compares its salient features to the known families of generalized task models that have f Ontologies are hierarchical models of the structure of objects and abstractions in the domain. In Prot6ge, they are used in the explicit declaration of both the informational needs of the software components and the contents of the knowledge bases via formal structures that abstract how information is structured, and what the software does to it.
Figure 1. The antiretroviral therapy domain ontology, enumerating the classes of entities, as well as the slots that contains values describing the entities.
628
The modeling of how to recommend optimal HIV therapy as a constraint-satisfaction problem drove the structuring of the knowledge components in our domain ontology. Constraints took the form of rules involving acceptable and unacceptable combinations of drugs, measurements of and inferences about present side effects, and inferences about predicted future side effects. A therapy-adjustment-rule class described instances of therapies and associated recommended adjustments (new therapies to which to switch) for both toxicity and loss-of-activity conditions. For example, inputting a scenario in which the patient is currently undergoing treatment with the nucleoside reverse transcriptase inhibitor (NRTI) zidovudine (AZT), and suffering from granulocytopenia will cause the system to trigger a toxicity constraint violation, which it fixes by advising a therapy switch to a new combination of the NRTI stavudine (d4T) and the protease inhibitor indinavir. Selection of a Problem-Solving Method The next step in our modeling process is the selection of an appropriate problem-solving method. One candidate method for accomplishing the constraintsatisfaction task is called propose-and-revise.7 This specific problem-solving method has been applied successfully to the ribosome-conformation,4 elevatorconfiguration,5 and ventilator-management tasks. 6 The propose-and-revise problem-solving method models the world as a series of state variables that encode both dependent and independent parameters in the solution space, and a set of assignmentconstraints and fix-constraints that define the relationships among the state variables. Assignmentconstraints are used to encode functional relationships among the state variables: They compute values for dependent variables as a function of other independent and dependent variables, after these others are assigned. Fix-constraints represent relational restrictions among the variables: They define the quantitative and qualitative relationships among the variables that must be valid in any legitimate solution. For example, in ART Critic, a fixconstraint encodes the detection of a toxicity event for the combination therapy "didanosine and indinavir" by testing the state variables "current therapy" and "overall-toxicity", which is itself set by an assign-constraint as a function of various possible specific toxicity symptoms and findings. In propose-and-revise, fix-constraints are further distinguished by being annotated with the set of possible fixes, or reassignments of variables, that are used to resolve a given constraint violation. This heuristic set of proposed fixes is designed by the domain expert to work well for just those constraint violations. Furthermore, the proposed fixes are
ranked by desirability, with more desirable fixes being those determined by the domain expert to be more likely to lead to higher-quality solutions. The main inference engine of the propose-and-revise method uses the user-requested input values, default values, and assignment constraints to assign values to variables sequentially until a solution is reached or a constraint is violated. In the latter case, the method applies the proposed fixes for the constraint in turn, continuing to chain forward to a solution with each attempted fix, and backtracking when a given proposed fix yields no eventual acceptable solution. We selected the propose-and-revise problem-solving method for three main reasons: First, it is appropriate since we have a set of input state variables and constraining rules. We are looking for a loosely ranked set of proposed drug-combination therapies that satisfies all the constraints, and thus is likely to be effective and safe. Second, our domain knowledge base structures the candidate therapy fixes as ranked adjustments based on the occurrence of toxicity and loss of activity. This aligns well with the method's structure of constraint violations with associated, ranked fixes. Third, the implementation of the propose-and-revise method in the Prot6g6 library has been thoroughly tested and refined, a situation that highlights one of the key benefits of component reuse. Mapping and Execution of the Application Task Once the components are all selected, created, or acquired, they must be assembled into a working application. The concept of mapping relations8 is central to Prot6ge. A mapping relation is a declarative description of the transformations necessary for converting objects in the domain knowledge base to properly structured input objects for the problemsolving method. For example, in ART Critic, one mapping relation converts therapy-adjustment-rules, a domain concept, into fix-constraints, a method concept. A mapping interpreter uses the descriptions in the mapping relations to direct the conversion of domain objects to method inputs, allowing the method to execute unmodified. CURRENT STAGE OF DEVELOPMENT We have built a first version of a functional antiretroviral therapy advisor. This working knowledge-based system encodes knowledge from several sources, including textbooks, journal articles, websites and domain experts. ART Critic infers facts, such as toxicity events due to specific therapies or a decline in therapeutic efficacy, and suggests appropriate modifications to the current drug regimen. We generate scenarios with current therapy and findings of toxicity and loss of activity; ART Critic then suggests new therapies based on these inputs.
629
ART Critic elicits data about the current case with a forms-based input screen on the World Wide Web interface. ART Critic then applies the propose-andrevise problem-solving method to infer physiological states and to search heuristically through the solution space. It can output a trace of the reasoning process, including proposals of therapy revisions and constraint-violation triggers as a function of therapy problems. The final output is a ranked set of possible new therapies. ART Critic provides a solid foundation for future generations of systems. DISCUSSION To build ART Critic, we applied two essential principles: (1) We mapped our problem to a more general, well-structured and modeled class of tasks, and (2) we applied a principled design methodology to the mapping and design process. We now discuss in turn the ramifications of applying these two ideas. The knowledge-engineering community has worked hard on formulating tasks into a complete set of general task types. As metioned previously, we noted certain strong congruencies between the description of the antiretroviral therapy advising process as outlined by the domain expert, and a particular generic constraint satisfaction task type. We then clarified the conceptual mappings between elements of antiretroviral therapy and constraint satisfaction. This remapping garnered considerable benefits. Constraint satisfaction has received substantial attention from the engineering community. Many real-world problems can be recast as constraint-satisfaction tasks, for which there are many algorithms. We are able to apply a preexisting algorithm-propose-andrevise-to our problem with little modification. We thus saved engineering work; just as important, both the design and implementation of the solution were already well tested. The application of a principled design methodology, as embodied in the Prot6g6 system, was also critical to the development of ART Critic. Each element of the Prot6g6 methodology helped us to structure our modeling. Creating the domain ontology helped us to formalize the domain concepts in an expressive and succinct form. Using the domain ontology to generate a domain-specific knowledge-acquisition tool helped us collect, organize, verify, and update our knowledge base. The maintenance of knowledge base development is crucial in medicine. The Prot6g6 library of problem-solving methods provided a good candidate algorithm-propose-and-revise. Using mapping relations to make connections between our domain knowledge base and our problem-solving method allowed us to create a complete application for our task without having to modify either our domain ontology or our method. This resulted in ease of development but also reliability of ART Critic.
We compare our design to more traditional, loosely structured approaches to illuminate both the benefits and the possible limitations of our approach. The MYCIN9 system comprised a large knowledge base covering infectious diseases and therapies, encoded in the form of production rules; a generic (i.e. domain-independent) inference engine that chained the rules together to perform inferences; and a body of procedural code. One drawback of MYCIN's design was the absence of structure in the rule base. MYCIN codified individual instances of heuristic rules that were relevant to the problem, but these rules were not organized. Although verification of the individual rules was straightforward, the complex interaction within the rule set made validation and maintenance of the complete system difficult. The original therapy-generation component of MYCIN was not rule based; it was instead encoded procedurally in domain-specific LISP functions, which would be unintelligible to the average clinician. Clanceyl° later added structure to MYCIN by incorporating an algorithmic component that abstracted the complex, heuristic therapy selection into a form of a generate-and-test task. The result was a system that made good decisions and offered retrospective explanations justifying the results, but the inner workings were still nearly impossible to comprehend or modify. We find the much more structured approach of the Protege system to have advantages for our work. Prot6ge allows for procedural entities, written in complex programming languages. However, this procedural knowledge is encapsulated into welldefined problem-solving methods. The method's input requirements are specified in terms of formal method-specific knowledge roles, in the method ontology. In addition, it assumes that the transformations performed by the method are well understood by the modeler. We also use Proteg6 to define domain-specific entities and rules, organized according to a domain ontology. Our initial modeling of the domain task type subsequently guides us in selecting an appropriate problem-solving method from the library; our analysis, plus a set of mapping relations, allows us to match knowledge classes in the domain with knowledge roles in the problem-solving method. The purpose of the work described here was to demonstrate modeling of one decision-making task: We recast antiretroviral therapy as a constraintsatisfaction problem. The propose-and-revise problem-solving method is not universally applicable to therapy planning, however. For example, the chemotherapy-planning task in the oncology domain, as it is automated in the ONCOCIN11 system, has a different underlying task model. In particular, two
630
aspects of ONCOCIN's operation-the temporal components of extended chemotherapy protocols, and the data-driven user-interaction model-do not map well to our constraint-satisfaction problem solvers. As another, more general, example, to say that a given task is a "therapy-planning problem" does not necessarily entail a true planning-system solution. For example, classification problem-solving may be appropriate for many therapy-determination tasks when there is a direct mapping between enumerable patient states and corresponding therapies. The Protege methodology and tool suite require the system builder to be explicit about the problemsolving requirements of a task. In our application, we first designed an ontology of HIV concepts, and subsequently created knowledge elements to fill specific roles in this ontology. This structuring has forced us to be clear about the assumptions we are making about what constitutes valid therapy choices. This should, in turn, simplify maintaining the system over time as therapy recommendations change. SUMMARY We constructed a system called ART Critic that models the antiretroviral therapy-planning task as a form of constraint satisfaction. We now use the prototype, and the Protege system, to expand both the knowledge base and to enhance the functionality of ART Critic. We plan to enhance the system's ability to reason intelligently about toxicity and loss-ofactivity inferences, and about other physiological status parameters. Our goal is to develop ART Critic into a fully functional antiretroviral-therapy advisor that will be of use in providing accurate advice that incorporates the most up-to-date knowledge sources. Acknowledgments We are grateful to Samson Tu for assisting in formulating the rules and models used in the knowledge engineering of ART Critic, and to Lyn Dupre for helping edit this manuscript. This work has been supported in part by contract N66001-97-C 8549 supported by DARPA, grant LM05708 from the NLM, and grant IRI-9257578 from the NSF. References
2.
3.
4.
5.
6. 7.
8.
9. 10.
11.
1. Pazzani, MJ, See D, Schroeder E, Tilles J. Application of an expert system in the management of HIV-infected patients. Journal of
631
Acquired Immune Deficiency Syndromes and Human Retrovirology 1997; 15, 356-362. Musen MA, Gennari JH, Eriksson H, Tu SW, Puerta AR. Prot6g6-II: Computer support for development of intelligent systems from libraries of components. In: Proceedings of Medinfo '95. Vancouver, BC; 1995. p. 766-770. Eriksson H, Shahar Y, Tu SW, Puerta AR, Musen MA. Task modeling with reusable problem-solving methods. Artificial Intelligence 1995; 79(2):293-326. Gennari JH, Altman RB, Musen MA. Reuse with Prot6ge-II: From elevators to ribosomes. In: Proceedings of the ACM-SigSoft 1995 Symposium on Software Reusability. Seattle, WA; 1995. p. 72-80. Gennari JH, Tu SW, Rothenfluh TE, Musen MA. Mapping Domains to Methods in Support of Reuse. International Journal of HumanComputer Studies 1994; 41, 399-424. Park JY, Musen MA. VM-in-Prot6g&: A Study of Software Reuse. In: Proceedings of Medinfo '98. In press 1998. Marcus S, Stout J, McDermott J. (1988). VT: an expert elevator designer that uses knowledgedirected backtracking. AI Magazine 1988; 9(1), 95-112. Park JY, Gennari JH, Musen MA. Mappings for reuse in knowledge-based systems. In: Proceedings of the 11th Banff Knowledge Acquisition for Knowledge-Based Systems Workshop. Banff, Canada; 1998. 2, SHARE16:1-20. Shortliffe EH. Computer-Based Medical Consultations: MYCIN. New York: American Elsevier; 1976. Clancey WJ. Details of the Revised Therapy Algorithm. In: Buchanan BG, Shortliffe EH, editors. Rule-based Expert Systems: the MYCIN Experiments of the Stanford Heuristic Programming Project. Reading MA: AddisonWesley; 1984. P. 133-146. Tu SW, Kahn MG, Musen MA, Ferguson JC, Shortliffe EH, Fagan LM. Episodic skeletal-plan refinement based on temporal data. Communications of the ACM 1989; 32(12), 1439-1455.