stanford heuristic programming project august 1977 $!&< p ...sm312wn0948/sm312wn0948.pdf ·...

20
Stanford Heuristic Programming Project Memo HPP-77-25 August 1977 p. $!&< v Computer Science Department Report No. STAN-CS-77-621 M I'll THE ART OF ARTIFICIAL INTELLIGENCE: I. THEMES AND CASE STUDIES OF KNOWLEDGE ENGINEERING by A. Feigenbaum COMPUTER SCIENCE DEPARTMENT School of Humanities and Sciences STANFORD UNIVERSITY

Upload: lamxuyen

Post on 12-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Stanford Heuristic Programming ProjectMemo HPP-77-25

August 1977p.

$!&<

v Computer Science DepartmentReport No. STAN-CS-77-621

M

I'll

THE ART OF ARTIFICIAL INTELLIGENCE:I. THEMES AND CASE STUDIES OF KNOWLEDGE ENGINEERING

by

A. Feigenbaum

COMPUTER SCIENCE DEPARTMENTSchool of Humanities and Sciences

STANFORD UNIVERSITY

\

,\

Yl i I £ VtsX^ "**>--Ik- fa* -hm - ~%y <rwX/ m.

fit p,j»U%»*

i\

Sf CURITY CLASSIFICATION OF THIS PAGE (When Data Entered)

READ INSTRUCTIONSBEFORE COMPLETING FORMREPORT DOCUMENTATION PAGE

2. GOVT ACCESSION NO. 3. RECIPIENT'S CATALOG NUMBER

5. TYPE OF REPORT & PERIOD COVERED

Technical ReportThe Art of Artificial Intelligence:June 1977

I. Themes and Case Studies of KnowledgeEngineering 6. PERFORMING ORG. REPORT NUMBER

HPP-77-257. AUTHOR(s)

8. CONTRACT OR GRANT NUMBER(s)

ARPA DAHC 15 -73 -C -0435ARPA Order No. 2494

Edward A. Feigenbaum

9. PERFORMING ORGANIZATION NAME AND ADDRESSStanford Computer Science DepartmentStanford UniversityStanford, CA 94305

10. PROGRAM ELEMENT, PROJECT TASKAREA & WORK UNIT NUMBERS

12. REPORT DATE 13. NO. OF PAGESJune 1977 1811. CONTROLLING OFFICE NAME AND ADDRESS 18Defense Advanced Research Projects Agency

Information Processing Techniques Office1400 Wilson Aye. , Arlington, VA 22209

15. SECURITY CLASS, {of this report)

Unclassified14. MONITORING AGENCY NAME & ADDRESS (if diff. from Controlling Office)

Mr. Philip Surra, Resident RepresentativeOffice of Naval ResearchDurand 165, Stanford University

15a. DECLASSIFYAT SON/DOWNGRADINGSCHEDULE

16. DISTRIBUTION STATEMENT (of this report)

Reproduction in whole or in part is permitted for any purpose of theU.S. Government

1?. DISTRIBUTION STATEMENT (of the abstract entered in Block 20, if different from report)

IS/SUPPLEMENTARY NOTES

19 KEY WORDS (Continue on reverse side if necessary and identify by block number)

'20. ABSTRACT (Continue on reverse side if necessary and identify by block number)The knowledge engineer practices the art' of bringing the principles and tools ofAI research to bear on difficult applications problems requiring experts'knowledge for their solution. The technical issues of acquiring this knowledge,representing it, and using it appropriately to construct and explain lines-of-reasoning, are important problems in the design of knowledge-based systems.Various systems that have achieved expert level performance in scientific andmedical inference illuminate the art of knowledge engineering and its parentscience, Artificial Intelligence.

UNCLASSIFIEDEDITION OF 1 NOV 65 IS OBSOLETE SECURITY CLASSIFICATION OF THIS PAGE (When Data Entered)

I REPORT NUMBERSTAN-CS-77-621

4. TITLE (and Subtitle)

DD, Fr",31473

spw»»?rt

THE ART OF ARTIFICIAL INTELLIGENCE:

I. Themes and Case Studies of Knowledge Engineering

STAN-CS-77-621Heuristic Programming Project Memo 77-25

Edward A. Feigenbaum

Department of Computer ScienceStanford University

Stanford, California

ABSTRACT

The knowledge engineer practices the art of bringing the principles andtools of AI research to bear on difficult applications problems requiringexperts' knowledge for their solution. The technical issues of acquiringthis knowledge, representing it, and using it appropriately to constructand explain lines-of-reasoning, are important problems in the design ofknowledge-based systems. Various systems that have achieved expert levelperformance in scientific and medical inference illuminates the art ofknowledge engineering and its parent science, Artificial Intelligence.

The views and conclusions in this document are those of the author andshould not be interpreted as necessarily representing the officialpolicies, either express or implied, of the Defense Advanced ResearchProjects Agency of the United States Government.

This research has received support from the following agencies: DefenseAdvanced Research Projects Agency, DAHC 15-73-C-0435; National Institutesof Health, 5R24-RR00612, RR-00785; National Science Foundation, MCS 76--11649, DCR 74-23461; The Bureau of Health Sciences Research and EvaluationHS-01544.

>

t

1

**p**"

THE ART OF ARTIFICIAL INTELLIGENCE:

I. Themes and case studies of knowledge engineerin

Edward A. Feigenbaum

Department of Computer Science,Stanford University,

Stanford, California, 94305.

Abstract

The knowledge engineer practices the art ofbringing the principles and tools of AI researchto bear on difficult applications problemsrequiring experts' knowledge for their solution.The technical issues of acquiring this knowledge,representing it, and using it appropriately toconstruct and explain lines-of-reasoning, areimportant problems in the design of knowledge-based systems. Various systems that have achievedexpert level performance in scientific and medicalinference illuminate the art of knowledgeengineering and its parent science, ArtificialIntelligence.

1 INTRODUCTION: AN EXAMPLE

This is the first of a pair of papers thatwill examine emerging themes of knowledgeengineering, illustrate them with case studiesdrawn from the work of the Stanford HeuristicProgramming Project, and discuss general issues ofknowledge engineering art and practice.

Let me begin with an example new to ourworkbench: a system called PUFF, the early fruitof a collaboration between our project and a groupat the Pacific Medical Center (PMC) in SanFrancisco.

A physician refers a patient to PMC'spulmonary function testing lab for diagnosis ofpossible pulmonary function disorder. For one ofthe tests, the patient inhales and exhales a fewtimes In a tube connected to aninstrument/computer combination. The instrumentacquires data on flow rates and volumes, the so-called flow-volume loop of the patient's lungs andairways. The computer measures certain parametersof the curve and presents them to thediagnostician (physician or PUFF) forinterpretation. The diagnosis is made along theselines: normal or diseased; restricted lung diseaseor obstructive airways disease or a combination ofboth; the severity; the likely disease type(s)(e.g. emphysema, bronchitis, etc.); and otherfactors important for diagnosis.

PUFF is given not only the measured data butalso certain items of information from the patient.record, e.g. sex, age, number of pack-years ofcigarette smoking. The task of the PUFF system isto infer a diagnosis and print it out in Englishin the normal medical summary form of theinterpretation expected by the referringphysician.

Everything PUFF knows about pulmonaryfunction diagnosis is contained in (currently) 55rules of the IF...THEN... form. No textbook ofmedicine currently records these rules. Theyconstitute the partly-public, partly-privateknowledge of an expert pulmonary physiologist atPMC, and were extracted and polished by projectengineers working intensively with the expert overa period of time. Here is an example of a PUFFrule (the unexplained acronyms refer to variousdata measurements):

RULE 31

IF:1) The severity of obstructive airwaysdisease of the patient is greater than orequal to mild, and2) The degree of diffusion defect of thepatient Is greater than or equal to mild,and3) The tic (body box)observed/predicted ofthe patient is greater than or equal to 110and4) The observed-predicted difference inrv/tlc of the patient is greater than orequal to 10

THEN:1) There is strongly suggestive evidence(.9) that the subtype of obstructive airwaysdisease Is emphysema, and2) It Is definite (1.0) that "OAD,Diffusion Defect, elevated TLC, and elevatedRV together indicate emphysema." is one ofthe findings.

Ii!

3

Ii 1

II J!!i

!

j

IIni

IIi! i! i

I1

illIfIIi

I

II

