% -*- Mode: TeX -*-
\documentstyle[12pt]{article}

\setlength{\parindent}{2em}
\setlength{\parskip}{0ex}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}

\newcommand{\comment}[1]{}
\comment{ 
This is an almost-final draft of the following article, whose final version
I can't find...
@Article{Hirsch89,
   Author="Hirsch, David E. and Simon, Sheldon R. and Bylander, Tom and Weintraub, Michael A. and Szolovits, Peter",
   Title="Using Causal Reasoning in Gait Analysis",
   Journal="Applied Artificial Intelligence",
   Volume=3,
   Number="2-3",
   Pages="337-356",
   Year=1989}

******************************************************************
***** Comments by Peter Szolovits, 12/5/88
I have made a number of minor corrections to the manuscript, and am returning
them herewith as an update to the Latex file you sent me yesterday.  (By the
way, you needn't bother with the dvitty file, as it's more convenient for me
just to run Latex.)  The corrections are relatively minor:

1.  "Data" is plural, and I have in a few places changed the usage to reflect
this.  "Gastoc" is really "Gastroc" consistently.  I think I fixed a couple of
other typos.

2.  You had "%" where you meant \% in the analysis of Dr.Gait1 section, thus
eating the rest of the line.

3.  You need to either enclose "\drgait" in braces or follow it with "\ " to
make sure that the terminating space isn't eaten by TeX.  I did this.

4.  In the "causal reasoning in dr. gait-2" section, there was a crucial "not"
missing in the sentence "Unfortunately, the equation can *** be
straightforwardly solved ..."  I supplied it.

The footnote about the physical incorrectness of the torque model deserves
promotion to the main text, I think.  I changed to wording slightly to 
indicate that it's not just an incidental problem, but maybe it deserves more 
explicit mention as in the comment near the end here.

In the discussion of Dr. Gait-2, the example diagnosis and explanation seems
pulled out of a hat, because the text only goes through how the problem 
summary is generated, not its primary cause(s).  We need a line or two 
indicating how we get from "increased flexion during 2nd half swing" + "right 
hamstring is not weak" to the two causes given.  I don't have Dave's thesis at 
hand right now, but is it in fact the case that the two increased torques are 
due one to NORMAL firing and one to ABNORMAL firing of the corresponding 
muscles?  Why is this?

I must say that the description of Dr. Gait-2 has improved immeasurably from
the version of Dec. 1 (the cut-and-paste from Dave's turgidly-written
thesis).  I'm looking forward to the section describing QWADS, to see where 
you guys are heading.  Hope this is helpful.  --Pete

P.S.  Flush this comment from the text.
******************************************************************}


\renewcommand{\thepage}{}

\newcommand{\ltdiff}{\mbox{$<$diff}}
\newcommand{\eqdiff}{\mbox{$=$diff}}
\newcommand{\gtdiff}{\mbox{$>$diff}}
\newcommand{\drgait}{{\sc Dr.~Gait-1}}
\newcommand{\drgaitt}{{\sc Dr.~Gait-2}}
\newcommand{\quawds}{{\sc Quawds}}

\begin{document}

\bibliographystyle{plain}
\setcounter{page}{0}
\pagestyle{myheadings}
\markright{\protect\small DRAFT \hfill\today\hfill page \protect\arabic{page}}

\normalsize

\ \vfill

\begin{center}
\LARGE Using Causal Reasoning in Gait Analysis\footnote{This is a
nearly-final draft of the paper that appeared as  D. E. Hirsch,
S. R. Simon, T. Bylander, M. A. Weintraub, and P. Szolovits. Using
causal reasoning in gait analysis. {\em Applied Artificial
Intelligence}, 3(2-3):337-356, 1989. The final version is not
available on-line.}
\normalsize \\
\end{center}

\vfill

\begin{center}
David E. Hirsch$^{\mbox{*}}$ \\
Department of Electrical Engineering and Computer Science \\
Massachusetts Institute of Technology \\
\ \\
Sheldon R. Simon \\
Department of Surgery \\
The Ohio State University \\
\ \\
Tom Bylander and Michael A. Weintraub \\
Department of Computer and Information Science \\
The Ohio State University \\
\ \\
Peter Szolovits \\
Department of Electrical Engineering and Computer Science \\
Massachusetts Institute of Technology
\end{center}

\vfill

\begin{center}
This is a draft printed \today.
\end{center}

\vfill

\subsection*{Abstract}

An outstanding abstract will be put here.

\vfill

$^{\mbox{*}}$David E. Hirsch is now at Price Waterhouse.

