Predicting Goal-directed Attention Control Using Inverse-Reinforcement Learning

Understanding how goal states control behavior is a question ripe for interrogation by new methods from machine learning. These methods require large and labeled datasets to train models. To annotate a large-scale image dataset with observed search fixations, we collected 16,184 fixations from people searching for either microwaves or clocks in a dataset of 4,366 images (MS-COCO). We then used this behaviorally-annotated dataset and the machine learning method of Inverse-Reinforcement Learning (IRL) to learn target-specific reward functions and policies for these two target goals. Finally, we used these learned policies to predict the fixations of 60 new behavioral searchers (clock = 30, microwave = 30) in a disjoint test dataset of kitchen scenes depicting both a microwave and a clock (thus controlling for differences in low-level image contrast). We found that the IRL model predicted behavioral search efficiency and fixation-density maps using multiple metrics. Moreover, reward maps from the IRL model revealed target-specific patterns that suggest, not just attention guidance by target features, but also guidance by scene context (e.g., fixations along walls in the search of clocks). Using machine learning and the psychologically-meaningful principle of reward, it is possible to learn the visual features used in goal-directed attention control.


Introduction
Ever since Yarbus' seminal demonstration of how a goal can control attention 1 , understanding goal-directed attention control has been a core aim of psychological science.This focus is justified.Goal-directed attention underlies everything that we try to do, making it key to understanding cognitively-meaningful behavior.Like Yarbus, we too demonstrate goal-directed control of eye-movement behavior, but here these overt attention movements are made by a deep-network model that has learned different goals.
Three factors distinguish our approach from previous work.First, it is image-computable and uses learned, rather than handcrafted, features.Our model therefore inputs an image but is not told anything about its features ("vertical", "clock", etc.), which all must be learned.This factor distinguishes the current model from most others in the behavioral literature on attention control [2][3][4] , and makes our approach more aligned with recent computational work. 5,6 8][9] We adopt this paradigm because categorical search is the simplest (and therefore, best) goal-directed behavior to computationally model-there is a target-object goal and the task is to find it.A third and unique contribution of our approach is that we predict categorical-search fixations using a policy that was learned, through many observations of search-fixation behavior during training, to maximize the goal-specific receipt of reward.Using inverse-reinforcement learning (IRL), we obtain these reward functions and use them to prioritize spatial locations to predict the fixations made by new people searching for the learned target categories in new images.Doing this required the creation of a search-fixation-annotated image dataset sufficiently large to train deep-network models (see Methods).We show that this model successfully captured several patterns observed in goal-directed search behavior, not the least being the guidance of overt attention to the target-category goals.

Inverse-Reinforcement Learning
IRL is an imitation-learning method from the machine-learning literature that learns, through observations of an expert, a reward function and policy for mimicking expert performance.We extend this framework to goal-directed behavior by assuming that the image locations fixated by searchers constitute the expert performance that the model learns to mimic.The specific IRL algorithm that we use is Generative Adversarial Imitation Learning (GAIL 10 ), which makes reward proportional to the model's ability to generate State-Action pairings that imitate observed State-Action pairings.Here, the Action is a shift of fixation location in a search image (the model's saccade), and the State is the search context (all the information available for use in the search task).The State includes, but is not limited to, the visual features extracted from an image and the learned visual representation of the target category.Over training, and through the greedy maximization of total-expected reward, the model learns a Policy for mapping States to Actions that can be used to predict new Actions (saccades) given new States (search images).

Model Methods
The IRL model framework is illustrated in Fig. 1.Model training can be conceptualized as a Policy Generator (G) and a Discriminator (D) locked in an adversarial process 10 .The Generator generates fake eye movements (Actions) with the goal of fooling the Discriminator into believing that these actions were made by a person, while the Discriminator's goal is to discriminate the real eye movements from the fake.More specifically, the Generator consists of an Actor-Critic model 11 that learns a policy for maximizing total expected reward over all possible sequences of fixations, with greater reward given to the Generator when it produces person-like actions that the Discriminator miss-classifies as real (the logarithm of the Discriminator output).This reward-driven adversarial process plays out during training using Proximal Policy Optimization (PPO) 12 , with the result being a Generator that becomes highly adept at imitating the behavioral fixations made during categorical search.At testing, this learned Policy for mimicking people's categorical search fixations is used to predict the fixation behavior of new people searching for the same target categories in new images.These fixation predictions are quantified by what we call a saccade map, which is a priority map reflecting the total reward expected if saccades were to land at all the different locations in an image input.

