A case for sparse positive alignment of neural systems

Authors: jacob s prince
colin  conwell
george a alvarez
talia  konkle
Venue: ICLR_cc_2024_Workshop_Re-Align
Published: 2024-02-09 10:04:29

Abstract: Brain responses in visual cortex are typically modeled as a positively and negatively weighted sum of all features within a deep neural network (DNN) layer. However, this linear fit can dramatically alter a given feature space, making it unclear whether brain prediction levels stem more from the DNN itself, or from the flexibility of the encoding model. As such, studies of alignment may benefit from a paradigm shift toward more constrained and theoretically driven mapping methods. As a proof of concept, here we present a case study of face and scene selectivity, showing that typical encoding analyses do not differentiate between aligned and misaligned tuning bases in model-to-brain predictivity. We introduce a new alignment complexity measure -- tuning reorientation -- which favors DNNs that achieve high brain alignment via minimal distortion of the original feature space. We show that this measure helps arbitrate between models that are superficially equal in their predictivity, but which differ in alignment complexity. Our experiments broadly signal the benefit of sparse, positive-weighted encoding procedures, which directly enforce an analogy between the tuning directions of model and brain feature spaces.

Main paper: 
 introduction: 
 The dominant paradigm in model-brain alignment involves fitting linear encoding models that map from the internal activations of DNNs to responses in visual cortex (Yamins et al., 2014; Kriegeskorte, 2015; Kietzmann et al., 2019; Serre, 2019; Storrs et al., 2021; Conwell et al., 2022) . This paradigm has led to impressive progress in our ability to predict response structure along the ventral visual hierarchy. Such advances are especially evident in large-scale, community-wide efforts to "benchmark" the predictivity of DNN models (Schrimpf et al., 2018; 2020; Cichy et al., 2019; Willeke et al., 2022) . However, while some progress has been made in attempting to more clearly define the long-term goals of this modeling approach (Doerig et al., 2023; Sucholutsky et al., 2023) , it remains unclear whether current methods are the most effective or efficient way to develop DNN models that are increasingly able to explain brain function.A key issue lies in the basic assumptions of linear encoding, which de-emphasize the particular tuning properties of DNN features, given that they can be remixed arbitrarily to map onto neural measurements. Popular rotation-invariant metrics (such as linear encoding, RSA, CCA, Kriegeskorte et al., 2008; Raghu et al., 2017) pose several challenges. First, in the biological system, the tuning directions of neurons (i.e., their selectivity) is a reliable indicator of the underlying functional mechanism, as shown through extensive neuropsychological evidence linking damage of categoryselective cortical areas to category-specific behavioral deficits (Epstein et al., 2001; Barton et al., 2002; Moro et al., 2008 , see Kanwisher & Barton, 2011 for review) . As such, an over-reliance on rotation-invariant metrics may impair our ability to translate good encoding models into an accurate functional understanding of the neural system (Khosla & Williams, 2023 , see also Williams et al., 2021) . A related problem is that linear reweighting is itself quite flexible. This complicates the interpretation of whether the predictivity of a DNN is more a consequence of its learned representations, or, of potentially dramatic scaling and rotation of the internal feature space.These issues motivate us to present a series of analyses that argue in favor of stronger, theoretically grounded constraints on linear encoding. First, we propose an intuitive measure for comparing the relative complexity of different alignment methods, which may achieve similar prediction levels through very different feature transformations (Figure 1A-B ). We perform small-scale simulations showing how this measure can differentiate between different linear models that are equally predictive, by favoring those that place high importance on target-aligned features (Figure 1C ). Next, we present a case study that shows why rotation sensitivity matters in realistic encoding scenarios. We analyze large-scale human fMRI measurements from the fusiform face area (FFA), comparing two DNN feature spaces that vary dramatically in their theoretical relationship to the target brain region (face-vs. scene-selective units, Figure 2 ). We observe that: (i) typical encoding procedures fail to differentiate between these models; (ii) sparse-positive encoding models do so quite effectively; and, (iii) tuning reorientation provides a quantitative means to understand these different outcomes. Finally, we benchmark several hundred DNNs in their ability to predict face-and scene-selective regions of visual cortex, further validating that the tuning reorientation measure provides a useful way to arbitrate between equally predictive models (Figure 3 ). 