iii111f

i

2

ii 1

f-

One hundred cases, carefully chosen to spanthe variety of disease states with sufficientexemplary information for each, were used toextract the 55 rules. As the knowledge emerged, itand TIT!'1 rUle form ' 3dded to the systemand tested by running additional cases. The!^"a, "aS

uso^imes t surprised, sometimesfnrnnlJ J' , °CCaSl °nal B«PS andinconsistencies in the knowledge, and theIncorrect diagnoses that were logical consequencesof the existing rule set. The interplay betweenSri!? 8%*n8 Jneer and eXpert gradually expandedthe set of rules to remove most of these problems.

As cumulation of techniques in the artdemands and allows, a new tool was not inventedwhen an old one would do. The knowledge engineerspulled out of their toolkit a version of the MYCINsystem (to be discyssed later), „ith the rulesabout infectious diseases removed, and used it asm% f^en^rBlne f°r the TOF* d^gnoses. ThusPUFF like MYCIN, is a relatively B±mple backward-chaining inference system. It seeks a valid line-of-reasoning based on its rules and rooted in theinstrument and patient data. With a little morework at fitting some existing tools together, PUFFwill be able to explain this line-of-reasoning,just as MYCIN does. g 'As it is, PUFF only prints out the finalinterpretation, of which the following is anexample:

PATIENT DATA:The degree of dyspnea; MODERATELY-SEVEREThe severity of coughing: MILDSputum production MODERATELY-SEVEREThe number of pack-years of smoking: 48referral diagnosis: BRONCHITISIVC/IVC-predicted: 80RV/RV-predicted: 191FVC/FVC-predicted: 87TLC(body box)observed/predicted: 127Predicted FEVI/FVC: 83TLC(DLCO)observed/predicted: 83FEVI/FVC ratio: 50RV/TLC Observed-Predicted: 21MMF/MMF-predicted: 19the DLCO/DLCO-predicted: 48The slope (Fso_obs-F2s_pbs)/FVC obs: 19

DEGREE OF OBSTRUCTIVE AIRWAYS DISEASE:

