Sparse, Geometric Autoencoder Models of V
Demba Ba
Editors: Sophia Sanborn, Christian Shewmake, Simone Azeglio, Arianna Di Bernardo, Nina Miolane
Abstract
The classical sparse coding model represents visual stimuli as a convex combination of a handful of learned basis functions that are Gabor-like when trained on natural image data.
However, the Gabor-like filters learned by classical sparse coding far overpredict well-tuned simple cell receptive field (SCRF) profiles.
A number of subsequent models have either discarded the sparse dictionary learning framework entirely or have yet to take advantage of the surge in unrolled, neural dictionary learning architectures.
A key missing theme of these updates is a stronger notion of structured sparsity .
We propose an autoencoder architecture whose latent representations are implicitly, locally organized for spectral clustering, which begets artificial neurons better matched to observed primate data.
The weighted- ℓ 1 (WL) constraint in the autoencoder objective function maintains core ideas of the sparse coding framework, yet also offers a promising path to describe the differentiation of receptive fields in terms of a discriminative hierarchy in future work.
1. Introduction
Overcomplete sparse coding as a model of the primary visual cortex (V1) is a pillar of computational neuroscience (Olshausen and Field, 1997).
Training on natural image 1 patches via a Hebbian learning rule produces filters that are spatially localized, bandpass, and oriented to a select range of rotation angles.
These filters are similar to those observed in the mammalian cortex (Jones and Palmer, 1987), which are well-described by two-dimensional
Gabor functions.
However, the properties of Gabor filters fitted to the simple cell receptive field (SCRF) estimates produced by sparse coding have been shown to misalign with filters fitted to rhesus macaque responses to drifting sinusoidal gratings (Ringach, 2002).
In particular, the original sparse coding (SC) model overpredicts and underpredicts the number of well-tuned and broadly-tuned cells, respectively.
Well-tuned cells maintain several (more elongated) subfields than the “blob-like” broadly tuned cells, as shown in Figure 1.
[Figure]
A number of models have been subsequently proposed as a result.
Of particular interest, (Rehn and
Sommer, 2007) limits the number of active neurons rather than the average neural activity, which significantly improves diversity of shapes.
(Zylberberg et al., 2011) develops a spiking network based on synaptically local information to overcome this discrepancy.
Hypothesizing that explicit image reconstruction is not a biologically relevant task, (Yerxa and Simoncelli, 2022) proposes a novel contrastive objective, Local Low Dimensionality (LLD), that minimizes the dimensionality of encodings of spatially local image patches relative to their global dimensionality.
[Figure]
While LLD diversifies SCRF shapes compared to sparse coding, (Shen et al., 2019) uses deep methods to reconstruct the brain’s perceptions of images from functional magnetic resonance imaging data, showing the relevance of generative models of the visual cortex.
In addition to past success of the reconstructive framework, we therefore investigate a deep recurrent autoencoder architecture with additional regularization constraints to enforce a similar flavor of locality: namely, a weighted- ℓ 1 penalty (WL).
While the hierarchical setting is left to future work by
LLD, this architecture naturally learns a hierarchy of representational units when trained with an additional discriminative loss term (Rolfe and LeCunn, 2013).
The reported findings motivate the need for spatial regularization of neurons and necessitate more precise arguments against reconstructive frameworks like sparse coding.
2. Previous Work
The general neural coding framework can be formulated as:
[Equation]
1) where Y ∈ R d × n is a set of n stimuli of dimension d , A ∈ R d × m is a learned set of m basis functions, X ∈ R m × n is a set of n latent representations of inputs, and
S λ
( X ) is a regularization penalty.
(Rozell et al., 2007), among other advances, associates sparse coding with S λ
( X ) =
||
X || 1 (columnwise).
However, while neurons fire sparsely, they are also specialized to certain types of visual stimuli in the input space.
As formulated, (1) makes no explicit assumptions about the structure of this sparsity in neural latent space.
LLD discards the reconstruction loss and encodes natural image stimuli to local ensembles of image patches { ( x (1)1 , . . .
, x (1) n ) , . . .
, ( x ( B ) 1 , . . .
, x ( B ) n ) } , with superscipts denoting local ensembles and subscripts denoting ensemble members.
LLD is a shallow network where s ( j ) i =
ReLU
[Equation]
i
[Equation]
A covariance matrix
[Equation]
is formed on the j th ensemble.
The LLD loss is formulated as:
[Equation]
where Σ g is the response covariance to all patches in the batch.
Due to the algebraic connection between trace and singular values, the numerator pushes the local ensembles to low dimensional subspaces, while the denominator pulls the ensembles to as many different low dimensional subspaces as possible.
By exploiting this tradeoff between local and global subspaces, the LLD model is able to better replicate the diversity of SCRF shapes, which exhibit a phase symmetry in rhesus macaque data.
These phases are obtained for each learned filter by fitting a two-dimensional Gabor function, and their distributions for the learned set of filters are shown in Figure 3.
[Figure]
3. Locality-Constrained Reconstructive Frameworks
Can we incorporate additional structure into the reconstructive framework to better match the experimental data?
The weighted- ℓ 1 constraint penalizes neural encoding activity based on the distance between the natural image stimuli and the basis functions a j , where:
[Equation]
Here, neurons are specialized to certain types of input as large neural energy requirements will limit the strength of the firing rate x j .
In contrast to the original sparse coding alternating minimization scheme, we solve this through algorithm unrolling (Monga et al., 2020) into a deep recurrent autoencoder, which projects the encodings onto the probability simplex through a nonlinearity P S .
This penalty can be mathematically interpreted as a bipartite graph Laplacian on the m + n basis functions and inputs (vertices), whose edge weights between the y thi and a thj vertices are x ij , and
0 otherwise.
Thus, the stimuli can be easily clustered by performing an eigendecomposition on this constructed Laplacian.
In a discriminative classification task, this will allow for a more rigorous analysis of a given neuron’s sensitivity to various class types.
We have also explored an iterative Laplacian scheme (Kodirov et al., 2015) where:
[Equation]
for a pre-constructed (or iteratively updated) graph Laplacian G .
The penalty (4) is typically used in addition to an ℓ 1 penalty.
Here, however, G is built on the stimuli space to preserve local pairwise distances in latent space, whereas the weighted- ℓ 1 penalty essentially interpolates the manifold in R d with the set a j ∈ [ m ] and then uses as few basis functions as possible.
Thus S LAPλ only constrains firing rates, while S WLλ constrains both the firing rates and the learned basis functions, which we refer to as “spatial regularization.”
In our experiments, we find that the additional weighted- ℓregularization technique shifts the spatial phase distribution to a more diverse range and vastly improves symmetry.
The weightedℓpenalty makes the general sparse coding framework competitive with other local frameworks like LLD in terms of symmetry while maintaining the core ideas of the original model.
4. Conclusion
The improved spatial symmetry warrants further exploration into deep recurrent autoencoders (with varying flavors of locality constraints) as a model of the primary visual cortex.
Is explicit image reconstruction biologically plausible?
This assumption may be loosened in future work by considering a distribution of codes instead of a point estimate (Park and
Pillow, 2020).
However, given previous work showing the intrinsic hierarchical structure of discriminative recurrent sparse autoencoders (Rolfe and LeCunn, 2013), the findings presented here offer a potential path towards rigorously describing the differentiation of receptive fields that match experimental data. 5. Acknowledgements
Jonathan Huml would like to acknowledge support from the Harvard Institute for Applied
Computational Science, and Demba Ba would like to acknowledge support from NSF National Science Foundation DMS-2134157.
Appendix A. Unrolled Network and Training
The spatial phase plots are obtained through a three-step process:
Train the (unrolled) network on the original Sparsenet data (Olshausen and Field, 1997) image patches 2.
Using the learned basis functions, obtain the simple cell receptive field estimates through spike-triggered averaging 3.
Fit the 2D-Gabors to the the receptive field estimates
We leave the details of (2) and (3) aside for an extended abstract and refer the reader to Ringach (2002) and Zylberberg et al.
For step (1):
Encoder:
Let A (0) ij ∼ N (0 , 1) and x (0) =
˜x (0) =
Then, given A and y , we solve for x ∗ ∈ argmin x L ( A , y , x ) by projected gradient descent:
[Equation]
for t ∈ [ T ].
In the code, we run T = 15 iterations of projected gradient descent (similar to
FISTA).
We have α = σ max ( A ) − 2 and γ ( t ) is given by:
[Equation]
The gradient of the weighted- ℓ 1 penalty is given by:
[Equation]
[Equation]
We also explored a Laplacian penalty S LAP λ ( X ) = tr( X G X T ) to promote locality.
The gradient of this penalty is most clean when written in a batch setting:
[Equation]
where D − A =
G ∈ R b × b is a graph Laplacian built from a binary k NN graph on the inputs
Y n × b ; that is, the edge weight between y i and y j is 1 if i, j are k -nearest neighbors andotherwise.
We choose k = 4 in our experiments, though more rigorous analysis is required to determine the effect of this hyperparameter.
Decoder:
The decoder is a simple linear readout, where given A and x , ˆy =
Ax
Appendix B. Discriminative Task on Whole Images
Much to our surprise, the weighted- ℓ 1 loss and unrolled architecture also seems to learn
Gabor-like filters even on whole (albeit small) images in addition to random image patches.
Below, we include a set of filters learned on CIFAR10, for example.
Although these filters are less clean than those learned on the original Sparsenet data (Olshausen and Field, 1997), this offers a path to training an end-to-end discriminative classification task in the spirit of (Rolfe and LeCunn, 2013).
How do the categorical and part of units of that paper align with the well-tuned and broadly-tuned cells of the visual cortex, if at all?