$^{\mbox{**}}$Correspondence should be sent to Tom Bylander, The Ohio
State University, Computer and Information Science, Columbus, OH
43210, USA 

$^{\mbox{***}}$We acknowledge everybody and anybody that we should.
\newpage

\begin{center}
\LARGE Using Causal Reasoning in Gait Analysis \normalsize \\
\ \\
David E. Hirsch, Sheldon R. Simon, \\
Tom Bylander, Michael A. Weintraub, and Peter Szolovits
\end{center}

\section{Introduction}

Diagnosis is the task of explaining a set of observations in terms of
malfunctions and their causes.  \comment{Diagnostic knowledge is
commonly represented either as experiential knowledge or qualitative
physical model.  In complex diagnostic situations, neither
representation is adequate for the entire task.\cite{ijcaipaper}} This
paper describes a series of experiments in which expert diagnostic
systems were constructed to analyze human pathologic gait.  The
experiments consist of three different systems all utilizing the
knowledge provided by one of the authors (Simon).  The difference
between each successive system is the recognition of the need for both
causal reasoning about the process of gait and for experiential
reasoning that can control the complexity of causal reasoning.

The first system (\drgait), developed by three of us (Hirsch,
Simon, and Szolovits) at MIT and Harvard, relies exclusively on
experiential domain models.  \drgait's success in diagnosing cases
is quite limited.  The second system (\drgaitt), also developed by
the same three people, is primarily based on a qualitative causal
model of gait.  \drgaitt\ overcame many of the difficulties faced by
the first system, but its ability to diagnose cases is limited by
computational complexity.  The third system (\quawds, for QUalitative
Analysis of Walking Disorders), currently being developed by three of
us (Bylander, Weintraub, and Simon) at The Ohio State University, is
an experiment in integrating causal reasoning with experiential
reasoning so that robust conclusions can be produced efficiently.

First, we briefly describe the domain of gait analysis.  Next, we
discuss each system in turn, with special attention given to the role
of causal reasoning within each system.  Due to space limitations, our
descriptions are necessarily brief and simplified.  Also, our
attention is mainly focused on the diagnostic functions of these
systems although they also provide recommendations for therapy.  For
further information on \drgait\ and \drgaitt, see Hirsch
\cite{HirschThesis}.  For further information on \quawds, see Bylander
et al. \cite{Bylander??}.


\section{The Domain of Human Pathologic Gait}

Normal gait is efficient, adaptable, pain-free and requires no
ancillary devices.  In a normal person, the neurological system
controls the muscles through coordinated commands to rotate limbs at
several joints, providing body propulsion and stability for walking.
A gait cycle consists of the time between a heel strike and the next
heel strike of the same foot.  The most significant events of the gait
cycle are right heel strike (RHS), left toe-off (LTO), left heel
strike (LHS), and right toe-off (RTO), which delimit the major phases
of gait: weight acceptance (WA), single limb stance (SLS), weight
release (WR), and swing.  Figure \ref{gait-cycle} illustrates these
events and phases for each leg.

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{4in}
\caption{Important Events and Phases in the Gait Cycle}
\label{gait-cycle}
\rule{\textwidth}{.01in}
\end{figure}

The domain of \drgait\ and \drgaitt\ is restricted to pathologic
gait resulting from the neurological disease of cerebral palsy.  This
disease directly affects the brain, and manifests itself by
interfering with the control of voluntary motions.  The result of
cerebral palsy on the gait cycle is the improper coordination of
muscle activity.  It is these effects, and not cerebral palsy itself,
that is the focus in pathologic gait analysis (the fact that the
patient has CP is known before gait analysis is performed).  These
effects include muscle tightness, spasticity, and weakness, all of
which in turn affect the patient's gait motions.

Hence, the goal of diagnosis in this domain is to identify the
improper muscle activity and joint limitations that cause the
deviations observed in a patient's gait.  The input is the information
gathered by a gait analysis laboratory.  There are three types of
data: clinical, historical, and motion.  Clinical data result from
the physical examination of the patient and determine both the range
of motion of the different joints and a qualitative measure of the
strength of different muscle groups.  Historical data include
information about any past medical procedures or diagnoses.  Motion
data specify the angular position of the patient's joints (hips,
knees, and ankles) during the different gait phases and are recorded in
all three planes.  Motion data also includes EMG (electromyograph)
data of selected muscle groups, indicating when nervous stimulation
occurs during the gait cycle.  Figure \ref{gait-data} shows what some
of this information looks like.  Typically, all of this data is
gathered before a gait analysis is performed.

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{4in}
\caption{Some of the Data used in Gait Analysis}
\label{gait-data}
\rule{\textwidth}{.01in}
\end{figure}

