BMC Medical Informatics and Decision Making

Background: The complexity of our contemporary medical practice has impelled the development of different decision-support aids based on artificial intelligence and neural networks. Distributed associative memories are neural network models that fit perfectly well to the vision of cognition emerging from current neurosciences.


Background
The extreme complexity of contemporary medical knowledge together with the intrinsic fallibility of human reasoning, have led to sustained efforts to develop clinical decision support systems, with the hope that bedside expert systems could overcome the limitations inherent to human cognition [1]. Despite the foundational hopes have not been fulfilled [2], the unaltered and increasing necessity for reliable automated diagnostic tools and the important benefit to society brought by any success in this area make every advance valuable.
To further the research on computer-aided diagnosis begun in the 1960s, models of neural networks [3] have been added to the pioneering work on artificial-intelligence systems. The advent of artificial neural networks with ability to identify multidimensional relationships in clinical data might improve the diagnostic power of the classical approaches. A great proportion of the neural network architectures applied to clinical diagnosis rests on multilayer feed-forward networks instructed with backpropagation, followed by self-organizing maps and ART models [4,5]. Although they perform with significant accuracy, this performance nevertheless remained insufficient to dispel the common fear that they are "blackboxes" whose functioning cannot be well understood and, consequently, whose recommendations cannot be trusted [6].
The associative memory models, an early class of neural models [7] that fit perfectly well with the vision of cognition emergent from today brain neuroimaging techniques [8,9], are inspired on the capacity of human cognition to build semantic nets [10]. Their known ability to support symbolic calculus [11] makes them a possible link between connectionist models and classical artificialintelligence developments.
This work has three main objectives: a) to point out that associative memory models have the possibility to act as expert systems in medical diagnosis; b) to show in a simple and straightforward way how to instruct a minimal expert system with associative memories; and c) to encourage the implementation of this methodology at large scale by medical groups. Therefore, in this paper we address -in a tutorial approach -the building of associative memory-based expert systems for the medical diagnosis domain. We favour a comprehensive way and the possibility of a straightforward implementation by medical groups over the mathematical details of the model.

Context-dependent autoassociative memories with overlapping contexts
Associative memories are neural network models developed to capture some of the known characteristics of human memories [12,13]. These memories associate arbitrary pairs of patterns of neuronal activity mapped onto real vectors. The set of associated pairs is stored superimposed and distributed throughout the coefficients of a matrix. These matrix memory models are content-addressable and fault-tolerant, and are well known to share with humans the ability of generalization and universalization [14].
In the attempt to overcome a serious problem of these classical models -their impossibility to evoke different associations depending on the context accompanying a same key stimulus-Mizraji [15] developed an extension of the model that performs adaptive associations. Contextdependent associations are based on a kind of second order sigma-pi neurons [16], and showed an interesting versatility when they were incorporated in modules employed to implement chains of goal-directed associations [17], disambiguation of complex stimuli [18], logical reasoning [19,20], and multiple criteria classification [21].
A context-dependent associative memory M acting as a basic expert system is a matrix where d i are column vectors mapping k different diseases (the set {d} is chosen orthonormal), and s j(i) are column vectors mapping signs or symptoms accompanying the i disease (also an orthonormal set). The sets of symptoms corresponding to each disease can overlap.
The Kronecker product () between two matrices A and B is another matrix defined by A B = a(i, j)·B (2) denoting that each scalar coefficient of matrix A, a(i, j), is multiplied by the entire matrix B. Hence, if A is nxm dimensional and B is kxl dimensional, the resultant matrix will have the dimension nkxml.
Note that if d are n-dimensional and s are k-dimensional vectors, the memory is a rectangular nxnm matrix. Also, the memory M can be viewed as resulting from the Kronecker product () enlargement of each element of a nxn square autoassociative matrix d i d i T by a row column representing the sum of corresponding signs and symptoms: By feeding the context-sensitive autoassociative module M with signs or symptoms, the system retrieves the set of possible diseases associated with such set of symptoms, or a single diagnosis if the criteria suffice.
At resting conditions the system is grounded in an indifferent state g. If each disease was instructed only one time, in the mathematics of the model this implies the priming of the memory with a linear combination in which every disease has an equal weight where and I is the nxn identity matrix. From (4) it is evident that, after the priming, the context-dependent memory becomes a classical memory associating symptoms with diseases. If a set of sufficient concurrent signs and symptoms is presented to the waiting memory (σ = ∑s), after iteration, a final diagnosis results.
It is important to point out that if the sets {s j(i) } corresponding to each disease were disjoint sets, then any single symptom s j(i) would be patognomonical and sufficient to univocally diagnose d i . Otherwise, the output will be a linear combination of possible diseases, each one weighed according to the scalar product between the set of actual symptoms (σ) and the set of symptoms corresponding to each different disease: , σ > d i . See Figure 1 and its legend. Forcing the sum of scalar products to unity, this output provides a probabilistic mapping of the possible diseases associated with the clinical presentation.