States and Actions: Cumulative Movements of a Foveated Retina
Broadly speaking, the State is the internal visual representation that is used for search, and a big part of this are the features extracted from the image input.To obtain a robust core State representation we pass each image through a pre-trained ResNet-50 13 to get a reasonably-sized feature map output (1024x10x16).However, human search behavior is characterized by movements of a foveated retina, and each of these search fixations dramatically changes the State by re-positioning the high-resolution fovea in the visual input.We captured this fixation-dependent change in State in two steps.First, we gave the IRL model a simplified foveated retina.We did this using the method from Geisler and Perry 14 to compute a retina-transformed version of the image input (ReT-image), which in our implementation is an image having high resolution within a central 3 • "fovea" (32x32 in the resized 512x320 pixel image) but is blurred outside of this fovea to approximate the loss of resolution that occurs with increasingly eccentric viewing in the visual periphery.Second, we accumulate these high-resolution foveal views, each a different ReT-image, over 6 new fixations in a process that we refer to as cumulative foveation.With each new "eye movement", the fovea is re-positioned in the image, thereby progressively de-blurring what was an initially fairly blurred visual input.Note that by adopting this cumulative-foveation State encoder we are not suggesting that people have a similar capacity to maintain high-resolution visual information once the fovea moves on, and indeed this is known not to be the case 15 .
Rather, we used this fixation-by-fixation State encoder simply as a tool to integrate a dynamically changing State into the IRL method.Figure 2 shows cumulative ReT-images obtained at three successive fixation locations (0,1,2) for a sample scene, with the 7-fixation sequence of these images comprising a dynamic State representation that is input to the IRL model.The pre-trained ResNet-50 was dilated and fine-tuned on ReT-images prior to this State encoding.The IRL model learns to associate States with Actions, but these Actions must also be defined in some space.We obtain an Action space by first resizing a ReT-image input to 512x320 pixels, which we then discretize into a 10x16 grid of 32x32 pixel cells.The center of each cell becomes a potential fixation location, a computational necessity imposing a resolution limit on the model's oculomotor behavior.For each of the 6 new fixations generated by the model, the cumulative ReT-image input is prioritized by the saccade map and one of the 160 possible grid locations is selected for an eye movement.

The Microwave-Clock Search Dataset
The currently most predictive models of complex fixation behavior are in the context of a free-viewing task, where the best of these models (e.g., DeepGaze II 16 ) are trained on SALICON 17 .SALICON is a crowd-sourced dataset consisting of images that were annotated with human mouse clicks indicating salient image locations.Without SALICON, DeepGaze II and models like it would not have been possible, and our understanding of free-viewing behavior, widely believed to reflect bottom-up attention control (i.e., control solely by features extracted from the visual input), would be diminished.To date, however, there has been no comparable dataset for categorical search, and this has hindered the computational modeling of goal-directed attention control.Those suitably-sized and fixation-annotated image datasets that do exist either did not use a standard search task 18,19 , used a search task but had people search for multiple targets simultaneously 20 , or used only one target category (people) 21 .
Here we introduce the Microwave-Clock Search (MCS) dataset, which is now among the largest datasets of images that have been annotated with goal-directed fixations.The MCS dataset makes it possible to train deep-network models on human search fixations to predict how people will move their attention in the pursuit of different target-object goals.
Half of the MCS dataset consists of COCO2014 images 22 depicting either a microwave or a clock (based on COCO labels), from which we created disjoint training and testing datasets.In selecting the training images we excluded scenes depicting people and animals (to avoid attention biases to these categories), and digital clocks in the case of the clock target category.This latter constraint was introduced because the features of analog and digital clocks are very different, and we were concerned that this would introduce unwanted variability in the search behavior.No additional exclusion criteria were used to select the training images, with our goal being to include as many images for training as possible.These criteria left 1,494 analog clock images and 689 microwave images, which we should note varied greatly in terms of their search difficulty (see Fig. 3, top).Selection of the test images was more tightly controlled, resulting in the test dataset being far smaller (n=40).In addition to the exclusion criteria used for the training images, test images were further constrained to have: (1) depictions of both a microwave and a clock (enabling different targets to be designated in the identical images, the perfect control for differences in bottom-up saliency), (2) only a single instance of the target, (3) a target area less than 10% of the image area, and (4) targets that do not appear at the image's center (no overlap between the target and the center cell of a 5x5 grid).The latter two criteria were aimed at excluding really large targets or targets appearing too close to the center starting-gaze position, with the goal of both being to achieve a moderate level of search difficulty (see Fig. 3, bottom).
The above-described selection criteria were specific to target-present (TP) images, but an equal number of target-absent (TA) images (n=2183) were selected as well so as to create a standard TP versus TA search context.These images were selected randomly from COCO, with the constraints that: (1) none depicted the target, and (2) all depicted at least two instances of the target category's siblings.COCO defines the siblings of a microwave to be: ovens, toasters, refrigerators, and sinks, all under the parent category of "appliances".Clock siblings are defined as: books, vases, scissors, hairdryers, toothbrushes, and teddy  bears, under the parent category of "indoor".Sibling membership was used as a selection criterion so as to discourage TA responses from being based on scene type (e.g., a street scene is unlikely to contain a microwave), and this criterion seemed to work well; the overwhelming majority of selected TA scenes were kitchens that did not depict a target.
The large size of the training dataset (4366 images) required data collection to be distributed over groups of searchers.Each microwave training image was searched by 2-3 people (n=27); each clock training image was searched by 1-2 people (n=26).After removing incorrect trials and TP trials in which the target was not fixated (it is not desirable to train on these), 16,184 search fixations remained for model training.Test images were each searched by a new group of 60 participants, 30 searching for a microwave target and the other 30 searching the same images for a clock target in a between-subjects design.To achieve a power and effect size of .8,based on a t-test comparing target guidance to chance (see Fig. 5), we determined that a sample of 25 participants per target condition would be adequate.However, we chose to test 30 participants per condition in case of loss due to attrition or unusable eye-tracking data.