This domain is complex for a number of reasons.  Patients with
neurological disorders such as cerebral palsy have a wide variation of
muscle and joint faults, and typically each patient has multiple
faults.  Reasoning about multiple faults is difficult because gait
involves a number of highly interacting components and processes.  The
domain is further complicated because the system attempts to
compensate for faults.  Furthermore, many gait parameters cannot be
directly measured given current technology.  For example, EMG data is
at best a qualitative measure of muscle forces \cite{Simon}.


\section{\drgait}

\drgait\ is the first of the expert systems in pathologic gait
analysis that we have developed.  This system relies exclusively on
experiential reasoning, and as such, no explicit causal reasoning is
performed.  \drgait\ operates strictly by associating patterns of
observations with causes.


\subsection{Functional Organization of \drgait}

\drgait\ analyzes the motion of one leg in one plane, specifically
the angular positions of the hip, knee, and ankle in the sagittal
plane, which is the view from the side.  The primary inputs are scaled
motion data and interpreted EMG data.  The motion data is grouped by
phases with single limb stance and swing split into two halves and is
scaled by $5^{\circ}$ increments and decrements from normal.  The
scale ranges from markedly decreased ($25^{\circ} <$ normal) to
markedly increased ($25^{\circ} >$ normal).  Figure
\ref{scaled-motion} illustrates scaling of motion.  The scaling was
performed by hand for \drgait, but was automated when {\drgaitt}
was implemented.

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{2in}
\caption{Example Scaling of Motion}
\label{scaled-motion}
\rule{\textwidth}{.01in}
\end{figure}

The EMG data is interpreted to determine if a given muscle was on or
off in a particular phase.  Figure \ref{interp-emg} shows an example
EMG interpretation.  This interpretation is performed by a domain
expert.  Current research is investigating how to automate EMG
interpretation.

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{2in}
\caption{Example Interpretation of EMG}
\label{interp-emg}
\rule{\textwidth}{.01in}
\end{figure}

Based on this data, \drgait\ does diagnosis by performing three
subtasks:
\begin{enumerate}
 \item Match Patterns.  For each joint, match the pattern of motion
across the phases to a set of precompiled patterns of motion.

 \item Match Faults.  Using the motion patterns plus information about
EMG, determine the general faults of the patient.

 \item Specialize Faults.  The descriptions of the faults are
specialized for the particular phases in which the faults appear.
\end{enumerate}
Each of these tasks are performed by a set of rules that directly map
inputs to outputs.  Figure \ref{gait1} illustrates these functions.

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{2in}
\caption{Functions Performed by \drgait}
\label{gait1}
\rule{\textwidth}{.01in}
\end{figure}

Figure \ref{gait1-rules} illustrates a rule for each of \drgait's
diagnosis subtasks.  They are stated in English for the convenience of
the reader.  The first rule looks for a particular pattern of ankle
motion, namely whether the ankle has increased dorsiflexion (bent
towards the shank more than normal) during SLS.  Based on this
pattern, the second rule will conclude that the gastroc/soleus muscle
(the calf muscle) is weak.  Note that the rule does not require an
exact match of the pattern since other conditions of the rule consider
specific motions.  The third rule specializes this diagnosis if
increased dorsiflexion only occurs during the first half of single
limb stance.  If this chain of rules fires, \drgait\ will reach the
following conclusion:
\begin{quote}
Abnormal dorsiflexion during the first half of single limb stance is
noted.  Gastroc/soleus activity is unable to counteract body weight
dorsiflexion torque.
\end{quote}

\begin{figure}
\rule{\textwidth}{.01in}

\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{l@{\ }p{6in}}
if & the ankle position during WA is within normal range, and \\
   & the ankle position during the first half of SLS is at least
     mildly increased, and \\
   & the ankle position during the second half of SLS is at least
     mildly increased, and \\
   & the ankle position during WR is within normal range, and \\
   & the ankle position during the first half of swing is within
     normal range, and \\ 
   & the ankle position during the second half of swing is within
     normal range; \\
then & conclude pattern of abnormal dorsiflexion during SLS. \\
\ \\
if & there is a pattern of abnormal dorsiflexion during SLS, or \\
   & the ankle position during the first half of SLS is at least
     mildly increased, or \\
   & the ankle position during the second half of SLS is at least
     mildly increased; \\
then & conclude weak gastroc/soleus muscle causing abnormal
       dorsiflexion during SLS. \\
\ \\
if & there is a weak gastroc/soleus muscle causing abnormal
     dorsiflexion during SLS, and \\
   & the ankle position during the first half of SLS is at least
     mildly increased, and \\
   & the ankle position during the second half of SLS is not at least
     mildly increased; \\