NUMERICAL EXAMPLE
How to instruct the memory Let us illustrate how to instruct the memory with a minimal numerical example. Consider the set of three diseases and its characteristic symptoms shown in Figure 2. The first task is to codify the sets of signs and diseases with orthogonal vectors, for which we will use the following orthogonal matrices.
According to the table and equation (1), we instruct the memory by adding a matrix for each disease. For the first disease we have d 1 d 1 T (s 1 + s 3 + s 4 ) T In the same way we will have two other matrices for the other diseases. The sum of the three matrices constitutes the memory M.
How the system works See also Figure 1 and its legend.

Time step 1
Initial state of the system: Indifferent vector g T = (d 1 + d 2 +

Diseases
Signs & symptoms Resulting probabilistic map:

Final result
The system has arrived to an only final diagnosis that corresponds to disease 2.

REAL DATA APPLICATION -diagnosing late-onset neonatal sepsis
Late-onset sepsis (invasive infection occurring in neonates after 3 days of age) is an important and severe problem in infants hospitalized in neonatal intensive care units (NICUs) [22]. The clinical signs of infection in the newborn are variable, and the earliest manifestations are often subtle and nonspecific. In the presence of a clinical suspicion of sepsis an early and accurate diagnosis algorithm would be of outstanding value but is not yet available [23]. In a recent retrospective study that included 47 neonates with clinical diagnosis of suspected sepsis, Martell and collaborators [24] assessed a group of clinical and laboratory variables -surgical history, metabolic acidosis, hepatomegalia, abnormal white blood cell (WBC) count, hyperglycemia and thrombocytopenia-determining their sensitivity, specificity, likelihood ratio and post-test prob-prob( ) . . 1 0 5 A module with diagnostic abilities Figure 1 A module with diagnostic abilities. The neural module receives the input of two vectors: one representing the set of possible diseases up to the moment and the other vector corresponding to a new sign, symptom or laboratory result. The action of the neurons that constitute the neural module can be divided into two sequential steps: the Kronecker product of these two entries and the association of this stimulus with an output activity pattern. This output vector is a linear combination of a narrower set of disease vectors that can be reinjected if a new clinical data arrives or can be processed to obtain the probability attributable to each diagnostic decision. We instructed a context-dependent autoassociative memory according to equation (3) with data published in [24] in order to evaluate its capacity to recognize patients with or without sepsis. As a test-set, we used 15 cases of suspected neonatal sepsis coming from the same NICU (personal observations of one of us-AP). From equation (3)  The column vectors with the attributes corresponding to the septic and non-septic patients were generated from the available data as follows. For each one of the variables studied in [24] (see Figure 3 ii) A diagnosis results from the evaluation of the coefficients of the two-dimensional [result_vector]. If the first coefficient is greater than the second the case is classified as sepsis. If the second coefficient is the largest the patient is classified as non-septic.

A context-dependent memory model acting as a minimal expert system
In this work we show a minimal, context-dependent, memory nucleus able to support diagnostic abilities. Our expert system consists of an autoassociative memory with overlapping contexts and feedback loop that makes the output able to be reinjected into the memory at the next time step (Figure 1).
A memory M acting as a basic expert system is a matrix (equation 3) where the d i are column vectors mapping k different diseases (the set {d} is chosen to be orthonormal), s j(i) are column vectors mapping signs and symptoms accompanying the i disease (also an orthonormal set), and is the Kronecker product [25]-see Methods-. Note that if d are ndimensional vectors (n ≥ k), and s are m-dimensional, then d i d i T are square symmetric matrices, and the memory M is a rectangular matrix of dimensions nxnm.

The instruction of the expert
The cognitive functioning shown by this kind of neural network model is based on the establishment of contextdependent associations. The instruction of the expert therefore consists in the instruction of the memory that stores these associations.
Each disease is instructed to the memory together with its characteristic signs and symptoms (these can include the results of laboratory exams, imaging studies, etc). For this to be done, the first step is to code each disease to be instructed with a different orthonormal vector. The same must be done with the set of signs, symptoms and paraclinical results that could accompany that set of diseases, also coding them with different column vectors of any orthonormal basis of adequate dimension.
Once the signs and symptoms corresponding to each disease have been identified and expressed as orthogonal vectors, the construction of the memory can commence. According to equation (1) this instruction consists in the superposition (the addition) of different rectangular matrices, each one corresponding to a different disease.
The instruction of the memory can be developed along two different paths. a. Learning from the textbook. In this case, the expert is instructed according to the updated academic knowledge of each disease. One first disease is taken, which is coded by the column vector d i , and the outer product of this vector is made by itself (a square matrix is constructed that contains this autoassociation).  ple is presented in section Methods-How to instruct the memory-). b. Learning by experience. This is a case-based way of instructing the memory. It allows the expert to progressively capture the prevalence of the different diseases in a community. Once finalized the previous instruction, the memory is fed with the actual clinical findings of each particular patient assisted by the physician, attributing this particular constellation of signs and symptoms to the corresponding final diagnosis. The matrices resulting from new patients are progressively added to the memory. This type of representation implies two essential distinctions from the previous learning-from-the-textbook memory. Pathologies are not equally weighed in the memory but their representations depend on the frequency of presentation of cases in the population. In addition, for each disease the different symptoms also are not equally weighed: those corresponding to the more frequent clinical presentations will be strengthened.