Behavioral Search Procedure
A standard categorical search paradigm was used for both training and testing (see Fig. 4).TP and TA trials were randomly interleaved within target type, and searchers made a speeded TP or TA manual response terminating each trial.Search display visual angles were 54 • × 35 • for testing; for training angles ranged from 12 • × 28.3 • in width and 8 • × 28.3 • in height.Eye position was sampled at 1000 Hz using an EyeLink 1000 (SR Research) in tower-mount configuration (spatial resolution 0.01 • rms).All participants provided informed consent in accordance with policies set by the institutional review board at Stony Brook University responsible for overseeing research conducted on human subjects.

Search Behavior
Table 1 provides the mean button-press errors and the average number of fixations made before the button-press response (which includes the starting fixation) on correct search trials.Note that the roughly doubled error rates in the training data 4/9 should be interpreted with caution, as many of these errors were due to incorrectly labelled target-object regions in COCO that would cause errors given correct search judgments.Rather than correcting these mislabelled objects (which would be changing COCO), we instead decided to tolerate an inflated error rate and to exclude these error trials from all analyses and interpretation.Focusing first on the TP test data, Figure 5 plots the cumulative probability of fixating the target with each saccade made during search.The central behavioral data pattern (solid lines) is that attention, as measured by overt gaze fixation, is strongly guided to both the microwave and clock targets.This guidance is evidenced by the fact that 24% of the initial saccades landed on targets (averaged over microwaves and clocks).This probability of target fixation is well above chance, which we quantified using two object-based chance baselines consisting of: (1) the probability of fixating the clock when searching for a microwave (clock baseline), and (2) the probability of fixating the microwave when searching for a clock (microwave baseline).We confirmed above-chance target guidance by comparing the slopes of regression lines fit to the target and baseline data (microwave: target slope = 0.15, baseline slope = 0.03, t(58) = 26.31,p = 6.20e-34 < .001;clock: target slope = 0.17, baseline slope = 0.004, t(58) = 52.65,p = 1.14e-50 < .001).Also evident from this analysis is the importance of the first six saccades made during the search tasks.If the target was going to be fixated, it is highly likely that this would happen by the sixth eye movement.Collectively, these results indicate that there are strong microwave and clock guidance signals in the behavioral test data to predict.