a measure of alignment complexity for encoding models of neural data: 
 We propose a new alignment complexity measure called tuning reorientation (Θ) that can be computed in a straightforward way for a typical neural encoding setup (Figure 1A ). Tuning reorientation attempts to quantify the rotation of feature vectors towards a target orientation in a multidimensional feature space. It does so by integrating the concept of directional similarity and the importance of each feature vector, as determined by the encoding weights themselves (Figure 1B ).Computing Θ for a given encoding target involves several steps. For mathematical description, see Appendix sec. A.1, and for a simple Python code implementation, see Appendix sec. A.2. First, the target vector is normalized to unit length, ensuring that only its direction, not its magnitude, influences the outcome. Each feature vector is also normalized to unit length before computing its cosine distance to the normalized target vector, capturing the angular deviation between each feature and the target. These cosine distances are then weighted by the absolute magnitude of each feature weight, integrating the importance of each feature into the measure. This step penalizes high weights placed on misaligned DNN features. Finally, the weighted distances are normalized by the total sum of the absolute feature weights, which adjusts for the overall scale of the weights and ensures comparability across different sets of features. The final measure, Θ, is the sum of these processed distances, providing a scalar value that reflects the weighted angular reorientation of the feature set relative to the target.shows an example of how the tuning reorientation metric compares across a range of encoding scenarios-including Ordinary Least Squares (OLS), Lasso, ElasticNet, and Ridge regression. We evaluate each encoding model under two scenarios: allowing negative coefficients and enforcing positive coefficients only. For illustrative purposes, we consider a 2-dimensional target vector (e.g. a neural response to two different images), and fit each encoding model using the same 100 features. We randomly generate the 100 feature vectors from a standard normal distribution, scaled by 1.5, and shifted to have a mean of -0.75 with a target vector of [3, 2.5].The visualization makes clear that different encoding models assign weight across the 100 features quite differently, and that the tuning reorientation metric captures these differences. Specifically, when negative coefficients are allowed, many features with poor tuning alignment with the target receive strong weight (yielding relatively large Θ values, Figure 1C , top row). In contrast, the positivity constraint pressures toward solutions emphasizing features that are well-aligned to the target, with positive Lasso achieving a particularly compact solution via minimal reorientation (Θ = 0.06, Figure 1C , bottom row). We next present a case for why tuning reorientation is a valuable measure, under more realistic encoding scenarios examining how well DNN features can predict responses in human visual cortex. We next perform a targeted case study of the fusiform face area (FFA) using large-scale, high resolution fMRI measurements from the Natural Scenes Dataset (Allen et al., 2022) . The FFA is perhaps the canonical example of a brain region with clear empirical evidence linking the feature tuning direction (selectivity to face images over other categories), with functional role (selective involvement in face recognition). An intuitive desideratum for an encoding model is that DNN features used to predict face-selective brain responses should themselves also have face-selective tuning. However, here we show that standard encoding approaches do not respect this correspondence and require additional constraints.Using an independent DNN "localizer procedure" (Prince et al., 2023), we identify two groups of units with either robust face-selectivity or robust scene-selectivity, in layer fc6 of an AlexNet architecture trained with the self-supervised Barlow Twins objective. Layer fc6 of AlexNet has been analyzed extensively in previous studies of human and primate high-level visual representations (e.g. Bao et al., 2020) . For our encoding analysis, we specifically isolate the top 100 most face-and scene-selective units in the layer. Figure 2A shows these selective units' tuning orientations when projected into the 2-dimensional PC space of the ImageNet validation set (computed from layer fc6 using a subset of 2000 stimuli). As expected, we observe that face-and scene-selective units tend to orient toward very different parts of high-level latent feature space.Next, we fit a range of encoding models with different regularization constraints. Critically, we used either the face-selective or scene-selective DNN features to model responses in this face-selective brain region. To assess the goodness of these encoding models, we followed standard procedures and measured predictivity using a set of held-out images, computed as the average Pearson correlation between the predicted and observed response profiles for each voxel in FFA. We additionally computed our tuning reorientation metric (Θ) for each encoding model, using the DNN feature vectors for the 515 independent test images, and their corresponding model-predicted brain activity matrix as the target. For further details on the encoding procedure, see Appendix sec. A.3.The results are summarized in Figure 2B-E . Surprisingly, we find that both face-and scene-selective units are equally capable of explaining response structure in this face-selective ROI when using standard encoding procedures, across regularization techniques (Figure 2B ). This is striking, and intuitively problematic, as the two groups of DNN features have dramatically different tuning orientations in image space. However, the Θ metric provides a means to differentiate these equivalent encoding outcomes -the face-selective units require relatively little tuning reorientation, while the scene-selective units require much more tuning reorientation to predict this face-selective brain region. (Figure 2C ).We next considered the same encoding procedures but with an additional positivity constraint on the encoding weights. Now, we find that different brain prediction levels emerge across the DNN feature subsets (Figure 2D ). The face-selective units yield a similar degree of brain predictivity as before. However, the positivity constraint causes scene-selective units' predictivity to plummet (as high weighting of misaligned features is no longer possible).Notably, L1-sparse (Lasso) regression appears to stand out among the positive-constrained regression schemes in attaining the best balance of high encoding prediction and low model complexity. In fact, when examining the impact of optimizing the regularization hyperparameter (α, see Appendix sec. A.4), we observe that further improvements in performance (and reductions in tuning reorientation) are possible for both Lasso and ElasticNet.Overall, this case study reveals that standard model-to-brain encoding practices are quite flexibleallowing even oppositely tuned features to be negatively weighted to achieve comparable brain predictivity. We show that measures of tuning reorientation can provide insight into the alignment complexity of the encoding model. And, we propose that including sparse positive constraints on the encoding model places greater theoretical weight on direct alignment of tuning directions between the model and brain.All analyses thus far have focused on a single AlexNet architecture and self-supervised learning scheme. To explore the generality of these effects across larger groups of models, we tested N=106 diverse neural network models, which have been previously analyzed in benchmark analyses of the Natural Scenes Dataset (Conwell et al., 2022) . We localized both face-and scene-selective DNN units in these models, and used them to fit standard ridge regression encoding models to brain data from both face-and scene-selective regions. In aggregate, we observed similar brain prediction levels-if anything, face-selective units were generally more predictive of both brain regions. However, our metric of tuning reorientation reveals and quantifies the differences in alignment complexity underlying these comparable encoding fits: mismatched units require more tuning reorientation through the encoding weights than the units with matched tuning. Note that here we focus on FFA and PPA, selecting specific groups of DNN units to demonstrate and validate our approach. However, reorientation is a general metric, and does not require predefined tuning directions.  