OAD degree by SLOPE: (MODERATELY-SEVERE

OAD degree by MMF: (SEVERE 900)OAD degree by FEVI: (MODERATELY-SEVERE

FINAL OAD DEGREE: (MODERATELY-SEVERE910) (SEVERE 900)No conflict. Final degree:(MODERATELY -SEVERE 910)

INTERPRETATION

Obstruction Is indicated by curvature ofthe flow-volume loop.Forced Vital Capacity Is normal and peakflow rates are reduced, suggestingairway obstruction.Flow rate from 25-75 of expired volume isreduced, indicating severe airwayobstruction.OAD, Diffusion Defect, elevated TLC, andelevated RV together indicate emphysema.OAD, Diffusion Defect, and elevated RVIndicate emphysema.Change in expired flow rates followingbronchodilation shows that there Isreversibility of airway obstruction.The presence of a productive cough is anindication that the OAD is of thebronchitic type.Elevated lung volumes indicateoverinflation.Air trapping Is Indicated by the elevateddifference between observed and predictedRV/TLC ratios.Improvement in airway resistance indicatessome reversibility of airwayAirway obstruction is consistent with thepatient's smoking history.The airway obstruction accounts for thepatient's dyspnea.Although bronchodilators were notuseful in this one case, prolonged use mayprove to be beneficial to the patient.The reduced diffusion capacity indicatesairway obstruction of the mixedbronchitic and emphysematous types.Low diffusing capacity indicates loss ofalveolar capillary surface.Obstructive Airways Disease of mixed types

150 cases not studied during the knowledgeacquisition process were used for a test andvalidation of the rule set. PUFF Inferred adiagnosis for each. PUFF-produced and expert-produced interpretations were coded forstatistical analysis to discover the degree ofagreement. Over various types of disease states,and for two conditions of match between human andcomputer diagnoses ("same degree of severity" andwithin one degree of severity"), agreement rangedbetween approximately 90% and 1002.

The PUFF story is just beginning and will betold perhaps at the next IJCAI. The surprisingpunchline to my synopsis is that the current stateof the PUFF system as described above was achievedin less than 50 hours of interaction with theexpert and less than 10 man-weeks of effort by theknowledge engineers. We have learned much in the

®% -PIP -1|i:i:;i

past decade of the art of engineering knowledge-based intelligent agents 1

ultimately to translate WHAT he reallywants done into processing steps thatdefine HOW it shall be done by a realcomputer. The research activity aimed atcreating computer programs that act as"intelligent agents" near the WHAT end ofthe WHAT-To-HOW spectrum can be viewed asthe long-range goal of AI research."(Feigenbaum, 1974)

In the remainder of this essay, I would liketo discuss the route that one research group, theStanford Heuristic Programming Project, has taken,illustrating progress with case studies, anddiscussing themes of the work. \Y

2 ARTIFICIAL INTELLIGENCE & KNOWLEDGE ENGINEERING'Our young science is still more art than

science. Art: "the principles or methods governingany craft or branch of learning." Art: "skilledworkmanship, execution, or agency." These thedictionary teaches us. Knuth tells us that theendeavor of computer programming is an art, injust these ways. The art of constructingintelligent agents is both part of and anextension of the programming art. It is the art ofbuilding complex computer programs that represent

and reason with knowledge of the world. Our arttherefore lives in symbiosis with the otherworldly arts, whose practitioners — experts oftheir art — hold the knowledge we need toconstruct intelligent agents. In mo3t "crafts orbranches of learning" what we call "expertise" isthe essence of the art. And for the domains ofknowledge that we touch with our art, it is the"rules of expertise" or the rules of "goodjudgment" of the expert practitioners of thatdomain that we seek to transfer to our programs.

(■ij:

The dichotomy that was used to classify thecollected papers in the volumeComputers and Thought still characterizes well themotivations and research efforts of the AIcommunity. First, there are some who work towardthe construction of intelligent artifacts, or seekto uncover principles, methods, and techniquesuseful in such construction. Second, there arethose who view artificial intelligence as (to useNewell's phrase) "theoretical psychology," seekingexplicit and valid information processing modelsof human thought.

jilj

!" :i'

iliij:

1

||For purposes of this essay, I wish to focuson the motivations of the first group, these daysby far the larger of the two. I label thesemotivations "the Intelligent agent viewpoint" andhere is my understanding of that viewpoint:

II"The potential uses of computers bypeople to accomplish tasks can be *one-dimensionalized' into a spectrum 2. 1 Lessons of the Past

IIrepresenting the nature of instructionthat must be given the computer to do its Two insights from previous work are

pertinent to this essay.; ;

; I' JSI

job. Call it the WHAT-TO-HOW spectrum.At one extreme of the spectrum, the user

The first concerns the quest for generalityand power of the inference engine used in theperformance of intelligent acts (what Minsky andPapert [see Goldstein and Papert, 1977] havelabeled "the power strategy"). We must hypothesizefroa our experience to date that the problemsolving power exhibited in an intelligent agent'sperformance is primarily a consequence of thespecialist's knowledge employed by the agent, andonly very secondarily related to the generalityand power of the inference method employed. Ouragents must be knowledge-rich, even if they aremethods-poor. In 1970, reporting the first majorsummary-of-results of the DENDRAL program (to bediscussed later), we addressed this issue asfollows:

supplies his intelligence to instruct themachine with precision exactly HOW to dohis job, step-by-step. Progress inComputer Science can be seen as steps awayfrom the extreme 'HOW' point on thespectrum: the familiar panoply of assemblylanguages, subroutine libraries,compilers, extensible languages, etc. Atthe other extreme of the spectrum is the illuser with his real problea (WHAT he wishesthe computer, as his instrument, to do forhim). He aspires to communicate WHAT hewants done in a language that iscomfortable to him (perhaps English); viacommunication modes that are convenientfor him (including perhaps, speech orpictures); with some generality, s^omevagueness, imprecision, even error;without having to lay out in detail all

.: |;"...general problem-solvers are too

weak to be used as the basis for buildinghigh-performance systems. The behavior ofthe best general problem-solvers we know,human problem-solvers, is observed to beweak and shallow, except in the areas inwhich the human problem-solver is aspecialist. And it is observed that thetransfer of expertise between specialty

necessary subgoals for adequateperformance - with reasonable assurancethat he is addressing an intelligent agent

that is using knowledge of his world tounderstand his intent, to fill in hisvagueness, to make specific hisabstractions, to correct his errors, todiscover appropriate subgoals, and

3

ilMl

I

I

areas is slight. A chess master Isunlikely to be an expert algebraist or anexpert mass spectrum analyst, etc. Inthis view, the expert is the specialist,with a specialist's knowledge of his areaand a specialist's methods andheuristics." (Feigenbaum, Buchanan andLederberg, 1971, p. 187)

Subsequent evidence from our laboratory andall others has only confirmed this belief.

AI researchers have dramatically shiftedtheir view on generality and power in the pastdecade. In 1967, the canonical question about theDENDRAL program was: "It sounds like goodchemistry, but what does it have to do with AI?"In 1977, Goldstein and Papert write of a paradigmshift in AI:

"Today there has been a shift inparadigm. The fundamental problem ofunderstanding intelligence Is not theidentification of a few powerfultechniques, but rather the question of howto represent large amounts of knowledge ina fashion that permits their effective useand interaction." (Goldstein and Papert.1977)

The second insight froa past work concernsthe nature of the knowledge that an expert bringsto the performance of a task. Experience hasshown us that this knowledge is largely heuristicknowledge, experiential, uncertain — mostly "goodguesses" and "good practice," in lieu of facts andrigor. Experience has also taught us that much ofthis knowledge is private to the expert, notbecause he is unwilling to share publicly how heperforms, but because he is unable. He knows morethan he is aware of knowing. [Why else is thePh.D. or the Internship a guild-likeapprenticeship to a presumed "master of thecraft?" What the masters really know is notwritten in the textbooks of the masters.] But wehave learned also that this private knowledge canbe uncovered by the careful, painstaking analysisof a second party, or sometimes by the experthimself, operating in the context of a largenumber of highly specific performance problems.Finally, we have learned that expertise is multi-faceted, that the expert brings to bear many andvaried sources of knowledge in performance. Theapproach to capturing his expertise must proceedon many fronts simultaneously.

2. 2 The Knowledge Engineer

The knowledge engineer is that second partyjust discussed. [An historical note about theterm. In the mid-60s, John McCarthy, for reasonsobvious from his work, had been describingArtificial Intelligence as "Applied Epistemology."When I first described the DENDRAL program toDonald Michie in 1968, he remarked that it was"episteiriological engineering," a clever butponderous and unpronounceable turn-of-phrase thatI simplified into "knowledge engineering."] She(in deference to my favorite knowledge engineer)works intensively with an expert to acquiredomain-specific knowledge and organize it for useby a program. Simultaneously she is matching thetools of the AI workbench to the task at hand —program organizations, methods of symbolicinference, techniques for the structuring ofsymbolic information, and the like. If the toolfits, or nearly fits, she uses it. If not,necessity mothers AI invention, and a new toolgets created. She builds the early versions of theintelligent agent, guided always by her intentthat the program eventually achieve expert levelsof performance in the task. She refines orreconceptualizes the system as the increasingamount of acquired knowledge causes the AI tool to"break" or slow down intolerably. She also refinesthe human interface to the intelligent agent withseveral aims: to make the system appear"comfortable" to the human user in his linguistictransactions with it; to make the system'sinference processes understandable to the user;and to make the assistance controllable by theuser when, in the context of a real problem, hehas an insight that previously was not elicitedand therefore not incorporated.

In the next section, I wish to explore (insummary form) some case studies of the knowledgeengineer's art.

3 CASES FROM THE KNOWLEDGE ENGINEER'S WORKSHOP

I will draw material for this section fromthe work of my group at Stanford. Much excitingwork in knowledge engineering is going onelsewhere. Since my intent is not to surveyliterature but to illustrate themes, at the riskof appearing parochial I have used as case studiesthe work I know best.

My collaborators (Professors Lederberg andBuchanan) and I began a series of projects,initially the development of the DENDRAL program,in 1965. We had dual motives: first, to studyscientific problem solving and discovery,particularly the processes scientists do use orshould use in inferring hypotheses and theoriesfrom empirical evidence; and second, to conductthis study in such a way that our experimentalprograms would one day be of use to workingscientists, providing intelligent assistance onimportant and difficult problems. By 1970, we and

4

:s^:*'!wsfi!*«wi

*-*s»

I

Ill''.niii

i:i;tour co-workers had gained enough experience that This principle is, of course, not a logicalnecessity, but seems to us to be an engineeringprinciple of major importance.

i:N|mwe felt comfortable In laying out a program ofresearch encompassing work on theory formation,knowledge utilization, knowledge acquisition,explanation, and knowledge engineering techniques.Although there were some surprises along the way(like the AM program), the general lines of theresearch are proceeding as envisioned.

Multiple Sources of Knowledge: The formation andmaintenance (support) of the line-of-reasoningusually require the integration of many disparatesources of knowledge. The representational andinferential problems In achieving a smooth andeffective integration are formidable engineeringproblems.

illi-'|ii|:THEMES

As a road map to these case studies, it isuseful to keep in mind certain major themes:

Nil-Explanation: The ability to explain the line-of-reasoning in a language convenient to the user isnecessary for application and for systemdevelopment (e.g. for debugging and for extendingthe knowledge base). Once again, this is anengineering principle, but very important. Whatconstitutes "an explanation" is not a simpleconcept, and considerable thought needs to begiven, in each case, to the structuring ofexplanations.

Generatlon-and-test: Omnipresent in ourexperiments is the "classical" generation-and-test framework that has been the hallmark of AIprograms for two decades. This is not aconsequence of a doctrinaire attitude on our partabout heuristic search, but rather of theusefulness and sufficiency of the concept.

|jij

iii IIi iSituation »> Action Rules: We have chosen to

represent the knowledge of experts in this form.Making no doctrinaire claims for the universalapplicability of this representation, wenonetheless point to the demonstrated utility ofthe rule-based representation. From thisrepresentation flow rather directly many of thecharacteristics of our programs: for example,ease of modification of the knowledge, ease of

CASE STUDIES

In this section I will try to illustratethese themes with various case studies.

ill

ill3.1 DENDRAL: Inferring Chemical Structures Hi!' 1

ijii

i§explanation. The essence of our approach is thata rule must capture a "chunk" of domain knowledge 3.1 1 Historical Notethat is meaningful, in and of itself, to thedomain specialist. Thus our rules bear only ahistorical relationship to the production rulesused by Newell and Simon (1972) which we view as"machine-language programming" of arecognize »> act machine.

Begun in 1965, this collaborative projectwith the Stanford Mass Spectrometry Laboratory hasbecome one of the longest-lived continuous effortsin the history of Al (a fact that in no small wayhas contributed to Its success). The basicframework of generation-and-test and rule-basedrepresentation has proved rugged and extendable.For us the DENDRAL system has been a fountain ofideas, many of which have found their way, highlymetamorphosed, into our other projects. Forexample, our long-standing commitment to rule-based representations arose out of our(successful) attempt to head off the imminentossification of DENDRAL caused by the rapidaccumulation of new knowledge in the system around1967.

1lliiil!i

hiThe Domain-Specific Knowledge: It plays a criticalrole in organizing and constraining search. Thetheme is that in the knowledge is the power. Theinteresting action arises from the knowledgebase, not the inference engine. We use knowledgein rule form (discussed above), in the form ofinferentially-rich models based on theory, and inthe form of tableaus of symbolic data andrelationships (i.e. frame-like structures).System processes are made to conform to naturaland convenient representations of the domain-specific knowledge.

i!iiij!lliiiiji'lil;jljli

3.1.2 TaskFlexibility to modify the knowledge base: If theso-called "grain size" of the knowledge To enumerate plausible structures (atom-bond

graphs) for organic molecules, given two kinds ofinformation: analytic Instrument data from a massspectrometer and a nuclear magnetic resonancespectrometer; and user-supplied constraints on theanswers, derived from any other source ofknowledge (instrumental or contextual) available

representation is chosen properly (I.e. smallenough to be comprehensible but large enough tobe meaningful to the domain specialist), then therule-based approach allows great flexibility foradding, removing, or changing knowledge in thesystem.

Line-of-reasoning,: A central organizing principlein the design of knowledge-based intelligentagents is the maintenance of a line-of-reasoningthat 13 comprehensible to the domain specialist.

>

6

3.1.3 Representations

Chemical structures are represented as node-link graphs of atoms (nodes) and bonds (links).Constraints on search are represented as subgraphs(atomic configurations) to be denied or preferred.The empirical theory of mass spectrometry Isrepresented by a set of rules of the general form:

Situation: Particular atomicconfiguration(subgraph)

I Probability, P,| of occurring

V

Action: Fragmentation of theparticular configuration(breaking links)

Rules of this form are natural and expressive tomass spectrometrists.

3.1.4 Sketch of Method

DENDRAL's inference procedure is a heuristicsearch that takes place in three stages, withoutfeedback: plan-generate-test.

''Generate" (a program called CONGEN) is ageneration process for plausible structures. Itsfoundation is a combinatorial algorithm (withmathematically proven properties of completenessand non-redundant generation) that can produce allthe topologically legal candidate structures.Constraints supplied by the user or by the "Plan"process prune and steer the generation to producethe plausible set (i.e. those satisfying theconstraints) and not the enormous legal set.

"Test" refines the evaluation ofplausibility, discarding less worthy candidatesand rank-ordering the remainder for examination bythe user. "Test" first produces a "predicted" setof instrument data for each plausible candidate,using the rules described. It then evaluates theworth of each candidate by comparing its predicteddata with the actual input data. The evaluationis based on heuristic criteria of goodness-of-fit .Thus, "test" selects the "best" explanations ofthe data.

"Plan" produces direct (i.e. not chained)inference about likely substructure in themolecule from patterns in the data that areindicative of the presence of the substructure.(Patterns in the data trigger the left-hand-sides

of substructure rules). Though composed of manyatoms whose interconnections are given, thesubstructure can be manipulated as atom-like by"generate." Aggregating many units entering into acombinatorial process into fewer higher-levelunits reduces the size of the combinatorial searchspace. "Plan" sets up the search space so as to berelevent to the Input data. "Generate is theinference tactician; "Plan" is the inferencestrategist. There is a separate "Plan" packagefor each type of instrument data, but each packagepasses substructures (subgraphs) to "Generate."Thus, there is a uniform interface between "Plan"and "Generate. " User-supplied constraints enterthis interface, directly or from user-assistpackages, in the form of substructures.

3.1.5 Sources of Knowledge

The various sources of knowledge used by theDENDRAL system are:

Valences (legal connections of atoms);stable and unstable configurations of atoms; rulesfor mass spectrometry fragmentations; rules forNMR shifts; expert's rules for planning andevaluation; user-supplied constraints(contextual)

3.1.6 Results

DENDRAL's structure elucidation abilitiesare, paradoxically, both very general and verynarrow. In general, DENDRAL handles all molecules,cyclic and tree-like. In pure structureelucidation under constraints (without instrumentdata),CONGEN is unrivaled by human performance. Instructure elucidation with instrument data,DENDRAL's performance rivals expert humanperformance only for a small number of molecularfamilies for which the program has been givenspecialist's knowledge, namely the families ofinterest to our chemist collaborators. I willspare this computer science audience the list ofnames of these families. Within these areas ofknowledge- in tensive specialization, DENDRAL'sperformance is usually not only much faster butalso more accurate than expert human performance.

The statement just made summarizes thousandsof runs of DENDRAL on problems of interest to ourexperts, their colleagues, and their students. Theresults obtained, along with the knowledge thathad to be given to DENDRAL to obtain them, arepublished in major journals of chemistry. To date,25 papers have been published there, under aseries title "Applications of ArtificialIntelligence for Chemical Inference: <specificsubject>" (see references).

The DENDRAL system is in everyday use byStanford chemists, their collaborators at otheruniversities and collaborating or otherwiseinterested chemists in industry. Users outside

'1'

j!:;i

Stanford access the system over commercialcomputer/communications network. The problemsthey are solving are often difficult and novel.The British government is currently supportingwork at Edinburgh aimed at transferring DENDRAL toindustrial user communities in the UK.

DENDRAL and data. DENDRAL's robust models(topological, chemical, instrumental) permit astrategy of finding solutions by generatinghypothetical "correct answers" and choosing amongthese with critical tests. This strategy isopposite to that of piecing together theimplications of each data point to form ahypothesis. We call DENDRAL's strategy largelymodel-driven, and the other data-driven. Theconsequence of having enough knowledge to domodel-driven analysis is a large reduction in theamount of data that must be examined since data isbeing used mostly for verification of possibleanswers. In a typical DENDRAL mass spectrumanalysis, usually no more than about 25 datapoints out of a typical total of 250 points areprocessed. This Important point about datareduction and focus-of-attention has beendiscussed before by Gregory (1968) and by thevision and speech research groups, but is notwidely understood.

'i'l3.1.7 Discussion ill

iiiRepresentation and extensibility. Therepresentation chosen for the molecules,constraints, and rules of instrument datainterpretation is sufficiently close to that usedby chemists in thinking about structureelucidation that the knowledge base has beenextended smoothly and easily, mostly by chemiststhemselves in recent years. Only one majorreprogramming effort took place In the last 9years — when a new generator was created to dealwith cyclic structures.

ill

111Representation and the Integration of Conclusion. DENDRAL was an early herald ofAl's shift to the knowledge-based paradigm. Itdemonstrated the point of the primacy of domain-specific knowledge in achieving expert levels ofperformance. Its developing! t brought to thesurface important problems of knowledgerepresentation, acquisition, and use. It showedthat, by and large, the AI tools of the firstdecade were sufficient to cope with the demands of

multiple sources of knowledge. The generallydifficult problem of integrating various sourcesof knowledge has been made easy in DENDRAL by

;!;

IIcareful engineering of the representations ofobjects, constraints, and rules. We insistedcommon language of compatibility of therepresentations with each other and with theinference processes: the language of molecularstructure expressed as graphs. This leads to a Siia complex scientific problem-solving task,or were

readily extended to handle unforseen difficulties.It demonstrated that Al's conceptual andprogramming tools were capable of producingprograms of applications interest, albeit innarrow specialties. Such a demonstration ofcompetence and sufficiency was important for thecredibility of the AI field at a critical juncturein its history.

straightforward procedure for adding a new sourceof knowledge, say, for example, the knowledgeassociated with a new type of instrument data. Theprocedure is this: write rules that describe theeffect of the physical processes of the instrument

!;h!

on molecules using the situation *> action formwith molecular graphs on both sides; any specialinference process using these rules must pass itsresults to the generator only(!) in the commongraph language.

3.2 META-DENDRAL: inferring rules of massspectrometryIt is today widely believed in AI that the

use of many diverse sources of knowledge inproblem solving and data interpretation has astrong effect on quality of performance. Howstrong is, of course, domain-dependent, but theimpact of bringing just one additional source ofknowledge to bear on a problem can be startling.In one difficult (but not unusually difficult)mass spectrum analysis problem*, the program usingits mass spectrometry knowledge alone would havegenerated an impossibly large set of plausiblecandidates (over 1.25 million!). Our engineeringresponse to this was to add another source of dataand knowledge, proton NMR. The addition on asimple interpretive theory of this NMR data, fromwhich the program could infer a few additionalconstraints, reduced the set of plausiblecandidates to one, the right structure! This wasnot an isolated result but showed up dozens oftimes in subsequent analyses.

lII3. 2. 1 Historical note

The META-DENDRAL program is a case study inautomatic acquisition of domain knowledge. Itarose out of our DENDRAL work for two reasons:first, a decision that with DENDRAL we had asufficiently firm foundation on which to pursueour long-standing interest in processes ofscientific theory formation; second, by arecognition that the acquisition of domainknowledge was the bottleneck problem in thebuilding of applications-oriented intelligentagents.

Pi

'ijiiijjj!iiip

iiiHi3.2.2 Tasklijl!

JMETA-DENDRAL's job is to infer rules offragmentation of molecules in a mass spectrometerfor possible later use by the DENDRAL performancethe analysis of an acyclic amine with formula

C2OH4SN.<!l!

ii-iHii7

I

I:

atr«'

!

3

I

%

'i

8

V:

program. The inference is to be made from actualspectra recorded from known molecular structures.The output of the system Is the set offragmentation rules discovered, summary of theevidence supporting each rule, and a summary ofcontra-indicating evidence. User-suppliedconstraints can also be input to force the form ofrules along desired lines.

3.2.3 Representations

The rules are, of course, of the same formas used by DENDRAL that was described earlier.

3.2.4 Sketch of Method

META-DENDRAL, like DENDRAL, uses thegeneration-and-test framework. The process isorganized in three stages: Reinterpret the dataand summarize evidence (INTSUM); generateplausible candidates for rules (RULEGEN); test andrefine the set of plausible rules (RULEMOD).

INTSUM: gives every data point in everyspectrum an interpretation as a possible (highlyspecific) fragmentation. It then summarizesstatistically the "weight of evidence" forfragmentations and for atomic configurations thatcause these fragmentations. Thus, the job ofINTSUM is to translate data to DENDRAL subgraphsand bond-breaks, and to summarize the evidenceaccordingly.

RULEGEN: conducts a heuristic search of thespace of all rules that are legal under theDENDRAL rule syntax and the user-suppliedconstraints. It searches for plausible rules, i.e.those for which positive evidence exists. A searchpath is pruned when there is no evidence for rulesof the class just generated. The search tree

begins with the (single) most general rule(loosely put, "anything" fragments from"anything") and proceeds level-by-level towardmore detailed specifications of the. "anything."The heuristic stopping criterion measures whethera rule being generated ha3become too specific, inparticular whether it ia applicable to too fewmolecules of the input set. Similarly there is acriterion for deciding whether an emerging rule istoo general. Thus, the output of RULEGEN is a setof candidate rules for which there is positiveevidence.

RULEMOD: tests the candidate rule set usingmore complex criteria, including the presence ofnegative evidence. It removes redundancies in thecandidate rule set; merges rules that aresupported by the same evidence; tries furtherspecialization of candidates to remove negativeevidence; and tries further generalization thatpreserves positive evidence.

3.2.5 Results

META-DENDRAL produces rule sets that rivalin quality those produced by our collaboratingexperts. In some tests, META-DENDRAL recreatedrule sets that we had previously acquired from ourexperts during the DENDRAL project. In a morestringent test involving members of a family ofcomplex ringed molecules for which the massspectral theory had not been completely worked outby chemists, META-DENDRAL discovered rule sets foreach subfamily. The rules were judged by expertsto be excellent and a paper describing them wasrecently published in a major chemical journal(Buchanan, Smith, et al, 1976).

In a test of the generality of the approach,a version of the META-DENDRAL program Is currentlybeing applied to the discovery of rules for theanalysis of nuclear magnetic resonance data.

3.3 MYCIN and TEIRESIAS: Medical Diagnosis

3.3.1 Historical note

MYCIN originated in the Ph.D. thesis of E.Shortliffe (now Shortliffe, M.D. as well), incollaboration with the Infectious Disease group at

the Stanford Medical School (Shortliffe, 1976).TEIRESIAS, the Ph.D. thesis work of R. Davis rarose from issues and problems indicated by theMYCIN project but generalized by Davis beyond thebounds of medical diagnosis applications (Davis,1976). Other MYCIN-related theses are inprogress.

3.3.2 Tasks

The MYCIN performance task is diagnosis ofblood infections and meningitis infections and therecommendation of drug treatment. MYCIN conductsa consultation (In English) with a physician-userabout a patient case, constructing lines-of-reasoning leading to the diagnosis and treatmentplan.

The TEIRESIAS knowledge acquisition task canbe described as follows:

In the context of a particular consultation,confront the expert with a diagnosis with which hedoes not agree. Lead him systematically backthrough the line-of-reasoning that produced thediagnosis to the point at which he indicates theanalysis went awry. Interact with the expert tomodify offending rules or to acquire new rules.Rerun the consultation to test the solution andgain the expert's concurrence.

'■1..' L v

i::;il3.3.4 Sketch of method

MYCIN'S rules are of the form: MYCIN employs a generation-and-testprocedure of a familiar sort. The generation ofsteps in the line-of-reasoning is accomplished bybackward chaining of the rules. An IF-side clauseis either immediately true or false (as determinedby patient or test data entered by the physicianin the consultation); or is to be decided bysubgoaling. Thus, "test" is interleaved with"generation" and serves to prune out incorrectlines-of-reasoning.

IF <conjunctive clauses> THEN <implication>

Here is an example of a MYCIN rule for bloodinfections.

ilII

RULE 85 Each rule supplied by an expert hasassociated with it a "degree of certainty"representing the expert's confidence in thevalidity of the rule (a number from 1 to 10).MYCIN uses a particular ad-hoc but simple model ofinexact reasoning to cumulate the degrees ofcertainty of the rules used in an inference chain(Shortliffe and Buchanan, 1975).

IF1) The site of the culture is blood, and2) The gram stain of the organism is !■■!graraneg, and3) The morphology of the organism is

rod, and4) The patient is a compromised host i'lr

ilillijil■il'

It follows that there may be a number of"somewhat true" lines-of-reasoning — someindicating one diagnosis, some Indicating another.All (above a threshold) are used by the system assources of knowledge indicating plausible lines-of-reasoning.

THEN:There is suggestive evidence (.6) thatthe identity of the organism ispseudomonas-aeruginosa

TEIRESIAS' rule acquisition process is basedon a record of MYCIN'S search. Rule acquisition isguided by a set of rule models that dictate theform and indicate the likely content of new rules.Rule models are not given in advance, but areinferred from the knowledge base of existingrules.

jiii

ii;:!ill!Hi!ijii

TEIRESIAS allows the representation ofMYCIN-like rules governing the use of otherrules, i.e. rule-based strategies. An examplefollows.

3.3.5 Language of InteractionHi:

The language used looks like it might beEnglish but is actually the dialect "Doctor-ese"used by members of the tribe of healing artspractitioners. Reasonably simple languageprocessing methods suffice. When ambiguities ofinterpretation are encountered, they are fed backto the user for decisions about meaning. il

METARULE 23.3.6 Example diagnosis and treatment plan

IF i;1) the patient is a compromised host, and The following is an example of a diagnosis

