**1. Introduction**

**\***

> The Trail Making Test (TMT) is a popular neuropsychological test, commonly used in clinical settings as a diagnostic tool for the evaluation of some frontal functions. It provides qualitative information on high order mental activities, including speed of processing, mental flexibility, visual spatial orientation, working memory and executive functions. Originally, it was part of the Army Individual Test Battery (1944) and subsequently was incorporated into the Halstead–Reitan Battery [1]. In general terms, the test consists of a visual search of objects in an image, where the objects are arranged in sequences of loci called regions of interest (ROIs). While classical TMT requires an individual to draw lines sequentially connecting an assigned sequence of letters and/or numbers (the ROIs) with a pencil or mouse, the same task can be performed by using the eye-tracking technology and asking the subject to fixate the sequence of ROIs in the prescribed order [2]. Poor performance is known to be associated with many types of brain impairment, in particular frontal lobe lesions. For instance, eye-tracking studies have proved their efficacy in the diagnosis of many common neurological pathologies, such as Parkinson's disease, brain trauma and neglect phenomena [3–6].

> The Visual Sequential Search Test (VSST) adopts the same principle as the TMT but is based on a precise geometry of the ROIs, being designed for the study of top-down visual search. Visual search can be quantified in terms of the analysis of the scan-path, which is a sequence of saccades and fixations. Thus, the identification of precise scores of the VSST may provide a measure of the subject's visual spatial ability and high order mental activity. Specifically, we know that visual input from the external world is actively sampled for promoting appropriate actions during everyday life; this mechanism is dynamic and involves a continuous re-sampling of spatial elements of a visual scene. The VSST is a

**Citation:** D'Inverno, G.A.; Brunetti, S.; Sampoli, M.L.; Muresanu, D.F.; Rufa, A.; Bianchini, M. Visual Sequential Search Test Analysis: An Algorithmic Approach. *Mathematics* **2021**, *9*, 2952. https://doi.org/ 10.3390/math9222952

Academic Editor: Radu Tudor Ionescu

Received: 17 October 2021 Accepted: 17 November 2021 Published: 18 November 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

repeated search task, in which patients are asked to connect by gaze a logical sequence of numbers and letters.

The main objective of the research is to identify a reliable method for the analysis of the VSST and to investigate common/different characteristics inside and outside three different subjects' classes. The first group includes patients with extrapyramidal disease who have well known difficulties in visual spatial exploration and executive functions. Thus, we predict low VSS performance in this group of patients. The second group is composed of patients suffering from chronic pain syndrome. This syndrome is not classically associated with cognitive deficits, but rather with mood changes. However, a possible deficit of attention has been suggested in patients suffering from chronic pain. If the prediction is true, the VSS performance in this group should be normal or less altered than extrapyramidal patients. The third, is a control group. The identification of a robust method of analysis and the detection of a reliable indicator for the VSST performance would allow to give a measure of executive functions in a clinical setting for diagnostic and prognostic purposes and eventually in clinical trials. Moreover, scoring the performance of such a VSST may have implications in the rehabilitation of cognitive functions and in general may be used for upgrading mental activity by exercise.

In the vast majority of the literature on eye movements, saccade amplitude or duration, number of fixations, fixation durations, or other close derivatives have been used as the main measures (see for instance the recent contribution in [7]). Although saccades and fixations are fundamentally sequential, very few methods are available for treating their sequential properties. Among those taking into account the fixation order, the most widely applied method is based on the edit distance, i.e., minimum number of "edit" operations transforming a sequence into another [8]. More advanced versions assign different weights to each operation. Such methods have been successfully used by a number of researchers to study saccade sequences (e.g., [9–13]). These methods define a number of spatial ROIs in the scene being scanned and the fixation sequence is coded as a series of letters representing the fixated locations. Although the string edit method has proven to be a useful tool and is relatively fast to compute, one of its main drawbacks is that it does not take the relationship between ROIs into consideration, so that the algorithm cannot differentiate between close and distant ROIs. A second drawback of this kind of method is that they do not take the fixation duration into account; all fixations, however short or long, are treated equally. Instead, it is clear that the fixation duration is an important indicator of processing during a fixation [14]. In [15], Cristino et al. describe a new method, for quantitatively scoring two eye movement sequences: they show how the methodology of global sequence alignment (Needleman–Wunsch algorithm [16]) can be applied to eye movements and then present three experiments in which the method is used.