Medical queries
Once the training phase is finalized, the system is ready to be used. The presentation of a first sign or symptom initiates a medical query. The availability of a new clinical or laboratory finding causes the expert to advance one more step in its diagnostic decision. Although we have many new signs and symptoms, in order to obtain a progressive narrowing of the set of possible diagnoses they must be presented to the expert one per time. At each step, the new data are entered into the memory along with the set of possible diagnoses until that moment. Finally, if the whole set of signs and symptoms available until the moment is sufficient, the system will arrive to a unique diagnosis.
We then follow the system operation. The starting point is when the first clinical data appears. The vector corresponding to this symptom is multiplied by means of the Kronecker product times the vector that represents the set of possible diagnoses (in the starting point it is an indifferent vector). If the memory was instructed with equallyweighed pathologies the indifferent vector is the sum of Attributes' vectors for the septic and non-septic groups all the vectors of diseases stored in the memory. If, on the contrary, the memory was instructed on the basis of individual cases, the indifferent vector will be the same linear combination of the vector diseases stored (the weight of each disease corresponds to the one of its frequency of presentation). The resulting column vector is now multiplied by the memory matrix. The exit vector contains either a univocal diagnosis (if the clinical data are sufficient) or a certain linear combination of vectors corresponding to several diseases. If a unique diagnosis was not arrived at, when one has a new sign or symptom, its corresponding vector will enter the memory after making its Kronecker product by the exit vector of the previous step. The process is repeated and stops when a final diagnosis is reached or when new clinical data is not available (see the continuation of the numerical example in section Methods-How the system works-).
Even if at a certain state a final diagnosis has not been reached, the outcome of the system nevertheless represents a probabilistic mapping of the possible diagnoses, each one with its respective probability in agreement with the data available until the moment. In order to obtain such a map in a direct way it is convenient to choose as disease vectors the columns of an identity matrix of suitable dimension. In that case, in each exit vector the positions of the coefficients different from zero mark the different possible diagnoses. Applying a normalization to this exit vector in such a way that the sum of their components is one, the value of each coefficient different from zero represents the probability of each one of those diagnoses. Otherwise, these probabilities can be obtained by multiplying the exit vector by the orthonormal matrix that codifies the diseases.