reported by MYCIN to one of its users following aconsultation. An example consultation will not beshown, but one can be found in Shortliffe's book(Shortliffe, 1976).

2) there are rules which mention in theirpremise pseudomonas II3) there are rules which mention in theirpremise klebsiellas

ill

THEN:There is suggestive evidence (.4) that theformer should be done before the latter.

ij|ijlll

I hii hi

My therapy recommendations will be designedto treat for organisms that are either verylikely or, although less likely, would havea significant effect on therapy selectionif they were present. It is important to

|ii|

9

III!; 1'

lii!

3.3.3 Representations:

ji;j

I

I

6

m ?!p'

%

1

1il

I

I"ft

j!

1

I

m

cover for the following probableinfection(s) and associated organism(s):

INFECTION-], is CYSTITIS<Item i> PSEUDOMONAS-CEPACIA [ORGANISM-5]<Item 2> CITROBACTER-DIVERSUS [ORGANISM-4]<Item 3> E.COLI [ORGANISM-3]

INFECTION-2 is UPPER-RESPIRATORY-INFECTION<Item 4> LISTERIA [ORGANISM-2]

[REC-1J My preferred therapy recommendationis as follows:

In order to cover for Items <1 2 3 4 s> :Give the following in combination:1) KANAMYCIN

Dose: 750 mg (7.5 mg/kg) q!2h IM (or IV)for 28 days