In this paper, we follow the approach to take the fixation order, the fixation duration and the spatial distance from the ROIs into account. First, we pre-process the data recording the fixation sequence as a series of symbols (possible repeated) representing the fixated locations. Since the observed sequences (scan-paths) have a length quite different from each other, a global alignment is not suitable to evidence their similarity (if any) [17]. Therefore, we at first propose to compare the expected scan-path with the observed scan-path using dot-plots. This provides a visual and hence a qualitative comparison between them but does not permit to evaluate it quantitatively.

From a different point of view, the problem we want to tackle is also related to the so-called episode matching [18]. An episode is a collection of events that occur within a short time interval. In our case, an event corresponds to a fixation, and an episode to a scan-path. Usually, in the episode matching problem, given a long sequence of events, it can be useful to know what episodes occur frequently in the sequence.

A simplified version of this problem can be restated as an approximate string matching problem [19]: Given a text *T*, find its substrings containing the string *P* as a subsequence. Conditions on the number of occurrences and/or on the length of the substrings of *T* can

be considered. Here, we investigate the problem in which *T* is the obtained scan-path, and *P* is the task scan-path.

In particular, for every obtained scan-path, we determine the first occurrence of *P* in *T*, and we score it. A novel scoring scheme is presented that takes into account the spatial relationship between ROIs (differentiate between close and far regions—distance matrix) and the fixation duration (repetitions of the letter corresponding to the ROI in a way that is proportional to the fixation). It also includes the guess that fixations outside the ROIs may be part of the exploration strategy.

The proposed score is validated by comparing the performance of the three different groups: the group of patients with extrapyramidal disease, the second one of patients suffering from chronic pain syndrome and the control group. Our results, as expected, confirm the worst performance of extrapyramidal patients than the chronic pain and control groups, in general. In particular, the medians of the three classes are significantly different from each other, so suggesting that our method can be employed as a measure of the performance in the VSST.

Summarizing, the main contributions of this paper are:


The method we propose is illustrated in the flowchart of Figure 1. The paper is organized as follows. In the next section, the task that we want to pursue is described, together with the data pre-processing and the proposed alignment approach, based on a new ad hoc definition of the similarity score. Section 3 collects experimental results that are discussed in the following Section 4. Finally, in Section 5, some conclusions are drawn and also open questions and future perspectives are described.

**Figure 1.** Processing pipeline: average gaze position per timestamp in fixation rows are processed to ge<sup>t</sup> the scan-path observed by the patient (the columns related to the pupils' size are not taken into account); after creating the weight vector, we run the similarity score (with respect to the target sequence) to ge<sup>t</sup> the final patient score. Healthy patients and patients with extrapyramidal nervous system disease are distinguished with high statistical confidence.

#### **2. Material and Methods**

#### *2.1. Task Design*

There exists several different TMT settings that can be adopted. For instance, a patient could be supposed to link ordered series of numbers or letters (which we will generally call *symbols* in the following paragraphs) drawing with paper and pencil [20] or onto an electronic device [21,22]. In other settings, tested people are required to sit in front of

a monitor and interact with screen-based content, through an eye-tracker device [23,24]. Our study is carried out based on this last setting, which allows us to perform a Visual Sequential Search Test (VSST). In particular, the stimulus images submitted (in this order) to the patient are illustrated in Figure 2, and the required task is to make the sequence 1-A-2-B-3-C-4-D-5-E at least once during the whole test time.

**Figure 2.** Stimuli timing: the instruction slide is codified with "NaN"; the central dot target is codified with "0"; the TMT stimulus is codified with "1".

#### *2.2. Data Preprocessing*