Presence of a sign Absence of a sign
Comparing this classification with the actual illness condition of the patients-shown in Figure 5 -it results that only patient 14 was misdiagnosed. The 2 × 2 table shown in Figure 6 resumes the behaviour of our diagnostic system. The sensitivity was 100% and the specificity 80%. The likelihood ratio (LR = TP/FP) was 5. Using this set of variables as input data, the performance of the system in the classification task can be evaluated as very good. It

Discussion and conclusions
We have shown here that context-dependent associative memories could act as medical decision support systems. The system implies the previous coding of a set of diseases and its corresponding semiologic findings in individual basis of orthogonal vectors. The model presented in this communication is only a minimal module able to evaluate the probabilities of different diagnoses when a set of signs and symptoms is presented to it.
This expert system based on an associative memory shares with programs using artificial intelligence a great capacity to quickly narrow the number of diagnostic possibilities [1]. Also, it is able to cope with variations in the way that a disease can present itself.
A clear advantage of this system is that the probability assignment to the different diagnostic possibilities in any particular clinical situation does not have to be arbitrarily assigned by the specialist, but is automatically provided by the system, in agreement with the acquired experience. In this sense, this neural network model is akin to statistical pattern recognition [1]. However, neither programs based on simple matching strategies nor most used neural network models are able to explain to the physician how they have reached their conclusions. On the contrary, the operation of this system, that unveils the underlying associative structure of human cognition, is transparent. Obviously, it must be understood that this is not the unique mechanism involved in human decision making. The relevant properties of this associative memory model are summarized in Figure 7 in comparison to other neural network models and rule-based artificial intelligence systems.
Beginning with a textbook-instructed memory, the system evolves accommodating (superimposing in the memory) new manifestations of disease gathered over time. This process of continued network education based on empirical evidence leads to databases representative of the different patient populations with its own geodemographical characteristics.
This model can be easily improved in various directions. The functioning of the system described up to now can be considered a passive phase (in the sense that it consists on an automatic evaluation of the available information). By adding another module to the system, consisting of a simple memory that associates diseases with the set of its findings, the expert can enhance its diagnostic performance. Remaining two or three different diagnostic hypothesis Associative memory classification Figure 6 Associative memory classification. The 15 cases tested (actual sepsis: 10; non-septic: 5) were classified as positive (S) or negative (NS) by the neural network. TP = true positive; FP = false positive; TN = true negative and FN = false negative. A total of 11 neonates were tested positive, and 4 negative. The sensitivity was 100% and the specificity 80%.

Septic
Non-septic S TP = 10 FP = 1 11 NS FN = 0 TN = 4 4 System classification 10 5 within the previous passive phase of diagnosis refinement, this new module can be fed with the vectors mapping each one of these diseases to elicit its associated set of clinical findings. The set of absent features supporting one or the other disease determines what information must be sought next.
Another important expansion of the expert allows giving up the strong assumption that all the findings correspond to a unique disease. Our context-dependent memory stops and gives a null vector when contradictory data are proportioned. To prevent such behaviour, a module akin to a novelty filter could be interposed within the recursion with the following properties: if a vector with only zero coefficients arrives, this module associates the whole set of diseases, avoiding lying aside relevant diagnoses and concurrent pathologies. However, this theme needs further investigation: as for almost every expert system [26], the clustering of findings and their attribution either to only one disease or to several disorders is a major challenge.
The primary implementation of a reduced version of the model with the aim of classifying septic or non-septic neonates showed the highly satisfactory capacity of the model to be applied to real data. We conclude that context-sensitive associative memory model is a promising alternative in the development of accuracy diagnostic tools. We expect that its easy implementation stimulate groups of medical informatics to develop this expert system at real scale.
Outstanding characteristics of different models Figure 7 Outstanding characteristics of different models. AM: associative memory; ANN: artificial neural network; AI: artificial intelligence.

AM model Other ANN models
Rule-based AI systems Dealing with non linear information + + -