Paper:
EMERGENCE OF FOVEAL IMAGE SAMPLING FROM LEARNING TO ATTEND IN VISUAL SCENES
We describe a neural attention model with a learnable retinal sampling lattice. The model is trained on a visual search task requiring the classification of an object embedded in a visual scene amidst background distractors using the smallest number of fixations. We explore the tiling properties that emerge in the model’s retinal sampling lattice after training. Specifically, we show that this lattice resembles the eccentricity dependent sampling lattice of the primate retina, with a high resolution region in the fovea surrounded by a low resolution periphery. Furthermore, we find conditions where these emergent properties are amplified or eliminated providing clues to their function.
1 INTRODUCTION
A striking design feature of the primate retina is the manner in which images are spatially sampled by retinal ganglion cells. Sample spacing and receptive fields are smallest in the fovea and then increase linearly with eccentricity, as shown in Figure 1. Thus, we have highest spatial resolution at the center of fixation and lowest resolution in the periphery, with a gradual fall-off in resolution as one proceeds from the center to periphery. The question we attempt to address here is, why is the retina designed in this manner - i.e., how is it beneficial to vision?
The commonly accepted explanation for this eccentricity dependent sampling is that it provides us with both high resolution and broad coverage of the visual field with a limited amount of neural resources. The human retina contains 1.5 million ganglion cells, whose axons form the sole output of the retina. These essentially constitute about 300,000 distinct samples of the image due to the multiplicity of cell types coding different aspects such as on vs. off channels (Van Essen & Anderson, 1995). If these were packed uniformly at highest resolution (120 samples/deg, the Nyquist-dictated sampling rate corresponding to the spatial-frequencies admitted by the lens), they would subtend an image area spanning just 5x5 deg2. Thus we would have high-resolution but essentially tunnel vision. Alternatively if they were spread out uniformly over the entire monocular visual field spanning roughly 150 deg2 we would have wide field of coverage but with very blurry vision, with each sample subtending 0.25 deg (which would make even the largest letters on a Snellen eye chart illegible). Thus, the primate solution makes intuitive sense as a way to achieve the best of both of these worlds. However we are still lacking a quantitative demonstration that such a sampling strategy emerges as the optimal design for subserving some set of visual tasks.
Here, we explore what is the optimal retinal sampling lattice for an (overt) attentional system performing a simple visual search task requiring the classification of an object. We propose a learnable retinal sampling lattice to explore what properties are best suited for this task. While evolutionary pressure has tuned the retinal configurations found in the primate retina, we instead utilize gradient descent optimization for our in-silico model by constructing a fully differentiable dynamically controlled model of attention.
Our choice of visual search task follows a paradigm widely used in the study of overt attention in humans and other primates (Geisler & Cormack, 2011). In many forms of this task, a single target is randomly located on a display among distractor objects. The goal of the subject is to find the target as rapidly as possible. Itti & Koch (2000) propose a selection mechanism based on manually
Published as a conference paper at ICLR 2017
Ill? V. A. Perry PI al. cells is shown in Fig. Q(B). In this case the slopes of the regression lines of cell body size on the logarithm of cell density for the nasal (a = 43.4, h = -6.87) and the temporal cells (u = 53.6, h = 9.1) were not significantly different (r = 1.0, df‘ 54). Thus the differences in cell body size of PX cells in different parts of the retina is clearly related to the variation in ganglion cell density, although the differences in dendritic field size is not simply related to cell density alone. The correlation coefficient for the dendritic field size of both nasal and temporal Pa cells and the logarithm of the ganglion cell density was 0.97, i.e. most of the variance in dendritic field size can be attributed to differences in ganglion cell density. As a check on the accuracy of our ganglion cell counts we used them to estimate the total number of ganglion cells in the macaque retina which can, in turn, be compared with published estimation of the number of axons in the optic nerve. To do this we plotted onto a scaled drawing of one Nissl-stained whole-mounted retina (670mm’ in area) the isodensity contours estimated from the counts along the A meridia. The isodensity contours were drawn as approximately ellipsoid but tapering in the nasal retina as has been shown in previous studies of peripheral ganglion cell counts of the primate retina.6’,“x The area between adjacent contours was multiplied by the mean ceil density of the two isodensity contours. This was repeated for the area between all pairs of contours and the totals for all areas were summed to give the total number of ganglion cells. This yielded an estimate of 1.4 x 10” ganglion cells in the retina, in good agreement with estimates of the number of axons in the optic nerve i.e. 1.5-1.8 x IOh, I.4 x I O' and 1.2-1.3 x 10”.40~so.” If we neglect the naso-temporal overlap, which is small in primates,h.h’ then approximately 60’1/ of the cells lie in the nasal retina and 40“;) in the temporal retina. Our intention was to show which cell types project to the magno- and parvocellufar layers of the lateraf geniculate nucleus and to estimate the percentage of retinal ganglion cells at different eccentricities which
0 1 2 3 L 5 6 7 8 9 10 li 12 13 I‘ ECCENTRICITY fTH?
defined low level features of real images to locate various search targets. Here the neural network must learn what features are most informative for directing attention.
While neural attention models have been applied successfully to a variety of engineering applications (Bahdanau et al., 2014; Jaderberg et al., 2015; Xu et al., 2015; Graves et al., 2014), there has been little work in relating the properties of these attention mechanisms back to biological vision. An important property which distinguishes neural networks from most other neurobiological models is their ability to learn internal (latent) features directly from data.
But existing neural network models specify the input sampling lattice a priori. Larochelle & Hinton (2010) employ an eccentricity dependent sampling lattice mimicking the primate retina, and Mnih et al. (2014) utilize a multi scale glimpse window’ that forms a piece-wise approximation of this scheme. While it seems reasonable to think that these design choices contribute to the good performance of these systems, it remains to be seen if this arrangement emerges as the optimal solution.
We further extend the learning paradigm of neural networks to the structural features of the glimpse mechanism of an attention model. To explore emergent properties of our learned retinal configurations, we train on artificial datasets where the factors of variation are easily controllable. Despite this departure from biology and natural stimuli, we find our model learns to create an eccentricity dependent layout where a distinct central region of high acuity emerges surrounded by a low acuity periphery. We show that the properties of this layout are highly dependent on the variations present in the task constraints. When we depart from physiology by augmenting our attention model with the ability to spatially rescale or zoom on its input, we find our model learns a more uniform layout which has properties more similar to the glimpse window proposed in Jaderberg et al. (2015); Gregor et al. (2015). These findings help us to understand the task conditions and constraints in which an eccentricity dependent sampling lattice emerges.
2 RETINAL TILING IN NEURAL NETWORKS WITH ATTENTION
Attention in neural networks may be formulated in terms of a differentiable feedforward function. This allows the parameters of these models to be trained jointly with backpropagation. Most formulations of visual attention over the input image assume some structure in the kernel filters. For example, the recent attention models proposed by Jaderberg et al. (2015); Mnih et al. (2014); Gregor et al. (2015); Ba et al. (2014) assume each kernel filter lies on a rectangular grid. To create a learnable retinal sampling lattice, we relax this assumption by allowing the kernels to tile the image independently.
2.1 GENERATING A GLIMPSE
We interpret a glimpse as a form of routing where a subset of the visual scene U is sampled to form a smaller output glimpse G. The routing is defined by a set of kernels k[•](s), where each kernel i specifies which part of the input U [•] will contribute to a particular output G[i]. A control variable s
is used to control the routing by adjusting the position and scale of the entire array of kernels. With this in mind, many attention models can be reformulated into a generic equation written as
G[i] = H∑ n W∑ m U [n,m]k[m,n, i](s) (1)
where m and n index input pixels of U and i indexes output glimpse features. The pixels in the input image U are thus mapped to a smaller glimpse G.
2.2 RETINAL GLIMPSE
The centers of each kernel filter µ́[i] are calculated with respect to control variables sc and sz and learnable offset µ[i]. The control variables specify the position and zoom of the entire glimpse. µ[i] and σ[i] specify the position and spread respectively of an individual kernel k[−,−, i]. These parameters are learned during training with backpropagation. We describe how the control variables are computed in the next section. The kernels are thus specified as follows:
µ́[i] = (sc − µ[i])sz (2) σ́[i] = σ[i]sz (3)
k[m,n, i](s) = N (m; µ́x[i], σ́[i])N (n; µ́y[i], σ́[i]) (4)
We assume kernel filters factorize between the horizontal m and vertical n dimensions of the input image. This factorization is shown in equation 4, where the kernel is defined as an isotropic gaussian N . For each kernel filter, given a center µ́[i] and scalar variance σ́[i], a two dimensional gaussian is defined over the input image as shown in Figure 2. These gaussian kernel filters can be thought of as a simplified approximation to the receptive fields of retinal ganglion cells in primates (Van Essen & Anderson, 1995).
While this factored formulation reduces the space of possible transformations from input to output, it can still form many different mappings from an input U to outputG. Figure 3B shows the possible windows which an input image can be mapped to an output G. The yellow circles denote the central location of a particular kernel while the size denotes the standard deviation. Each kernel maps to one of the outputs G[i].
Positional control sc can be considered analogous to the motor control signals which executes saccades of the eye, whereas sz would correspond to controlling a zoom lens in the eye (which has no counterpart in biology). In contrast, training defines structural adjustments to individual kernels which include its position in the lattice as well as its variance. These adjustments are only possible during training and are fixed afterwards.Training adjustments can be considered analagous to the incremental adjustments in the layout of the retinal sampling lattice which occur over many generations, directed by evolutionary pressure in biology.
Recurrent ht
Glimpse Gt
Control sc,t ; sz,t
B. Controlling the Retinal Lattice
Final LayoutInitial Layout Training A. Optimizing the Retinal Lattice Time t t+1 t+2 Recurrent ht+1 Glimpse Gt+1 Control sc,t+1 ; sz,t+1 Recurrent ht+2 Glimpse Gt+2 Control sc,t+2 ; sz,t+2
Figure 3: A: Starting from an initial lattice configuration of a uniform grid of kernels, we learn an optmized configuration from data. B: Attentional fixations generated during inference in the model, shown unrolled in time (after training).
3 RECURRENT NEURAL ARCHITECTURE FOR ATTENTION
A glimpse at a specific timepoint, Gt, is processed by a fully-connected recurrent network frnn().
ht = frnn(Gt, ht−1) (5) [sc,t; sz,t] = fcontrol(ht) (6)
The global center sc,t and zoom sz,t are predicted by the control network fcontrol() which is parameterized by a fully-connected neural network.
In this work, we investigate three variants of the proposed recurrent model:
• Fixed Lattice: The kernel parameters µ[i] and σ[i] for each retinal cell are not learnable. The model can only translate the kernel filters sc,t = fcontrol(ht) and the global zoom is fixed sz,t = 1. • Translation Only: Unlike the fixed lattice model, µ[i] and σ[i] are learnable (via back-
propagation). • Translation and Zoom: This model follows equation 6 where it can both zoom and trans-
late the kernels.
A summary for comparing these variants is shown in Table 1.
Prior to training, the kernel filters are initialized as a 12x12 grid (144 kernel filters), tiling uniformly over the central region of the input image and creating a retinal sampling lattice as shown in Figure 5 before training. Our recurrent network, frnn is a two layer traditional recurrent network with 512- 512 units. Our control network, fcontrol is a fully-connected network with 512-3 units (x,y,zoom)
in each layer. Similarly, our prediction networks are fully-connected networks with 512-10 units for predicting the class. We use ReLU non-linearities for all hidden unit layers.
Our model as shown in Figure 3C are differentiable and trained end-to-end via backpropagation through time. Note that this allows us to train the control network indirectly from signals backpropagated from the task cost. For stochastic gradient descent optimization we use Adam (Kingma & Ba, 2014) and construct our models in Theano (Bastien et al., 2012).
4 DATASETS AND TASKS
4.1 MODIFIED CLUTTERED MNIST DATASET
Example images from of our dataset are shown in Figure 4. Handwritten digits from the original MNIST dataset LeCun & Cortes (1998) are randomly placed over a 100x100 image with varying amounts of distractors (clutter). Distractors are generated by extracting random segments of nontarget MNIST digits which are placed randomly with uniform probability over the image. In contrast to the cluttered MNIST dataset proposed in Mnih et al. (2014), the number of distractors for each image varies randomly from 0 to 20 pieces. This prevents the attention model from learning a solution which depends on the number ‘on’ pixels in a given region. In addition, we create another dataset (Dataset 2) with an additional factor of variation: the original MNIST digit is randomly resized by a factor of 0.33x to 3.0x. Examples of this dataset are shown in the second row of Figure 4.
4.2 VISUAL SEARCH TASK
We define our visual search task as a recognition task in a cluttered scene. The recurrent attention model we propose must output the class ĉ of the single MNIST digit appearing in the image via the prediction network fpredict(). The task loss, L, is specified in equation 8. To minimize the classification error, we use cross-entropy cost:
ĉt,n = fpredict(ht,n) (7)
L = N∑ n T∑ t cnlog(ĉt,n) (8)
Analolgous to the visual search experiments performed in physiological studies, we pressure our attention model to accomplish the visual search as quickly as possible. By applying the task loss to every timepoint, the model is forced to accurately recognize and localize the target MNIST digit in as few iterations as possible. In our classification experiments, the model is given T = 4 glimpses.
Before Training (Initial Layout) After 1 epochs After 10 epochs After 100 epochs
5 RESULTS
Figure 5shows the layouts of the learned kernels for a Translation Only model at different stages during training. The filters are smoothly transforming from a uniform grid of kernels to an eccentricity dependent lattice. Furthermore, the kernel filters spread their individual centers to create a sampling lattice which covers the full image. This is sensible as the target MNIST digit can appear anywhere in the image with uniform probability.
When we include variable sized digits as an additional factor in the dataset, the translation only model shows an even greater diversity of variances for the kernel filters. This is shown visually in the first row of Figure 6. Furthermore, the second row shows a highly dependent relationship between the sampling interval and standard deviatoin of the retinal sampling lattice and eccentricity from the center. This dependency increases when training on variable sized MNIST digits (Dataset 2). This
relationship has also been observed in the primate visual system (Perry et al., 1984; Van Essen & Anderson, 1995).
When the proposed attention model is able to zoom its retinal sampling lattice, a very different layout emerges. There is much less diversity in the distribution of kernel filter variances as evidenced in Figure 6. Both the sampling interval and standard deviation of the retinal sampling lattice have far less of a dependence on eccentricity. As shown in the last column of Figure 6, we also trained this model on variable sized digits and noticed no significant differences in sampling lattice configuration.
Figure 7 shows how each model variant makes use of its retinal sampling lattice after training. The strategy each variant adopts to solve the visual search task helps explain the drastic difference in lattice configuration. The translation only variant simply translates its high acuity region to recognize and localize the target digit. The translation and zoom model both rescales and translates its sampling lattice to fit the target digit. Remarkably, Figure 7 shows that both models detect the digit early on and make minor corrective adjustments in the following iterations.
Table 2 compares the classification performance of each model variant on the cluttered MNIST dataset with fixed sized digits (Dataset 1). There is a significant drop in performance when the retinal sampling lattice is fixed and not learnable, confirming that the model is benefitting from learning the high-acuity region. The classification performance between the Translation Only and Translation and Zoom model is competitive. This supports the hypothesis that the functionality of a high acuity region with a low resolution periphery is similar to that of zoom.
6 CONCLUSION
When constrained to a glimpse window that can translate only, similar to the eye, the kernels converge to a sampling lattice similar to that found in the primate retina (Curcio & Allen, 1990; Van Essen & Anderson, 1995). This layout is composed of a high acuity region at the center surrounded by a wider region of low acuity. Van Essen & Anderson (1995) postulate that the linear relationship between eccentricity and sampling interval leads to a form of scale invariance in the primate retina. Our results from the Translation Only model with variable sized digits supports this conclusion. Additionally, we observe that zoom appears to supplant the need to learn a high acuity region for the visual search task. This implies that the high acuity region serves a purpose resembling that of a zoomable sampling lattice. The low acuity periphery is used to detect the search target and the high acuity ‘fovea’ more finely recognizes and localizes the target. These results, while obtained on an admittedly simplified domain of visual scenes, point to the possibility of using deep learning as a tool to explore the optimal sample tiling for a retinal in a data driven and task-dependent manner. Exploring how or if these results change for more challenging tasks in naturalistic visual scenes is a future goal of our research.
ACKNOWLEDGMENTS
We would like to acknowledge everyone at the Redwood Center for their helpful discussion and comments. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Tesla K40 GPUs used for this research.