then & specialize diagnosis to first half of SLS.
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}

\caption{Example Rules of \drgait}
\label{gait1-rules}
\rule{\textwidth}{.01in}
\end{figure}


\subsection{Analysis of \drgait}

\drgait\ was informally tested on 20 cases.  The testing included
comparing the system's performance to a domain expert over the tasks
of identifying motion deviations and the identifying the deviation's
causes.  On simple cases---60\% of the test cases---{\drgait}
identified 80\% of the major deviations, and identified the causes
correctly.

However, \drgait\ has difficulties with harder cases, due to several
reasons.  First, \drgait\ only uses empirical pattern matching in
its problem solving.  Only patients whose symptoms match exactly the
situations described by the rules can have their gait adequately
analyzed by the program.  Adding new rules to cover each new specific
situation is not an adequate solution because there are a
combinatorial number of multiple fault possibilities.

A second problem is that nothing checks the consistency of the
program's conclusions with the patient data.  If a rule concludes
hamstring overactivity, then this is given as an answer regardless of
whether there is additional data that would discredit this hypothesis.

A related problem is that the explanations offered by the rule base is
poor.  The only types of explanations the system can give are run-time
trace explanations.  These explanations detail the sequence of
diagnostic reasoning of the case, and identify how certain
observations or problem states match to the knowledge base.  However,
the system is unable to justify its conclusions in terms of how the
patient's motions are caused by the hypothesized faults.

Finally, another problem is the lack of intermediary concepts
contained within the system.  The system is always matching a set of
observations directly to a fault.  None of \drgait's rules capture
concepts common across a large number of situations.  

Taking all of this into account, an underlying domain model is needed
that can determine interactions in the domain and can formulate
reasonable explanations.  The key to doing this is to use some
understanding about how gait is caused, namely that the joints'
motions are caused by the combination of several torques.


\section{\drgaitt}

If a gait analysis system could reason about the combined effects of
muscles, joints, weight, and momentum on joint rotation, then it would
be able to propose and evaluate faults based on a causal understanding
of the domain.  The opportunity then exists to focus on particular
abnormal motions and consider only those fault hypotheses that are
causally relevant.  The opportunity also exists to determine the {\em
completeness} of a multiple fault hypothesis, i.e., whether it
accounts for the observed gait.  Observations that are not accounted
for can become the focus for further reasoning.  Because of its
capability for causal reasoning, \drgaitt\ is a better, more robust
system than \drgait.


\subsection{Functional Organization of \drgaitt}

Just like \drgait, \drgaitt\ only analyzes the hip, knee, and
ankle motions of one leg in the sagittal plane (side view). 
Again like \drgait, the primary inputs are scaled
motion data and interpreted EMG data.  To do diagnosis, {\drgaitt}
does the following series of subtasks:
\begin{enumerate}
 \item Identify Deviations.  A motion deviation must be $10^{\circ}$
or more from normal to be important enough to explain.  As in \drgait,
these are grouped by joint and phase with SLS and swing split into two
halves.

 \item Diagnose Classes of Causes.  Currently there are three classes
of causes:
\begin{enumerate}
 \item Limited range of motion.  This is associated with very
restricted ranges of motion throughout the gait cycle by any of the
joints, such that the motion can be attributed to co-contractures of
opposing muscles.  To conclude this class, the patient data must
indicate that the opposing muscles are continuously active.

 \item Contracture.  This is associated with restricted motion of a
joint throughout the gait cycle caused by tight muscles or tight joint
capsules.  To conclude this class, the contracture must be specified
in the patient data.

 \item Dynamic.  If an abnormal motion is not explained by either of
the above two classes, then its cause is considered to be dynamic,
i.e., caused by the particular dynamics of the muscles during that
phase of the gait.
\end{enumerate}

 \item Diagnose Dynamic Causes.  \drgaitt\ uses its causal model of
gait to generate and select hypotheses.  An assumption-based truth
maintenance system \cite{Dekleer86} is used to ensure that no
hypotheses conflict with each other.
\end{enumerate}
Figure \ref{gait2} illustrates these functions.  The operation of the
causal model is described in the following two sections.

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{2in}
\caption{Functions Performed by \drgaitt}
\label{gait2}
\rule{\textwidth}{.01in}
\end{figure}


\subsection{Causal Reasoning in \drgaitt}