discussion: 
 Here we have shown that standard linear encoding methods enable highly flexible mappings between DNNs and brains, yielding high prediction levels even from DNN units with clearly mismatched tuning to the target brain region. We illustrate this undesirable degree of flexibility through case studies of FFA and PPA, which, despite their functionally distinct roles and selective tuning, can be predicted equally well by face-and scene-selective DNN units. The discovery that such predictions mask underlying differences in tuning orientation leads us to propose a theoretically grounded mapping approach that incorporates both positivity and sparsity constraints.The positivity constraint effectively limits tuning reorientation, and relates to the operational principles of ReLU networks, where only positive activations propagate to subsequent layers. Allowing negative weights in the encoding model may introduce information into the predictive framework that the subsequent DNN layer itself cannot access. The sparsity constraint further refines the modelto-brain mapping function by reducing feature remixing, thus pressuring toward maximal intrinsic alignment between the tuning of brain and DNN features. Broadly, sparse-positive linking constraints fit within a theoretical framework where individual unit tuning directions are functionally relevant, not arbitrary, for both biological and artificial systems (Prince et al., 2023) . Within this framework, models that require less reorientation to map to brain responses are more aligned.A.1 QUANTIFYING TUNING REORIENTATION Given a set of feature vectors F = f 1 , f 2 , ..., f n , a target vector t, and a set of weights W = w 1 , w 2 , ..., w n , the tuning reorientation, denoted as Θ, is computed as follows:• Normalize the target vector to have a unit norm:t norm = t ∥t∥• For each feature vector f i , normalize it to have a unit norm and compute the cosine distance to the normalized target vector:d i = 1 - f i ∥f i ∥ • t norm• Weight each cosine distance by the absolute value of the corresponding weight:d wi = d i × |w i |• Normalize the weighted distances by the sum of the absolute weights, to equate the range of reorientation values across encoding scenarios:d ′ wi = d wi n i=1 |w i | provided that n i=1 |w i | ̸ = 0.• The tuning reorientation Θ is then the sum of the normalized weighted distances: The FFA encoding analyses involve the 4 NSD subjects who completed the full experiment, and are repeated in an identical manner for face-and scene-selective units. For each voxel in region FFA-1 (which was defined using the same localizer stimuli as used for the DNN units), we fit 8 linear models (4 regularization methods x positivity-True/False). The regularization methods were OLS, Lasso, Ridge, and ElasticNet. A constant α hyperparameter value of 0.1 was used for all regularization schemes, and the balance between L1 and L2 penalty for ElasticNet was set to the default of 0.5. All features and targets were standardized prior to fitting. Each model fit used data from 1000 subject-specific training images, and the encoding models were then used to predict brain responses to an independent set of 515 subject-overlapping images.Θ = n i=1 d ′ wi A.2 COMPUTINGA.4 OPTIMIZING REGULARIZATION LEVELS FOR PREDICTION OF FFA DATA for each distinct regression fit, and selecting the value that maximizes brain prediction using an independent validation set of 1000 stimuli. Shaded regions reflect the range (over subjects) of voxelaveraged noise ceilings within FFA. 
 
 Appendix:  