Comments: Modify dose in renal failure2) PENICILLINDose: 2,500,000 units (25000 units/kg)

q4h IV for 28 days

3.3.7 Results

MYCIN is currently being prepared forclinical evaluation. In a preliminary evaluation,dona outside of the clinical setting, a panel ofexpert judges was asked to rate MYCIN 'sperformance along a nuaber of dimensions (e.g.infecting organism identification, organismsignificance). In 90% of the cases submitted tothe judges, a majority of the judges said that theprogram s decisions were the-same-as or as-good-asthe decisions they would have made.

3.3.8 Explanation

MYCIN can expose its line of reasoning byoffering explanations of various kinds. "Why" andHow questions can be asked by the user duringthe consultation. "Why" is the user's way ofinquiring, "Why do you want to know that?" "How"is his of asking, "How did you concludethat...? In a post-consultation, he can similarlyinquire about how the diagnostic conclusions werereached, and inquire about the reasons why certainother conclusions were ruled out. Examples of theMYCIN-TEIRESIAS explanation capabilities follow:

MYCIN: Is the patient's illness withORGANISM-1 a hospital-acquired infection'USER: WHYTEIRESIAS: (i.e. WHY Is it important todetermine whether or not the infection withORGANISM-1 was acquired while the patientwas hospitalized?)