\comment{Lots of text from Hirsch's thesis}

\drgaitt's causal reasoning about torques is the heart of the
system.  As mentioned above, the rotational motion at a joint is the
result of the combination of torques acting upon this joint.  The
knee's motion, for example, is determined by all the torques acting
upon the knee.  For the knee, \drgaitt\ reasons about the torques
caused by the hamstrings (back muscles of the thigh), the quadriceps
(front muscles of the thigh), the gastroc/soleus (the calf muscles),
body weight, and body momentum.  If the knee's position is abnormal,
then \drgaitt\ infers that at least one of the torques is
abnormal.\footnote{In an accurate physical model, abnormal torque results in
abnormal angular acceleration, which usually, but not always, results
in abnormal angular position.  One of the goals of the \quawds\ system
is to reason about the intermediate concept of angular acceleration.} If
the knee shows increased flexion, then one possibility is an increased
hamstring torque.

The total torque acting on the knee, then, must satisfy this equation:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{r@{\ }l}
knee-torque = & hamstring-torque + quadricep-torque
                + gastroc/soleus-torque + \\
              & bodyweight-torque + momentum-torque \hfill (1)
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}
However, now five torques must be considered to assign the blame for
abnormal knee position.  Unfortunately, the equation can not be
straightforwardly solved because numeric measurements of the various
torques are not available.  Consequently, qualitative reasoning is
called for, but the equation as it stands is underconstrained---an
increase in any one or any combination of the torques could account
for increased knee flexion.  To resolve these problems, {\drgaitt}
uses case data, general knowledge about gait, and heuristics about
which abnormalities are more likely.

In most problems involving search and combination, it helps to
organize the search space.  Each torque on the knee can be classified
as a {\em flexion torque} or an {\em extension torque} based on
whether the torque normally causes flexion or extension, respectively.
For the knee, the quadricep-torque is a flexion torque and the
hamstring-torque and gastroc/soleus-torque are extension torques.  The
classification for bodyweight-torque and momentum-torque depends on
the phase of the gait.  We also classify a torque as {\em internal} if
it is produced locally or {\em external} otherwise.  All muscle
torques are internal, while the bodyweight and momentum torques are
external.  Using these categories the torques can be organized as a
tree as shown in Figure \ref{torque-tree}.\footnote{The
``bodyweight-torque'' in the figure includes the effects of both
bodyweight and momentum.}

\begin{figure}
\rule{\textwidth}{.01in}
\vspace{2in}
\caption{Torque Tree for Knee in Second Half of Swing}
\label{torque-tree}
\rule{\textwidth}{.01in}
\end{figure}

The tree in Figure \ref{torque-tree} organizes Equation 1 as the
following set of equations:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{l@{\ }c@{\ }ll}
knee-torque               & = & flexion-torque $-$              \\
                          &   & extension-torque          & (2) \\
flexion-torque            & = & internal-flexion-torque   & (3) \\
extension-torque          & = & internal-extension-torque +     \\
                          &   & external-extension-torque & (4) \\
internal-flexion-torque   & = & hamstring-torque +              \\
                          &   & gastroc/soleus-torque     & (5) \\
internal-extension-torque & = & quadricep-torque          & (6) \\
external-extension-torque & = & extension-BW-torque       & (7)
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}
Now that \drgaitt\ has all of these equations, how can they be used?
The scaled gait motions indicates whether a joint's position is
increased, decreased, or normal.  Similarly, the torques are described
as increased, decreased, or normal.  \drgaitt\ solves the equations
using these qualitative values by employing de Kleer's incremental
qualitative (IQ) algebra \cite{Dekleer79}.  The rules for IQ
addition are shown in Table \ref{iq}.  In the table, $\uparrow$
stands for increased, $0$ stands for normal, $\downarrow$ stands
for decreased and $?$ stands for unknown.

\begin{table}
\rule{\textwidth}{.01in}
\[\begin{array}{c|c|c|c|}
            +     & \downarrow & 0          & \uparrow \\
\hline \downarrow & \downarrow & \downarrow & ?        \\
\hline 0          & \downarrow & 0          & \uparrow \\
\hline \uparrow   & ?          & \uparrow   & \uparrow \\
\hline
\end{array}\]
\caption{IQ Addition Table}
\label{iq}
\rule{\textwidth}{.01in}
\end{table}

In the two unknown cases in Table \ref{iq}, more information is needed
to disambiguate the answer.  To do this, we introduce the relations 
\ltdiff, \gtdiff, and \eqdiff.  The statement $A\ \ltdiff\ B$ says that
``$A$ has a smaller deviation from normal than $B$''.  Thus, if $A$ is
increased, $B$ is decreased, and $A\ \ltdiff\ B$, then $A+B$ is
decreased, i.e., $B$'s decrease from normal is greater than $A$'s
increase from normal.  Using these relations, we have constructed a
modified IQ addition table, which is shown in Table \ref{newiq}.

