Artificial Els&er
Intelligence
in Medicine
3 (1991) 87-93
87
A scheme of inference of regular grammars for the syntactic pattern recognition of saccadic eye movements* Martti
Juhola
Department
and Tapio
of Computer
GrGnfors
Science,
University
of Turku, Lemminkiiiaenkotu
14 A, 20520
Turku, Finland
Received May 1990 Revised August 1990
Abstract Juhola, M. and T. GrGnfors, A scheme of inference of regular grammars for the syntactic recognition of saccadic eye movements, Artificial Intelligence in Medicine 3 (1991) 87-93.
pattern
Saccadic eye movements are measured as digital signals which are then transformed to symbol strings of formal grammars. At first, saccades are identified from a digital signal by a syntactic pattern recognition technique developed earlier. Using strings we automatically infer regular grammars which can be applied to reason different types of saccades as normal, or abnormal and affected by otoneurological disorders. We have tested this scheme with some pathological saccades and found such fully automatic recognition possible at least in principle. Keywords. Digital signals; saccadic reasoning in medicine.
1.
eye movements;
syntactic
pattern
recognition;
formal grammars;
Introduction
Saccades are rapid eye movements (Fig. 1) which are investigated in clinical neurophysiology, ophthalmology, otoneurology, and psychology. \
h_. Fig. 1.
N
N
N
This signal healthy
of 10 s consists
*This work was supported
@
N-./x
of normal
1991 -
direction
(N) saccades
after the stimulus
by the Academy
of Finland.
Elsevier Science Publishers
B.V.
1,
N
subject who moved his gaze from left (down
in the opposite
0933-3657/91/%03.50
NL,
N
NW
N
N+-
of 60’
measured
in fig.)
to right (up)
movements.
from
a
and
88
M. Juhola, T. Grktfors
In this paper we present a scheme for the automatic reasoning of abnormal saccades which are affected by otoneurological disorders. Man makes saccades when he follows an appropriately moving object which his gaze. While reading a text we make saccades, too. In the laboratory setting, a patient follows a stimulus target with his gaze, e.g. a light dot reflected on the black screen or wall in front of the patient. The stimulus light is directed to move abruptly and horizontally from one location to another by a stimulator device so that the patient cannot predict the movements of the stimulus. While following such rapid jumps of the stimulus light the patient makes saccadic eye movements. We began to develop the syntactic pattern recognition of eye movements from saccades in general [6]. Thereafter, we expanded this work to other eye movements [8]. We then continued the saccade research by presenting a syntactic pattern recognition technique for the automatic differentiation of normal saccades from those affected by brainstem and cortical lesions [7, 9, lo]. All these techniques are based on the concept of applying formal grammars and languages to the identification of eye movements. Next we develop the above-mentioned technique so that it will automatically infer formal grammars for different disorders affecting saccades, instead of using manually constructed grammars as was done earlier. After an appropriate preprocessing of a digital eye movement signal saccades are first recognized from it by using the syntactic recognition method [6] which applies a program called a parser [l, 21 in order to detect saccades. After that the saccades are used for the inference of a formal grammar in the case of both brainstem and cortical lesion. As a result we obtain formal grammars which can be applied to identify saccades distorted by the two lesions. The whole process from the preprocessing to the use of inferred grammars is depicted in Fig. 2.
signal of sacwades digital
--I/
inference of regular grammar
determination of abnormal andaomal t
forming of regular automaton
1
red&as recognized and classifkd
Fig. 2.
2. Preprocessing
Stages of the recognition
and inference
of the digital eye movement
processes.
signals
At first, an eye movement signal is electro-oculographically recorded at a sampling frequency of 400 Hz and filtered with a digital median filter to eliminate noise above 70 Hz which is a good cutoff frequency [3,5]. The digital signal is divided into consecutive segments of the same length of 20 ms (9 samples for 400 Hz). This length of segments is appropriate because it is so long that saccades, the duration of which are about 20 ms or more, can be
A scheme
of inference
89
detected. In laboratory tests we are in fact interested in quite large saccades of at least 20”, since saccades of such large amplitude better reveal abnormal phenomena associated with diseases and disorders of man. On the other hand, the longer the segment length is, the smaller the number of segments which has to be considered, which means faster processing times for the computer programs. Mean angular velocity is computed for each segment as its slope by using linear regression. Actually, this operation is equivalent to the differentiation of the segments of the digital signal. The segments are transformed to a sequence of symbols, i.e. a string, by comparing the velocity value of a segment to some fixed thresholds. In the case of the brainstem lesion, saccades are much slower than usual. Their maximum velocities are essentially smaller than those of normal saccades [12]. Therefore, we can distinguish saccades influenced by brainstem lesions and normal ones by a process originally Since the maximum velocity is less than the based on the velocity value of each segment. normal velocity, we select a threshold midway between the average maximum normal and abnormal velocities. The threshold depends on the amplitude of a saccade, e.g. for 40” it is 3OO”/s and for 60” it is 35O”/s [12]. If the velocity value of a segment is below the threshold, the segment is transformed to symbol b, and if it is above the threshold, it is transformed to symbol a. In the case of the cortical lesion, a response of a large stimulus amplitude usually comprises a sequence of a few smaller saccades. The sequence of the small saccades forms steps which are to be separated from the normal, which include a large amplitude saccade possibly followed by a relatively small saccade. The task of the latter is to set accurately the amplitude of the response to correspond to the stimulus amplitude. The whole response is then the combined amplitudes of the main and corrective saccades. If the velocity value of a segment is below 400/s, the segment is transformed to symbol b, and if it is above that threshold, it is transformed to symbol a. Consequently, saccades consist of a substring of symbols a. Between small saccades there are substrings of symbols b that correspond to steps during the response of a stimulus movement. We have not mentioned the direction of the saccade. It may be to left or to right as well because the direction is already detected when the saccades are found. Thus we may state our grammatical inference problem as simply as possible, which is important, if the inference algorithms are to give the best and most general solutions.
3. Inference
of regular
grammars
In the case of the brainstem bkdbm 3
k,m>O,
lesion
from
symbol
we examine
120
strings
strings
like (11
which are used as input to a grammatical inference algorithm. There are algorithms [ll, 131 which output regular grammars. A regular grammar consists of only such productions that have on their right sides either a single terminal or a terminal followed by a nonterminal. In the case of (1) a and b are the terminals. We tested the algorithms [4] and discovered the techniques called tail-clustering and skeleton to be the best and the most versatile to consider different symbol strings. These techniques could correspond rather closely to actual minimal grammars. With minimal grammars we mean those which include as few productions and nonterminals as possible, but do generate the exactly right types of sentences of the defined formal language, e.g. like that of (1). If a string contains symbols a, i.e. 1 > 0, it is determined to be normal, otherwise we assume that it is distorted by the brainstem lesion. We experimented with two patients who
90
M. Juhola,
had brainstem lesions and one healthy healthy subject and in Fig. 3 abnormal
Fig. 3.
T. GrSnfors
subject. In Fig. 1 there saccades.
This signal of 40 s consists of saccades
(B)
affected
are normal
by the brainstem
saccades
lesion.
All the saccades are of 60”, which, being very large, reveals obvious disorders. were measured and identified as mentioned above [6]. We selected fourteen four normal saccades as denoted in Table 1.
Table
1.
They were input regular grammars GIB
Abnormal
Abnormal
NOIld
bbbbbbbbb bbbbbbbb bbbbbbbbb bbbbbbbb bbbbbbbbb bbbbbbbb bbbbbbb
bbbbbbbbbb bbbbbbbbbbbbbb bbbbbbbbbbbbbb bbbbbbbbbbbbbb bbbbbbbbbbbbbbb bbbbbbbbbbbbb bbbbbbbbbbbb
boaaobbbbb baaaaabb boaaabbb bbaaaoobb
Input strings of two patients
with brainstem
lesion and one healthy
to the inference algorithms. With both inference reduced as described in [13] to be as follows.
of the
The saccades abnormal and
subject.
algorithms
we obtained
:A+b A + aA A -+ bA
These are the productions of the inferred grammar. A being the only nonterminal as well as the start symbol. Using the productions we can generate such strings as those in Table 1 corresponding to (1). Nevertheless, GIB is far too general since it also generates strings which are not like (l), e.g. strings which begin with symbol a. Even if we cannot obviously solve this problem of the generality as far as these inference algorithms are concerned, we can take advantage of them because the inferred regular grammar also generates the requisite strings. The actual minimal regular grammar Gg would also take into account the fact that every string begins with symbol b as follows: Gg : A -+ A + B+b B + B -+ C + Cdb
bA bB aB aC bC
A scheme
of inference
91
This intuitively formed Gg is minimal as far as the numbers of the productions and nonterminals A, B, and C are concerned. In the case of GIB, abnormal saccades are separated from the normal by noticing the If in the generation of a string that (second) production only in which symbol a occurs. production is applied at least once, we conclude that the string corresponds to a normal saccade; otherwise the saccade is assumed to be abnormal. In Fig. 4 there are saccades due to cortical lesion. C
1 i
Fig. 4.
c
This signal of 40 s includes saccades (C) affected by the cortical lesion. Some saccades are classified as normal (N).
We tested with ten strings of the saccades from two patients saccades as before. The data are shown in Table 2.
Table 2.
Aboormsl
Abnormal
baoaabbaob baabbbbaaaabbbaab baaabbbbaab baabbaaabbbbaaabbbbob baabbbbaaaabbbbbbaabbab
baabbbbaaaabbbbbab baabbbbbbaaabbbaab baabbbbbaaaabbaab baaaabbbbaab baaabbbbbaaab
the same
four normal
baaaabbbbb baaaaabb baaaabbb bbaaaaabb
Input strings of two patients with cortical lesion and one healthy subject.
The saccades due to cortical subsequent string. ,+I &
and
bkza12bk3
lesion
__.bkn&&+~
consist
7
of substrings
kl,ll,L+l
>
of symbols
0,
ki,Z; > 0,
a as denoted
i = 2,n
by the
(21
As described by the previous input strings in Table 2 they comply with (2). If there are intermediate substrings of symbols b in the input string for lci, i being between 2 and 7~, which means that there are also corresponding substrings of symbols a, we conclude that the saccade is presumably affected by the cortical lesion. On the other hand, if there are no such intermediate substrings of symbols b and a respectively, i.e. ki and li are equal to zero for all i between 2 and n, we conclude that the saccades are normal. Since normal large saccades are often followed by small corrective sac&es, we also check that the substrings of symbols a are long enough for the last of them not to be just a frequent corrective saccade. Furthermore, we can also check the amplitudes of the saccades corresponding to the substrings. They should not differ very much from each other for saccades due to cortical lesion, whereas the amplitude of a normal corrective saccade is perhaps less than 15% of the normal main saccade. Using the previous input strings we obtained the following reduced regular grammar with the skeleton algorithm [13].
92
M. Jnhola,
T. Gr6nfors
GIG :A-+aA
A + bA A + aB A --+aC B-b B -+ bC C + bB This Grc is overgeneralizing like GIB because it generates, with the first and second productions, strings in which there are freely combined symbols a and b. Instead, a minimal regular grammar should take all restrictions set by (2) into account as follows:
Gc : A --+bA A + bB B -+ aB B -+ aC B -+ aA C + bC C-b The inferred productions of GIB and GIG depend on the input strings applied. Because we can input only a limited number of strings, the inferred grammars commonly include some weaknesses, in that they are not the actual minimal grammars, or they are too general in accepting strings that do not belong to the language from which the sample strings are taken. However, since they accept strings representing saccades, both normal and abnormal, we can employ them in the determination of the saccades in these cases.
4. Reasoning
of the saccades
We have shown how to model saccades with a syntactic technique [6] and how to infer regular grammars to represent abnormal saccades due to brainstem and cortical lesions. The determination procedure for the saccades would be implemented as described in Fig. 2 and as follows. At first, the saccades are identified [6] and the parts of the signals corresponding to the saccades are preprocessed as mentioned above. A grammar is inferred, e.g. as GIB or Glc, by the skeleton method [13], which is obviously one of the best and most versatile inference algorithms. Since the inferred grammar is regular, there are algorithms [l, 21 to generate a regular automaton or parser which use the grammar and accept the strings We add the rules above concerning of the normal and abnormal saccades as their input. assumptions about abnormal and normal saccades to the procedure. Thus, we have, at least in principle, a syntactic model to describe the abnormal and normal properties of the saccades, and the model can be used for the automatic determination of these properties. A problem which might remain in practice is that, if a language much more complex than could not always produce those of (1) and (2) were used as origin, the inference algorithms valid regular grammars. Instead, they would infer such complicated grammars [4] which would not generate all acceptable and possible strings of saccades. The recognition and inference programs were implemented in the Pascal languages of an HP microcomputer and a MicroVax computer.
A scheme
ofinference
93
Acknowledgements The authors ryngology, the signals.
are grateful to Ilmari PyykkS, M.D., from the Department University of Helsinki, Finland, for otoneurological advice
of Otorhinolaas well as test
References [l]
A.V. Aho and J.D. UIIman, The Theory of Parsing, wood Cliffs, NJ, 1972).
[2] A.V. Aho, R. Sethi and J.D. Ullman, Reading, MA, 1986).
Compilers:
[3] A.T. BahiIl, A. Brockenbrough and B.T. Troost, for saccadic eye movements, Invest. Ophthalmol.
and Compiling
Translation, Principles,
Techniques
of inference
[S] M. Juhola, V. Jantti and I. Pyykkij, Effect of sampling frequencies velocity of saccadic eye movements, Biol. Cybern. 53 (1985) 67-72. method
for analysis of saccadic
methods
data base
of regular grammars,
on computation
eye movements,
Engle-
Tools (Addison-Wesley,
Variability and development of a normative Vis. Sci. 21 (1981) 116-125.
[4] T. Grijnfors and M. Juhola, Experiments and comparison submitted to IEEE Trans. Syst. Man Cybern. (1990).
[6] M. Juhola, A syntactic (1986) 353-359.
and
(Prentice-Ha&
Pattern
of the maximum 19 (5)
Recognition
[7] M. Juhola, A method for the recognition of pathological saccadic eye movements, in: Proc. IEEE 9th Annual Conf. Engineering in Medicine and Biology Society, Boston (1987) 1401-1402. [8] M. Juhola, A syntactic method for analysis of nystagmus Meth. Progr. Biomed. 26 (1988) 53-62. [9] M. Juhola, On automatic put. 22 (1988) 239-250.
diagnosis of pathological
[lo]
M. Juhoia, On the computer 9 (3) (1988) 258-268.
[ll]
L. Miclet, Regular (1980) 737-743.
classification
saccadic
and smooth
pursuit eye movements,
eye movements,
Internat.
of abnormal saccadic eye movements,
Inference with a tail-clustering
method,
IEEE
Trans.
Syst.
[13] V. Radhakrishnan and G. Nagaraja, Man Cybern. 17 (6) (1987) 982-992.
Inference of regular grammars
J. Biomed.
Innov. Man
[12] I. Pyykkij and L. Schaldn, Evaluation of tests for the detection of central vestibular Oosterveld, ed., Otonevrotogy (John Wiley, New York, 1982) 157-194. via skeletons,
Comp. Com-
Tech. Biol. Med. Cybern.
10 (11)
lesions, in: W.J. IEEE
Trans.
Syst.