Reviews: review: title: title: Comparing alignment on models w/ equal brain prediction
main_review: main_review: The authors compare linear encoding models of fMRI activity to a new alignment approach involving “tuning reorientation” which favors DNNs that achieve brain alignment without distortion of the original DNN feature space. This can help researchers disambiguate between two models which perform similarly in terms of brain prediction but vary greatly in terms of alignment complexity. Using this approach the authors show the benefit of using sparse, positive-weighted encoding models as they lead to easier interpretation between feature tuning and encoding performance. 

Tuning reorientation is computed as the sum of normalized outputs after weighting cosine similarities (between brain and DNN features) by the absolute magnitude of the weights matrix produced by the linear regression encoding model.

I do not follow the logic that the “best” encoding model for say, FFA activity, should solely consist of features that maximally activate to face selectivity. The authors support this argument via case study experiments using a subset of scene-selective AlexNet units vs. face-selective AlexNet units to train separate linear encoding models. They find that both encoding models performed similarly well but their tuning reorientation metric showed much better alignment with the face-selective AlexNet model. 

I personally do not find it “surprising” that encoding performance was similar for both models. If you have a feature that is 100% anticorrelated with face-selectivity, then it is practically speaking still face-selective: you will know that the lower its activation the more face-specific stuff is going on. Why is it problematic for encoding models to leverage such anticorrelated units? I wouldn’t really call the scene-specific model “more complex” or exhibiting more “distortion” than the face-specific model, the difference between the two is very simple in that one just has opposite tuning. Elaboration on the thinking behind why such tuning reorientation would be useful would be appreciated.