\begin{table}
\rule{\textwidth}{.01in}
\[\begin{array}{cc|c|c|c|}
 \multicolumn{2}{c}{} & \multicolumn{3}{c}{B} \\
            &      +     & \downarrow   & 0          & \uparrow \\
\cline{2-5} & \downarrow & \downarrow   & \downarrow & \mbox{case2} \\
\cline{2-5} A & 0        & \downarrow   & 0          & \uparrow \\
\cline{2-5} & \uparrow   & \mbox{case1} & \uparrow   & \uparrow \\
\cline{2-5}
\end{array}\]

\[\mbox{case1} = \left\{ \begin{array}{ll}
                         \uparrow   & \mbox{if}\ A\ \gtdiff\ B \\
                         0          & \mbox{if}\ A\ \eqdiff\ B \\
                         \downarrow & \mbox{if}\ A\ \ltdiff\ B
                         \end{array}
                 \right.
\hspace{.5in}
 \mbox{case2} = \left\{ \begin{array}{ll}
                         \uparrow   & \mbox{if}\ A\ \ltdiff\ B \\
                         0          & \mbox{if}\ A\ \eqdiff\ B \\
                         \downarrow & \mbox{if}\ A\ \gtdiff\ B
                         \end{array}
                 \right. \]

\caption{Modified IQ Addition Table}
\label{newiq}
\rule{\textwidth}{.01in}
\end{table}

Since no numeric measurements for the torques are available, it is
uncertain whether a torque is increased or decreased and whether the
relationship between two torques is \ltdiff, \eqdiff, or \gtdiff.
However, hypotheses about the amount of and relationships between
torques can be made.  In the context of a single torque tree,
\drgaitt's strategy is to hypothesize everything that is physically
reasonable and then use heuristic knowledge about cerebral palsy to
choose the best set of hypotheses.  This hypothesis set corresponds to
the diagnosis for that joint and phase.  Since there are other torque
trees for other joints and phases, \drgaitt\ must in addition ensure
that all of the hypotheses that are chosen are consistent with each
other.  To maintain consistency, a support system based on de Kleer's
assumption-based truth maintenance system (ATMS) was used
\cite{Dekleer86}.  That is, each set of hypotheses produced by
processing a torque tree corresponds to a set of assumptions.  Thus,
by maintaining consistency between assumptions, the ATMS also
maintains consistency of the overall diagnosis.

\subsection{Example of Causal Reasoning in \drgaitt}

How does \drgaitt\ apply a torque tree to patient data?  We discuss
this question in the context of a particular example.  Suppose that
during the second half of swing the patient's knee has increased
flexion and the following data is describe muscle activity:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{lll}
\underline{Muscle} &
          \underline{Usual Activity} & 
                            \underline{Actual Activity} \\
gastroc/soleus     & off             & on \\
hamstrings         & on              & on \\
quadriceps         & off             & off
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}
``Usual Activity'' indicates normal muscle activity, while ``Actual
Activity'' is the EMG interpretation for the patient.  Figure
\ref{torque-tree} is the relevant torque tree in this situation and
Equations 2-7 are the relevant torque equations.

First, \drgaitt\ uses domain knowledge to determine the possible
values of the lowest level torques (muscle torques and
bodyweight-torque), which are as follows:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{l@{\ }l@{\ }l@{\ }l}
hamstring-torque & $\in$ & 
        \{ & $\langle$increased, \{hamstring not weak\}$\rangle$, \\
       & & & $\langle$decreased, \{hamstring weak\}$\rangle$ \} \\
gastroc/soleus-torque & $\in$ & \{ & $\langle$increased, \{\}$\rangle$ \} \\
quadricep-torque & $\in$      & \{ & $\langle$normal, \{\}$\rangle$ \} \\
extension-BW-torque & $\in$   & \{ & $\langle$decreased, \{\}$\rangle$ \}
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}
Each torque value has the form $\langle V, \{A_{1}, A_{2}, \ldots
\} \rangle$ where $V$ is increased, normal, or decreased and each
$A_{i}$ is a hypothesis about a torque or torques; each $A_{i}$ is
treated as an assumption by the ATMS.  At this level, the
hamstring-torque could conceivably be increased or decreased because
the hamstrings could either be overly weak or strong.  The
gastroc/soleus-torque is increased because the gastroc/soleus is on
when it is normal to be off.  The quadricep-torque is normal because
the quadriceps is off as it is normally should be.  The
extension-BW-torque is decreased based on other patient data not
described here.