Review:
This paper presents a succinct argument that the principle of optimizing receptive field location and size in a simulated eye that can make saccades with respect to a classification error of images of data whose labels depend on variable-size and variable-location subimages, explains the existence of a foveal area in e.g. the primate retina.
The argument could be improved by using more-realistic image data and drawing more direct correspondence with the number, receptive field sizes and eccentricities of retinal cells in e.g. the macaque, but the authors would then face the challenge of identifying a loss function that is both biologically plausible and supportive of their claim.
The argument could also be improved by commenting on the timescales involved. Presumably the density of the foveal center depends on the number of of saccades allowed by the inference process, as well as the size of the target sub-images, and also has an impact on the overall classification accuracy.
Why does the classification error rate of dataset 2 remain stubbornly at 24%? This seems so high that the model may not be working the way we’d like it to. It seems that the overall argument of the paper pre-supposes that the model can be trained to be a good classifier. If there are other training strategies or other models that work better and differently, then it raises the question of why do our eyes and visual cortex not work more like *those ones* if evolutionary pressures are applying the same pressure as our training objective.
Why does the model with zooming powers out-do the translation-only model on dataset 1 (where all target images are the same size) and tie the translation-only model dataset 2 (where the target images have different sizes, for which the zooming model should be tailor-made?). Between this strange tie and the high classification rate on Dataset 2, I wonder if maybe one or both models isn’t being trained to its potential, which would undermine the overall claim.
Comparing this model to other attention models (e.g. spatial transformer networks, DRAW) would be irrelevant to what I take to be the main point of the paper, but it would address the potential concerns above that training just didn’t go very well, or there was some problem with the model parameterization that could be easily fixed.