“Allowing negative weights in the encoding model may introduce information into the predictive framework that the subsequent DNN layer itself cannot access.” I did not understand the support for this reasoning.
strength_weakness: strength_weakness: Interesting research direction that should prompt good discussion. Concrete results, well-made figures, and valuable discussion points.
title: title: important improvement in an alignment metric , weak test of the metric
main_review: main_review: This work aims to address a significant challenge in the measurement of alignment between two sets of neural features: the commonly used linear mapping is under-constrained. The proposed solution introduces sparse-positive constraints on the mapping. To highlight the differences between constrained and unconstrained mappings, the concept of "tuning reorientation" is introduced. Tuning reorientation measures the rotation of a feature vector towards a target orientation. The alignment between face-selective versus scene-selective units in a Deep Neural Network (DNN) and face-selective areas in humans was measured using both unconstrained and constrained mappings. The results demonstrated that the sparse-positive mapping effectively rejected scene-selective units as a suitable model for face-selective brain areas.

This work tackles an important issue in measuring the alignment of units in DNNs and neurons/voxels in the brain. However, I have a minor concern. While the proposed constrained encoding metric is well-motivated and effective, the test to reveal its efficacy could be more substantiated. The main goal of measuring alignment between models and the brain is to uncover novel insights into the computational processes within the brain, using DNNs as a lens. Applying fMRI localizers to DNNs to define scene versus face-selective units, and validating the proposed metric by assigning higher scores to (face units, face-selective brain region) and lower scores to (scene units, face-selective brain region), seems to miss the broader objective of alignment. This approach presupposes a highly modular processing of different classes of natural stimuli (e.g., faces and scenes) in both the brain and DNNs, an assumption that cannot be taken for granted. Notably, all DNNs evaluated in the study were likely trained on datasets like ImageNet, which are biased towards objects (each image typically features an object with a category label). Thus, scene representations are de-emphasized in favor of objects within the image, a trend observed even in self-supervised models like Barlow Twins. A more appropriate test, assuming modularity, would compare two distinct categories of objects (e.g., faces versus houses). 
An even stronger test, before even starting to analyze the alignment to brain regions, would be to measure the alignments between two DNNs with completely known objective functions and identical architecture.
Overall, this work has important implications for the neuroscience community interested in alignments between DNNs and brain regions.
strength_weakness: strength_weakness: Unconstrained linear mapping is a significant challenge in measuring alignments between natural and artificial networks and this work provides a simple yet effective solution to the problem.
title: title: What drives model-neural alignment (DNN itself vs. linear mapping to data) and how can this be estimated?
main_review: main_review: ## Summary

This paper investigates the estimation of the alignment of a deep neural network (DNN) model to neural activity (human fMRI, 4 subjects, natural scenes dataset; NSD). The authors suggest to regard any alignment as a two-part procedure composed of (1) representations „from the DNN itself“, and of (2) the „encoding model“ linking the DNN representations to the neural data. They argue that the flexibility of the second step may be so powerful that the inherent DNN tuning properties might be insufficiently reflected in some overall alignment score. To disentangle the relative contributions „from the DNN itself“ and from the „encoding model“, they introduce a tuning reorientation (Θ) measure estimating the alignment of a set of feature vectors (here „from the DNN itself“) to some target vector (here based on fMRI data). Different alignment methods might achieve similar overall alignment scores, but might do so using very different DNN feature transformations, which the tuning reorientation (Θ) might be able to distinguish. 