These torque values are then propagated up to the joint's torque.
At the next level of the torque tree in Figure \ref{torque-tree}, the
following values are produced:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{l@{\ }l@{\ }l@{\ }l@{}l}
internal-flexion-torque & $\in$ & 
        \{ & $\langle$increased, \hfill \{ & hamstring not weak\}$\rangle$, \\
       & & & $\langle$increased, 
          \hfill  \{ & gastroc/soleus-torque\ \gtdiff\ hamstring-torque, \\
       & & &       & hamstring weak\} $\rangle$, \\
       & & & $\langle$normal, 
          \hfill  \{ & gastroc/soleus-torque\ \eqdiff\ hamstring-torque, \\
       & & &       & hamstring weak\} $\rangle$, \\
       & & & $\langle$decreased, 
                \{ & gastroc/soleus-torque\ \ltdiff\ hamstring-torque, \\
       & & &       & hamstring weak\} $\rangle$ \} \\
\multicolumn{5}{l}{internal-extension-torque
             $\in$ \{ $\langle$normal, \{\}$\rangle$ \} } \\
\multicolumn{5}{l}{external-extension-torque
              $\in$ \{ $\langle$decreased, \{\}$\rangle$ \} }
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}
Note that if the hamstrings are hypothesized to be weak, then it is
possible that the increase in gastroc/soleus-torque could exceed,
equal, or fall short of the decrease in hamstring-torque.  These
possibilities are generated using the modified IQ addition table in
Table \ref{newiq}.

At the next to last level, flexion-torque has exactly the same
possibilities as internal-flexion-torque.  Extension-torque is
decreased because external-extension-torque is decreased.

Finally, \drgaitt\ generates the possible values for knee-torque:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{l@{\ }l@{}l}
knee-torque $\in$ \{
           & $\langle$increased, \{ & hamstring not weak\}$\rangle$, \\
           & $\langle$increased, 
          \hfill\{ & gastroc/soleus-torque\ \gtdiff\ hamstring-torque, \\
           &       & hamstring weak\} $\rangle$, \\
           & $\langle$increased, 
          \hfill\{ & gastroc/soleus-torque\ \eqdiff\ hamstring-torque, \\
           &       & hamstring weak\} $\rangle$, \\
           & $\langle$increased, 
          \hfill\{ & flexion-torque\ \ltdiff\ extension-torque, \\
           &       & gastroc/soleus-torque\ \ltdiff\ hamstring-torque, \\
           &       & hamstring weak\} $\rangle$, \\
           & $\langle$normal, 
          \hfill\{ & flexion-torque\ \eqdiff\ extension-torque, \\
           &       & gastroc/soleus-torque\ \ltdiff\ hamstring-torque, \\
           &       & hamstring weak\} $\rangle$, \\
           & $\langle$decreased, 
          \hfill\{ & flexion-torque\ \gtdiff\ extension-torque, \\
           &       & gastroc/soleus-torque\ \ltdiff\ hamstring-torque, \\
           &       & hamstring weak\} $\rangle$ \}
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}
Note that because Equation 2 uses a minus sign instead of a plus sign,
the decrease in extension-torque corresponds to an increase to
knee-torque.  Thus, all the possible values of flexion-torque that are
increased or normal are possible ways for knee-torque to be increased.
If flexion-torque is decreased, again Table \ref{newiq} must be used
to generate possible values of knee-torque based on the possible
relationships between flexion-torque and extension-torque.

Imposing the known constraint that the knee-torque is increased causes
the system to remove inconsistent values.  This leaves four possible sets
of hypotheses that account for increased knee flexion in the second
half of swing.  To select one of the set, each set is scored by using
domain heuristics that score each hypothesis on the basis of how
likely it is to occur in cerebral palsy patients.  For example, for CP
patients it is unlikely that a muscle is weak, so hypotheses about
muscle weakness will receive a high score (higher means less likely).
On the other hand, it is very likely that a muscle is overactive, so
these hypotheses will receive low scores.  The score for a set of
hypotheses is the sum of the scores of its elements.  The lowest
scoring set (the most likely one) is selected to be the best possible
explanation of the torque's value.  Based on these factors, the top
scoring set of hypotheses in the example is \{hamstring not weak\},
and \drgaitt\ provides the following diagnosis and explanation of the
abnormal motion:
\begin{center}
\renewcommand{\arraystretch}{.8}
\begin{tabular}{l}
{\tt Problem name: right-knee-sagittal-second-half-swing-flexion} \\
{\tt Problem summary:} \\
{\tt \ \ The right knee has increased flexion during second-half-swing.} \\
{\tt Assuming the following:} \\
{\tt 1) (patient data right hamstring muscle-strength) equals nonweak.} \\
\ \\
{\tt The PRIMARY CAUSE(s) of this problem is(are):} \\
\ \\ 
{\tt increased hamstring-torque. which is due to normal-firing} \\
{\tt of a functionally-spastic hamstring.} \\
{\tt increased gastroc-soleus-torque. which is due to abnormal-firing} \\
{\tt of a functionally-spastic gastroc/soleus.} \\
\ \\
{\tt The AUXILIARY CAUSE(s) of this problem is(are):} \\
\ \\
{\tt decreased extension-BW-torque}
\end{tabular}
\renewcommand{\arraystretch}{1}
\end{center}