[I.o] This will aid in determining thecategory of ORGANISM-1.

It has already been established that[I.l] the gram stain of ORGANISM-1 isgramneg, and[1.2] the morphology of ORGANISM-1 is rodand *[1.3] the aerobicity of ORGANISM-l isfacultative

Therefore, if

[1.4] the infection with ORGANISM-1 was notacquired while the patient was hospitalizedthen

there is strongly suggestive evidence (.8)that the category of ORGANISM-1 isenterobacteriaceae

Also: there is weakly suggestive evidence(.1) that the Identity ofORGANISM-1 is pseudomonas-aeruginosa[RULE 37]

USER: HOW 1.3

TEIRESIAS: [i. e . HOW was it establishedthat the aerobicity of ORGANISM-1 isfacultative?]

The following were used

[3.1] RULE 27 indicated there is stronglysuggestive evidence (.8) that theaerobicity of ORGANISM-1 is facultative[3.2] RULE 27 indicated there is weaklysuggestive evidence (.2) that theaerobicity of ORGANISM-1 is anaerobic

Since this gave a cumulative CF of (.8) forfacultative, and (.2) for anaerobic, it hasbeen established that the aerobicity ofORCANISM-1 is facultative.

10

c#* *v<^s«p^»fe*a?J-T,?¥^w*9»fflwpsT-v^WSF m

INFECTION-3 is BACTEREMIA<Item 5> ENTEROCOCCUS [ORGANISM-1]

It

«

!|

.i.|i

11l

iii

11

Ii!

USER: WHY DIDN'T YOU CONSIDERSTREPTOCOCCUS AS A POSSIBILITY FORORGAN!SM-1?

TEIRESIAS: The following rule could havebeen used to determine that the identify ofORGANISM-1 was streptococcus: RULE 33

But clause 2 ("the morphology of theorganism is coccus") was already knownto be false for O^GANTSM-1 , so the rule was

.never tried.

3.3.9 Discussion

A few short comments aimed at knowledgeengineering are in order.

English is the language most natural andcomfortable for our experts and users, and wastherefore the language chosen for interactiveconsultation, explanation, and externalrepresentation of the rules (the internal formatis INTERLISP). This situation is not peculiar todoctors; in most areas of application ofintelligent agents I believe that English (i.e.natural language) will be the language of choice.Programming an English language processor andfront-end to such systems is not a scaryenterprise because:

a) the domain is specialized, so thatpossible interpretations are constrained.

b) specialist-talk is replete with standardjargon and stereotyped ways of expressingknowledge and queries — just right for texttemplates, simple grammars and other simpleprocessing schemes.

c) the ambiguity of interpretation resultingfrom simple schemes can be dealt with easily byfeeding back interpretations for confirmation. Ifthis is done with a pleasant *'I didn't quiteunderstand y0u..." tone, it is not irritating tothe user.

English may be exactly the wrong languagefor representation and interaction in somedomains. It would be awkward, to say the least, torepresent DENDRAL's chemical structures andknowledge of mass spectrometry in English, or tointeract about these with a user.

Simple explanation schemes have been a partof the AI scene for a number of years and are nothard to implement. Really good models of whatexplanation is a3 a transaction between user andagent, with programs to implement these models,will be the subject (I predict) of much futureresearch in AI.

Without the explanation capability, Iassert, u<=er acceptance of MYCIN would have beennil, and there would have been a greatlydiminished effectiveness and contribution of ourexperts.

MYCIN was the first of our programs thatforced us to deal with what we had alwaysunderstood: that experts' knowledge is uncertainand that our inference engines had to be made toreason with this uncertainty. It is less importantthat the inexact reasoning scheme be formal,rigorous, and uniform than it is for the scheme tobe natural to and easily understandable by theexperts and users.

All of these points can be summarized bysaying that MYCIN and its TEIRESIAS adjunct areexperiments in the design of a see-through system,whose representations and processes are almosttransparently clear to the domain specialist."Almost" here is equivalent to "with a few minutesof introductory description." The various piecesof MYCIN — the backward chaining, the Englishtransactions, the explanations, etc. — are eachsimple in concept and realization. But there aregreat virtues to simplicity in system design; andviewed as a total intelligent agent system,MYCIN /TEIRESIAS is one of the best engineered.

3.4 SU/X: signal understanding

3.4.1 Historical note

SU/X is a system design that was tested inan application whose details are classified.Because of this, the ensuing discussion willappear considerably less concrete and tangiblethan the preceding case studies. This systemdesign was done by H.P. Nii and me, and wasstrongly influenced by the CMU Hearsay II systemdesign.

3.4.2 Task

SU/X*s task is the formation and continualupdating, over long periods of time, of hypothesesabout the identity, location, and velocity ofobjects in a physical space. The output desired Isa display of the "current best hypotheses" withfull explanation of the support for each. Thereare two types of input data: the primary signal(to be understood); and auxiliary symbolic data(to supply context for the understanding). Theprimary signals are spectra, represented asdescriptions of the spectral lines. The variousspectra cover the physical space with some spatialoverlap.

im^WnWa-'

1

33.4. Representations

The rules given by the expert about objects,their behavior, and the interpretation of signaldata from then are all. represented In thesituation => action form. The "situations"constitute invoking conditions and the "actions"are processes that modify the current hypotheses,post unresolved issues, recompute evaluations,etc. The expert's knowledge of how to do analysisin the task is also represented in rule form.These strategy rules replace the normal executiveprogram.

The situation-hypothesis is represented as anode-link graph, tree-like in that it has distinct"levels," each representing a degree ofabstraction (or aggregation) that is natural tothe expert in his understanding of the domain. Anode represents an hypothesis; a link to that noderepresents support for that hypothesis (as inHEARSAY 11, "support from above" or "support frombelow"). "Lower" levels are concerned with thespecifics of the signal data. "Higher" levelsrepresent symbolic abstractions.

3.4.4 Sketch of method

The situation-hypothesis is formedincrementally. As the situation unfolds over time,the triggering of rules modifies or discardsexisting hypotheses, adds new ones, or changessupport values. The situation-hypothesis is acommon workspace ("blackboard," in HEARSAY jargon)for all the rules.

In general, the incremental steps toward amore complete and refined situation-hypothesis canbe viewed as a sequence of local generate-and-testactivities. Some of the rules are plausible movegenerators, generating either nodes or links.Other rules are evaluators, testing and modifyingnode descriptions-

In typical operation, new data is submittedfor processing (say, N time-units of new data).This initiates a flurry of rule-triggerings andconsequently rule-actions (called "events"). Someevents are direct consequences of the data; otherevents arise in a cascade-like fashion from thetriggering of rules. Auxiliary symbolic data alsocause events, usually affecting the higher levelsof the hypothesis. As a consequence, support-from-above for the lower level processes is madeavailable; and expectations of possible lowerlevel events can be formed. Eventually all therelevant rules have their say and the systembecomes quiescent, thereby triggering the input ofnew data to re-energize the inference activity.

The system uses the simplifying strategy ofmaintaining only one "best" situation-hypothesisat any moment, modifying it incrementally asrequired by the changing data. This approach ismade feasible by several characteristics of the

domain. First, there is the strong continuityover time of objects and their behavior*(specifically, they do not change radically overtime, or behave radically differently over shortperiods). Second, a single problem (identity,location and velocity of a particular set ofobjects) persists over numerous data gatheringperiods. (Compare this to speech understanding inwhich each sentence is spoken just once, and eachpresents a new and different problem.) Finally,the system's hypothesis is typically "almostright," in part because it gets numerousopportunities to refine the solution (i.e.. thenumerous data gathering periods), and in partbecause the availability of many knowledge sourcestends to over-determine the solution. As a resultof all of these, the current best hypothesischanges only slowly with time, and hence keepingonly the current best is a feasible approach.

Of interest are the time-based events. Theserule-like expressions, created by certain rules,trigger upon the passage of specified amounts oftime. They implement various "wait-and-see"strategies of analysis that are useful in thedomain.

3.4.5 Results

In the test application, using signal datagenerated by a simulation program because realdata was not available, the program achievedexpert levels of performance over a span of testproblems. Some problems were difficult becausethere was very little primary signal to supportinference. Others were difficult because too muchsignal induced a plethora of alternatives withmuch ambiguity.