The authors use AlexNet (penultimate layer: fc6) to predict human neural activity from a face-selective region (FFA; fig. 2). They find that both face- and place-selective model units explain activations from cells tuned to faces (FFA) equally well across all regularization methods tested (fig. 2B). To explain this surprising result (intuitively, face-tuned units should be better at predicting activity from face-tuned neurons), they suggest different degrees of DNN feature transformations at play. They measure the relative contribution of the „encoding model“ to the overall fits using tuning reorientation. The authors find that across all type of regularization tested face-selective model units require much less tuning orientation than scene-selective model units (fig. 2C). If, however, they apply a positivity constraint to the weights, the ability of scene-selective model units to predict neural activity from face-tuned neurons is considerably reduced, whereby this is not true for face-selective units (fig. 2D). Further optimizing some regularization hyperparameter can lead to increased alignment levels for Lasso and Elastic (fig. 4B) resulting in minimal tuning reorientation values. Last, only using ridge regression in combination with no positivity constraint in >100 DNNs the authors show how their main results generalize across architectures (fig. 3). 


## Strengths and weaknesses
### Strengths
The paper is concise, and clearly written, and has informative, and well-designed figures. It addresses a very interesting problem, namely that model units tuned to category x might predict activity from neurons tuned to category y equally well as model units tuned to category y (fig. 2B). The paper introduces a clearly motivated measure to estimate the contribution of the transformation (through linear mapping) of DNN features to a model-brain alignment score. The introduction of the tuning reorientation (Θ) measure opens a debate as to whether an alignment score should exclusively evaluate the ability of a combination of DNN and linear mapping to predict the data at hand or whether it is also fruitful to consider relative contributions to the overall alignment score of the DNN itself vs. the linear mapping. 
Two extremes of this debate might be captured by the following standpoints. 

Prediction-focused view: I am only interested in how well a given model (DNN itself + encoding model) predicts some data, and I am agnostic to which model part this ability might mainly be based on (DNN itself or encoding model). 

DNN-representation-purist view: I would like to know how well a given model (only DNN itself) was able to predict the data and how much or little fitting (tuning reorientation) was still required from the „encoding model“ (the link between DNN representations and the data) to reach the overall alignment score. 
Following the DNN-representation-purist view, a brain alignment score using linear mapping could be divided by the tuning orientation Θ to yield a tuning-reorientation-adjusted version of itself. 

### Weaknesses
The tuning reorientation (Θ) measure is well motivated, but I believe it should be normalized by some sort of tuning reorientation (Θ) noise ceiling considering the data at hand. Let’s unpack this by first reiterating why the noise ceiling in the case of prediction r (fig. 2B) is useful. If the prediction r would be expressed relative to the lower bound of the noise ceiling, this would allow straightforward comparisons of prediction r values across regions of interest, e.g. FFA and PPA (see minor requested changes for fig. 3 below). Introducing a tuning reorientation (Θ) noise ceiling in fig. 2B would render the values of tuning reorientation (Θ) interpretable. For example, Θ values within the noise ceiling (indicating a model fit as good as the data to itself) would indicate strong reorientation scores, whereas values above the noise ceiling would indicate poorer reorientation than required to map the data to itself (the theoretical lower bound is 0, so worse Θ values than based on the data itself yield higher reorientation scores). 

### Initial recommendation
Accept
- Addresses important question at the heart of brain modeling and opening an interesting debate (for details see „strengths“). 
- Suggested measure “tuning orientation” can help to disentangle differential contributions to alignment. 

## Requested changes
### Major
Consider creating a tuning reorientation (Θ) noise ceiling as discussed in „weaknesses“. 

### Minor
„We perform small-scale simulations showing how this measure can differentiate between different linear models that are equally predictive, by favoring those that place high importance on target-aligned features (Figure 1C).“ 
- Please add information in this figure showing that the different scenarios are equally predictive. Currently I can only read this in the main text and can see in the figure that the tuning reorientation varies. 

### Figure 3
- Noise ceiling missing in upper row. Maybe express predictivity r relative to the lower bound of the respective noise ceiling?
- Perform statistics in upper and lower row to demonstrate whether you do or do not find significant differences between face- and scene selective units in FFA and PPA and for predictivity r and reorientation.
strength_weakness: strength_weakness: Research is original, well executed, and thought provoking.