It is possible that ``hamstring weak'' will be selected to diagnose
some other abnormal motion of the patient.  In this situation, the
ATMS will discover the contradiction, which results in {\drgaitt}
constructing two alternative diagnoses.  For each abnormal motion in
which ``hamstring not weak'' was selected, \drgaitt\ constructs a new
diagnosis by selecting the best sets of hypotheses that do not make
this assumption.  Constructing the other diagnosis is similar, except
that \drgaitt\ selects sets of hypotheses that do not include
``hamstring weak.''  The two alternative diagnoses are compared via
their scores and the best one is selected.\footnote{It is possible
only one of the alternatives can be constructed, e.g., ``hamstring not
weak'' might be necessary to account for some abnormal motion.  It is
also possible that no alternative can be constructed or that the
alternatives contain contradictions among other assumptions.  In these
cases, \drgaitt\ is unable to continue.}


\subsection{Analysis of \drgaitt}

We tested \drgaitt\ on 22 cases covering a range of cerebral palsy
patients.  The program's performance at identifying abnormal motions
and explaining their causes was compared to the written reports
generated by the domain expert.

In a test set of 22 cases, 170 abnormal motions were mentioned in the
reports.  \drgaitt\ identified 89\% (151) of these abnormal motions.
Most of the omissions are range of motion problems, apparently because
the triggering conditions for this class of abnormal motions are too
restrictive.  \drgaitt\ also identified 46 abnormal motions not
mentioned in the reports.  Most of these additional problems are
minor, or were perceived to be insignificant.

At identifying the causes of finding, the system found the correct
causes 95\% of the time (it was correct for 187 out of the 196
abnormal motions it found).  Most of the mistakes occurred because
\drgaitt\ doesn't know to what degree particular muscles can influence
the various joints.  The other errors resulted from an incorrect
modeling of body weight at the knee during WA.

It appears then that \drgaitt\ is very successful at identifying
abnormal motions and diagnosing their causes.  With some refinements
to the knowledge base, it is possible that its performance on these
tasks could be even better.  The improved performance over \drgait\ can
be directly attributed to the causal model of the domain.  \drgaitt\ is
able to overcome many of the holes in \drgait's knowledge by deriving
the relationships between observations and faults rather than relying
solely on precompiled associations.

Nevertheless, \drgaitt\ still has several limitations.
The representation of time in \drgaitt\ is very elementary.  The gait
cycle is divided into a fixed number of phases and each phase is
treated as a single point of time.  This temporal representation
makes it hard to specify intervals of interest by the actions and
events of a particular patient's gait.

The qualitative torque model does not consider several factors that
determine the relative amount of torque that a muscle can produce.
For example, the torque of a muscle is affected by the joint's
position.  Also, the model does not also recognize the relative
strengths of opposing muscles acting on a joint.

If \drgaitt\ determines that there is a joint contracture, then the
qualitative torque model is not applied to that joint.  The
contracture should be represented as a special kind of torque that
occurs only when the joint's position is at the limit of its range of
motion.

\comment{
The qualitative torque model only explains deviations from normal
position, which limits its functionality.  As noted above, torques
result in angular acceleration, which then lead to angular position.
\drgaitt's qualitative model does not describe the torques within a
normal gait cycle, but only tries to explain deviations from normal,
limiting its functionality.
 	}

Furthermore, \drgaitt\ is limited in its domain, viz., analyzing the
motions of one leg in the sagittal plane in a single visit by a
patient with cerebral palsy.  Human gait involves coordination
between both legs, and although sagittal plane motion is the most
important, movements in other planes affect one's gait.  Patients are
often analyzed more than once, e.g., before and after treatment; it
would be useful to determine how the patient's gait has (or has not)
improved.  Also, other types of disorders affect gait, including
stroke, head injuries, arthritis, muscular dystrophy, and fractures
with subsequent complications.



\end{document}