A modified SU/X design Is currently beingused as the basis for an application to theinterpretation of x-ray crystallographic data, theCRYSALIS program mentioned later.

3.4.6 Discussion

The role of the auxiliary symbolic sourcesof data is of critical importance. They supply asymbolic model of the existing situation that isused to generate expectations of events to beobserved in the data stream. This allows flow ofinferences from higher levels of abstraction tolower. Such a process, so familiar to AIresearchers, apparently is almost unrecognizedamong signal processing engineers. In theapplication task, the expectation-driven analysisis essential in controlling the combinatorialprocessing explosion at the lower levels,exactlythe explosion that forces the traditional signalprocessing engineers to seek out the largestpossible number-cruncher for their work.

The design of appropriate explanations for *the user takes an interesting twist in SU/X. The

12

"■'*'

1 >■>

5:

i

I

t

!H-i

it

!isituation-hypothesis unfolds piecemeal over time,but the "appropriate" explanation for the user Isone that focuses on individual objects over time.Thus the appropriate explanation must besynthesized from a history of all the events thatled up to the current hypothesis. Contrast thiswith the MYCIN-TEIRESIAS reporting of ruleinvocations in the construction of a reasoningchain.

scientific hypothesis testing to the enterprise ofmathematical discovery.

Initialized with concepts of elementary settheory, it conjectured concepts In elementarynumber theory, such as "add," "multiply" (by fourdistinct paths!), "primes," the uniquefactorization theorem, and a concept similar toprimes but previously not much studied called"maximally divisible numbers."

Since its knowledge base and its auxiliarysymbolic data give it a model-of-the-situationthat strongly constrains interpretation of theprimary data stream, SU/X is relativelyunperturbed by errorful or missing data. Thesedata conditions merely cause fluctuations In thecredibility of individual hypotheses and/or thecreation of the "wait-and-see" events. SU/X can be(but has not yet been) used to control sensors.Since its rules specify what types and values ofevidence are necessary to establish support, andsince it is constantly processing a completehypothesis structure, it can request "criticalreadings" from the sensors. In general, thisallows an efficient use of limited sensorbandwidth and data acquisition processingcapability.

3.5.2 MOLGEN: planning experiments in moleculargenetics

MOLGEN , a collaboration with the StanfordGenetics Department, is work in progress.MOLGEN's task is to provide intelligent advice toa molecular geneticist on the planning ofexperiments involving the manipulation of DNA. Thegeneticist has various kinds of laboratorytechniques available for changing DNA material(cuts, joins, insertions, deletions, and so on);techniques for determining the biologicalconsequences of the changes; various instrumentsfor measuring effects; various chemical methodsfor inducing, facilitating, or inhibiting changes;and many other tools.

ll

MOLGEN will offer planning assistance inorganizing and sequencing such tools to accomplishan experimental goal. In addition MOLGEN willcheck user-provided experiment plans forfeasibility; and its knowledge base will be arepository for the rapidly expanding knowledge ofthis specialty, available by interrogation.

3.5 OTHER CASE STUDIESII

Space does not allow more than just a briefsketch of other interesting projects that havebeen completed or are in progress.

3. 5. 1 AM: mathematical discoveryCurrent efforts to engineer a knowledge-base

management system for MOLGEN are described byMartin et al in a paper in these proceedings. Thissubsystem uses and extends the techniques of theTEIRESIAS system discussed earlier.

AM is a knowledge-based system thatconjectures interesting concepts In elementarymathematics. It Is a discoverer of interestingtheorems to prove, not a theorem proving program.It was conceived and executed by D. Lenat for hisPh.D. thesis, and is reported by him in theseproceedings ("An Overview of AM").

t

In MOLGEN the problem of integration of manydiverse sources of knowledge is central since theessence of the experiment planning process Is thesuccessful merging of biological, genetic,chemical, topological, and Instrument knowledge.In MOLGEN the problem of representing processes isalso brought into focus since the expert'sknowledge of experimental strategies — proto-plans — must also be represented and put to use.

!

IIAM's knowledge is basically of two types:

rules that suggest possibly interesting newconcepts from previously conjectured concepts; andrules that evaluate the mathematical"interestingness" of a conjecture. These rulesattempt to capture the expertise of theprofessional mathematician at the task ofmathematical discovery. Though Lenat is not aprofessional mathematician, he was ablesuccessfully to serve as his own expert in thebuilding of this program.

3.5.3 CRYSALIS: inferring protein structure fromelectron density maps

Ii

CRYSALIS, too, is work In progress. Its taskIs to hypothesize the structure of a protein froma map of electron density that is derived from x-ray crystallographic data. The map is three-dimensional, and the contour information is crudeand highly ambiguous. Interpretation is guidedand supported by auxiliary information, of whichthe ammo acid sequence of the protein's backboneis the most important. Density map interpretation

AM conducts a heuristic search through thespace of concepts creatable from its rules. Itsbasic framework is generation-and-test. Thegeneration is plausible move generation, asindicated by the rules for formation of newconcepts. The test is the evaluation of"interestingness." Of particular note is themethod of test-by-example that lends the flavor of

13

il

* ' *

is a protein chemist's art. As always, capturingthis art in heuristic rules and putting it to usewith an inference engine is the project's goal.

The inference engine for CRYSALIS is amodification of the SU/X system design describedabove. The hypothesis formation process must dealwith many levels of possibly useful aggregationand abstraction. For example, the map itself canbe viewed as consisting of "peaks," or "peaks andvalleys," or "skeleton." The protein model has"atoms," "amide planes," "ammo acid sidechains,"and even massive substructures such as "helices."Protein molecules are so complex that a systematicgeneration-and-test strategy like DENDRAL's is notfeasible. Incremental piecing together of thehypothesis using region-growing methods isnecessary.

The CRYSALIS design (alias SU/P) isdescribed in a recent paper by Nii and Feigenbaum(1977).

4 SUMMARY OF CASE STUDIES

Some of the themes presented earlier need norecapitulation, but I wish to revisit three here:generation-and-test; situation -> action rules;and explanations.

4. 1 Generation and Test

Aircraft come in a wide variety of sizes,shapes, and functional designs and they areapplied in very many ways. But almost all that flydo so because of the unifying physical principleof lift by airflow; the others are described byexception. So it is with intelligent agentprograms and, the information processingpsychologists tell us, with people. One unifyingprinciple of "intelligence" Is generation-and-test. No wonder that it has been so thoroughlystudied in AI research!

In the case studies, generation ismanifested in a variety of forms and processingschemes. There are legal move generators definedformally by a generating algorithm (DENDRAL'sgraph generating algorithm); or by a logical ruleof Inference (MYCIN's backward chaining). Whenlegal move generation is not possible or notefficient, there are plausible move generators (asin SU/X and AM). Sometimes generation isinterleaved with testing (as in MYCIN, SU/X, andAM). In one case, all generation precedes testing(DENDRAL). One case (META-DENDRAL) is mixed, withsome testing taking place during generation, someafter.

Test also shows great variety. There aresimple tests (MYCIN: "Is the organism aerobic?";SU/X: "Has a spectral line appeared at positionP?") Some tests are complex heuristic evaluations(AM: "Is the new concept 'interesting'?"; MOLGEN:

"Will the reaction actually take place?")Sometimes a complex test can involve feedback tomodify the object being tested (as in META-DENDRAL).

1

a

The evidence from our case studies supportsthe assertion by Newell and Simon that generation-and-test is a law of our science (Newell andSimon, 1976).

4.2 Situation - > Action rules I

Situation «> Action rules are used to |represent experts' knowledge in all of the case Jstudies. Always the situation part Indicates the 1specific conditions under which the rule is |relevant. The action part can be simple (MYCIN: 1conclude presence of particular organism; DENDRAL: 1conclude break of particular bond). Or it can be 1quite complex (MOLGEN: an experiential procedure). IThe overriding consideration in making design |choices is that the rule form chosen be able to frepresent clearly and directly what the expert |wishes to express about the domain. As |Illustrated, this may necessitate a wide variation |in rule syntax and semantics. 1m

From a study of all the projects, a 1regularity emerges. A salient feature of the $Situation »> Action rule technique for Irepresenting expert's knowledge is the modularity fof the knowledge base, with the concomitant \flexibility to add or change the knowledge easily \as the experts' understanding of the domain \changes. Here too one must be pragmatic, not '■