IRL Model
To determine whether the model's behavior is reasonable, we conducted two initial qualitative analyses.The top row in Figure 6 shows cumulative ReT-images for the starting fixation (0 in the yellow scanpath) and the fixations following the first two saccades (1, 2).Note that the left ReT-image, because it was computed based on a center initial fixation position, is blurred on both the left and right sides.The middle and right ReT-images were computed based on the landing positions of the first and second saccades, respectively.The microwave target is indicated in each panel by the red box.The bottom row shows the saccade maps corresponding to these ReT-images, where a bluer color indicates greater total reward expected by moving fixation to different image locations.The model initially expected the greatest total reward by fixating the stove (left saccade map), but after that saccade, and the resulting change in State (top middle), the model then selected the microwave target as the location offering the greatest expected reward (bottom middle), which was fixated next (right panels).Note that the model, because it was forced to make six saccades (discussed below), continued to prioritize space even after fixating the target.This qualitative analysis shows that the model learned an association between a State (which includes the features of a microwave) and an Action, and this enabled it to guide its fixations during the search of a new image for this target-category goal.Figure 7 shows another qualitative evaluation, this time comparing Fixation-Density Maps (FDMs) from people searching for a microwave (n=30) or a clock (n=30) to FDMs generated by the model (sampling from probabilistic policy) as it searched for the same targets in the same two test images.In both examples, the model and behavioral searchers efficiently found the target (bright red).More interesting, however, is that they both searched the scenes differently depending on the target category.When searching for a microwave (leftmost four panels) the model and behavioral searchers tended to look at counter-tops, but when searching for a clock (rightmost four panels) they tended to look higher up on the walls.Future work will more fully explore the potential to learn and predict these effects of scene context on search.
We directly compared the model and participant search behavior in several analyses of the test data.This comparison occurred on an image-by-image and fixation-by-fixation basis, but was limited to the first six movements of gaze.We introduced this limitation on the number of search saccades to reduce model computation time, but believe that it is justified given the clear adequacy of the first six saccades in revealing the goal-directed behavior of interest, as shown in Figure 5.
Figure 8A (left plot) shows that the model was able to predict the behavioral FDMs for microwave and clock targets, using an AUC metric where the scale is between 0 and 1 and higher values indicate better predictive success.We also include Subject models, computed using the leave-one-out method, to obtain a practical noise limit on a model's ability to predict group behavior 23 .This analysis shows that the IRL model was able to predict the spatial distribution of behavioral fixations in the test images as well as could be expected based on variability among the participants in their search behavior.FDMs, however, are purely spatial, but search fixations are also made over time, ultimately producing a scanpath.Because the IRL model also makes sequences of fixations, we were able to compare its 6-saccade scanpaths to the 6-saccade scanpaths from the behavioral searchers (right plot).Based on average MultiMatch similarity 24 , excluding the fixation duration component, the model did 6/9 a very good job in predicting the spatio-temporal sequences of fixations made by the behavioral searchers in their first six saccades, again as well as could be expected from the behavioral data, and it did this for both microwave and clock targets.We also analyzed search accuracy and the number of saccades that were made during search.Note that "Accuracy" refers here to the proportion of trials in which the target was fixated in the first six eye movements (fixated-in-6 accuracy), and "Avg Saccades" refers to the mean number of saccades needed to find the target on the accurate fixated-in-6 trials.Figure 8B shows that the model was slightly less successful than behavioral searchers in locating targets within six saccades (left plot), but when it did find the target it tended to do so about as efficiently as our participants, needing only about half a fixation more in the case of clocks (right plot).Chance fixated-in-6 accuracy is less than .25,based on a shuffling of eye data and images within each participant, and this is far lower than fixated-in-6 accuracy for the IRL model (microwave: t(58) = -31.74,p = 2.34e-38 <.001, Cohen's d = 8.20; clock: t(58) = -75.87,p = 9.73e-60 <.001, Cohen's d = 19.59).But perhaps the clearest measure of search efficiency is the cumulative probability of target fixation over saccades.As indicated by the dashed lines in Figure 5, the model's search efficiency, although generally lower (reflecting the difference in fixated-in-6 accuracy), was strongly guided to targets much like the participants' search behavior.We interpret this as meaning that the IRL model learned goal-specific attention control, as measured by a gold-standard metric.

Figure 1 .
Figure 1.The model's adversarial imitation learning algorithm.During training it learned from fixation-annotated images a reward function and policy for predicting new search fixations in unseen test images.

Figure 3 .
Figure 3. Representative training images (top) and testing images (bottom) in the MCS dataset.

Figure 4 .
Figure 4.The categorical search paradigm used for behavioral data collection.

Figure 5 .
Figure 5. Cumulative probability of fixating the microwave (red) or clock (blue) target on target-present trials for behavioral participants (solid lines) and the model (dashed lines).Bottom lines are object-based random baselines (see text for details).

Figure 6 .
Figure 6.Cumulative ReT-images (top row) and corresponding saccade maps (bottom row) for the initial and first two new fixations (left to right) made by the model in a microwave search task.

Figure 7 .
Figure 7. Model and behavioral Fixation Density Maps computed for microwave (left four) and clock (right four) searches in two trials (top, bottom).

Figure 8 .
Figure 8. Model Performance Results.(A) Left: Success in predicting FDMs by the IRL model and a Subject model using the Area-Under-the-Curve metric.Right: Corresponding predictions of search scanpaths using average MultiMatch similarity.(B) Left: Proportion of trials in which the target was fixated in the first six saccades (fixated-in-6 accuracy).Right: Average number of saccades to the target on the fixated-in-6 trials.Note that in the (A) plots "Subj" refers to a Subject model whereas in the (B) plots "Subj" refers to behavioral data.

Table 1 .
Summary statistics showing mean errors and number of search fixations in the Microwave-Clock Search dataset.