doctrinaire. A technique such as this can not *represent modularity of knowledge if that *modularity does not exist in the domain. The jvirtue of this technique is that it serves as a fframework for discovering what modularity exists tin the domain. Discovery may feed back to cause |reformulation of the knowledge toward greater Imodularity. t

Finally, our case studies have shown thatstrategy knowledge can be captured in rule form.In TEIRESIAS, the metarules capture knowledge ofhow to deploy domain knowledge; in SU/X, thestrategy rules represent the experts' knowledge of"how to analyze" in the domain.

4. 3 Explanation

Most of the programs, and all of the more \recent ones, make available an explanation 1capability for the user, be he end-user or systemdeveloper. Our focus on end-users in applications \domains has forced attention to human engineering 1issues, in particular making the need for the |explanation capability imperative. J

The Intelligent Agent viewpoint seems to usto demand that the agent be able to explain itsactivity; else the question arises of who is in

%

14

*■""■

v . H

rv'.-k—

I

t

I

t

I

I

i

I

i

t

i15

I

i

control of the agent's activity. The issue is not

academic or philosophical. It is an engineeringissue that has arisen in medical and Military

applications of intelligent agents, and willgovern future acceptance of AI work in

applications areas. And on the philosophical levelone might even argue that there is a moral

imperative to provide accurate explanations to

end-users whose intuitions about our systems are

almost nil.

Finally, the explanation capability isneeded as part of the concerted attack on the

knowledge acquisition problem. Explanation of thereasoning process is central to the interactivetransfer of expertise to the knowledge base, and

it is our most powerful tool for the debugging of

the knowledge base.

5 EPILOGUE

What we have learned about knowledgeengineering goes beyond what is discernible in thebehavior of our case study programs. In the nextpaper of this two-part series, I will raise and

discuss many of the general concerns of knowledge

engineers, including these:

What constitutes an "application" of AItechniques?

There is a difference between a Beriousapplication and an application-flavored toy

problem.

What are some criteria for the judiciousselection of an application of AI techniques?

What are some applications areas worthy of

serious attention by knowledge engineers?

For example, applications to science, to

signal interpretation, and to humaninteraction with complex systems.

How to find and fascinate an Expert.

The background and prior training of theexpert

The level of commitment that can beelicited.

Designing systems that "think the way Ido."

Sustaining attention by quick feedbackand incremental progress.

Focusing attention to data and specificproblems.

Providing ways to express uncertainty ofexpert knowledge.

The side benefits to the expert of hisinvestment in the knowledge engineeringactivity

Gaining consensus among experts about theknowledge of a domain.

The consensus may be a more valuableoutcome of the knowledge engineering effortthan the building of the program.

Problems faced by knowledge engineers today:

The lack of adequate and appropriatecomputer hardware.

The difficulty of export of systems to

end-users, caused by the lack of properly-sized and -packaged combinations of hardwareand software

The chronic absence of cumulation of Altechniques in the form of software packagesthat can achieve wide use.

The shortage of trained knowledgeengineers.

The difficulty of obtaining andsustaining funding for Interesting knowledgeengineering projects.

6 ACKNOWLEDGMENT

The work reported herein has received long-

term support from the Defense Advanced ResearchProjects Agency. The National Institutes of Healthhas supported DENDRAL, META-DENDRAL, and theSUMEX-AIM computer facility on which we compute.

The National Science Foundation has supportedresearch on CRYSALIS and MOLGEN. The Bureau ofHealth Sciences Research and Evaluation hassupported research on MYCIN. I am grateful to

these agencies for their continuing support of our

work.

I wish to express my deep admiration andthanks to the faculty, staff and students of theHeuristic Programming Project, and to ourcollaborators in the various worldly arts, for thecreativity and dedication that has made our workexciting and fruitful. My particular thanks forassistance in preparing this manuscript go to

Randy Davis, Penny Nii, Reid Smith, and Carolyn

Taynai.

16

'..'.'.' ii.. '. '....' .',.:....;...'. ,'ii.i.i. ii.. "".' . "."".:. Y'.y: : : :/'-:-;: 'r- ■■■.-."■. ■^■. :,,5:,,^,~„ :.._,,-,J..^^.".„„—^^..j^.^.^^.,,,^,,...^.,^^

7 REFERENCES

General

Feigenbaum, E.A. "Artificial IntelligenceResearch: What is it? What has it achieved?Where is it going?," invited paper, Symposium onArtificial Intelligence, Canberra, Australia,1974.

Goldstein, I. and S. Papert, "ArtificialIntelligence, Language, and the Study ofKnowledge," Cognitive Science, Vol.l, No.l, 1977.

Gregory, R. , "On How so Little InformationControls so Much Behavior," Bionics ResearchReport No. 1, Machine Intelligence Department,University of Edinburgh, 1968.

Newell, A. and H.A. Simon, Human Problem Solving,Prentice-Hall, 1972.

Newell, A. and H.A. Simon, "Computer Science asEmpirical Inquiry: Symbols and Search," Com ACM,19, 3, March, 1976.

DENDRAL and META-DENDRAL

Feigenbaum, E.A., Buchanan, B.G. and J. Lederberg,"On Generality and Problem Solving: a Case StudyUsing the DENDRAL Program," Machine Intelligence6^, Edinburgh Univ. Press, 1971.

Buchanan, 3.G., Duffield, A.M. and A. V. Robertson,"An Application of Artificial Intelligence to theInterpretation - of Mass Spectra," MassSpectrometry Techniques and Applications, G.W.A.Milne, Ed., John Wiley & Sons, Inc., p. 121,1971.

Michie, D. and B.G. Buchanan, "Current Status ofthe Heuristic DENDRAL Program for ApplyingArtificial Intelligence to the Interpretation ofMass Spectra," Computers for Spectroscopy, R.A.G.Carrington, cd., London: Adam Hilger, 1974.

Buchanan, E.G., "Scientific Theory Formation byComputer," Nato Advanced Study Institutes Series,Series E: Applied Science, 14:515, Noordhoff-Leyden, 1976,

Buchanan, 8.G., Smith, D.H. , White, W.C., Gritter,R.J., Feigenbaum, E.A. , Lederberg, J. and C.Djerassi, "Applications of ArtificialIntelligence for Chemical Inference XXII.Automatic Rule Formation in Mass Spectrometry byMeans of the Meta-DENDRAL Program," Journal ofthe ACS, 98:6168, 1976.

MYCIN

Shortliffe, E. Computer-based Medical Consul-tations: MYCIN. New York, Elsevier, 1976.

Davis, R. , Buchanan, B.G. and E.H. Shortliffe,"Production Rules as a Representation for aKnowledge-Based Consultation Program," ArtificialIntelligence, 8, 1, February, 1977.

Shortliffe, E.H. and B.G. Buchanan, "A Model ofInexact Reasoning in Medicine," MathematicalMosciences, 23:351, 1975.

TEIRESIAS

Davis, R. , "Applications of Meta Level Knowledgeto the Construction, Maintenance and Use of LargeKnowledge Bases," Memo HPP-76-7, StanfordComputer Science Department, Stanford, CA, 1976.

Davis, R., "Interactive Transfer of Expertise I:Acquisition of New Inference Rules," theseProceedings.

Davis, R. and B.G. Buchanan, "Meta-LevelKnowledge: Overview and Applications," theseProceedings.

SU/X

Nii, H.P. and E.A. Feigenbaum, "Rule BasedUnderstanding of Signals," Proceedings of theConference on Pattern-Directed Inference Systems,1977 (forthcoming), also Memo HPP-77-7, StanfordComputer Science Department, Stanford, CA, 1977.

AM

Lenat, D., "AM: An Artificial IntelligenceApproach to Discovery in Mathematics as HeuristicSearch," Memo HPP-76-8, Stanford Computer ScienceDepartment, Stanford, CA, 1976.

MOLGEN

Martin, N. , Friedland, P., King, J., and M.Stefik, "Knowledge Base Management for ExperimentPlanning in Molecular Genetics," theseProceedings.

CRYSALIS

Engelmore, R. and H.P. Nii, "A Knowledge-BasedSystem for the Interpretation of Protein X-RayCrystallographic Data," Memo HPP-77-2, Departmentof Computer Science, Stanford, CA, 1977.