Table of Contents
Fetching ...

Brain Decodes Deep Nets

Huzheng Yang, James Gee, Jianbo Shi

TL;DR

FactorTopy introduces a topology-constrained, factorized brain-to-network mapping that visualizes how deep networks organize computation relative to the brain by predicting fMRI responses from image features. The method maps 4D network features across space, layer, scale, and channel to brain voxels, revealing how training objectives and data shape hierarchical alignment. Key findings show CLIP achieves the strongest brain-hierarchy alignment, which improves with scale, while many other models lose alignment as capacity grows; fine-tuning on small datasets tends to rewire networks, with CLIP showing greater robustness. The work provides a brain-informed lens for diagnosing model behavior and offers a visualization toolkit for interpreting deep networks through their brain-inspired organization.

Abstract

We developed a tool for visualizing and analyzing large pre-trained vision models by mapping them onto the brain, thus exposing their hidden inside. Our innovation arises from a surprising usage of brain encoding: predicting brain fMRI measurements in response to images. We report two findings. First, explicit mapping between the brain and deep-network features across dimensions of space, layers, scales, and channels is crucial. This mapping method, FactorTopy, is plug-and-play for any deep-network; with it, one can paint a picture of the network onto the brain (literally!). Second, our visualization shows how different training methods matter: they lead to remarkable differences in hierarchical organization and scaling behavior, growing with more data or network capacity. It also provides insight into fine-tuning: how pre-trained models change when adapting to small datasets. We found brain-like hierarchically organized network suffer less from catastrophic forgetting after fine-tuned.

Brain Decodes Deep Nets

TL;DR

FactorTopy introduces a topology-constrained, factorized brain-to-network mapping that visualizes how deep networks organize computation relative to the brain by predicting fMRI responses from image features. The method maps 4D network features across space, layer, scale, and channel to brain voxels, revealing how training objectives and data shape hierarchical alignment. Key findings show CLIP achieves the strongest brain-hierarchy alignment, which improves with scale, while many other models lose alignment as capacity grows; fine-tuning on small datasets tends to rewire networks, with CLIP showing greater robustness. The work provides a brain-informed lens for diagnosing model behavior and offers a visualization toolkit for interpreting deep networks through their brain-inspired organization.

Abstract

We developed a tool for visualizing and analyzing large pre-trained vision models by mapping them onto the brain, thus exposing their hidden inside. Our innovation arises from a surprising usage of brain encoding: predicting brain fMRI measurements in response to images. We report two findings. First, explicit mapping between the brain and deep-network features across dimensions of space, layers, scales, and channels is crucial. This mapping method, FactorTopy, is plug-and-play for any deep-network; with it, one can paint a picture of the network onto the brain (literally!). Second, our visualization shows how different training methods matter: they lead to remarkable differences in hierarchical organization and scaling behavior, growing with more data or network capacity. It also provides insight into fine-tuning: how pre-trained models change when adapting to small datasets. We found brain-like hierarchically organized network suffer less from catastrophic forgetting after fine-tuned.
Paper Structure (66 sections, 3 equations, 35 figures, 16 tables)

This paper contains 66 sections, 3 equations, 35 figures, 16 tables.

Figures (35)

  • Figure 1: Visualize Deep Networks in the Brain. The training objective of the brain encoding model is to predict the brain’s fMRI signal in response to an image stimulus. 3D visual brain surface is flattened into 2D for better visualization. ① Image features are extracted from a pre-trained network. ② Feature selection for each voxel is randomly initialized and learned using the brain encoding training objective. The selection is factorized in the layer/space/scale axis; the topological constraint improves selection smoothness and confidence. ③ Linearized brain encoding model. ④ After training, linear weights are used to cluster channels. We use the resulting brain-to-network mapping together with the known knowledge of the brain to answer the question "how do deep networks work?".
  • Figure 2: Image features (selected channels) for brain ROIs. V1 is orientation filtering, V4 segmentation, FFA face-selective.
  • Figure 3: Topological Constrained, Factorized, Brain-to-Network Selectors for CLIP. Top: factorized-selectors trained with topological constraints improved confidence of the mapping (color brightness) and mapping smoothness (colored as Section \ref{['sec:color']}). Bottom left: individual layer-selector weight $\bm{\hat{\omega}}^{layer}$, note layer 4 is mostly aligned with V1, and the last two are aligned with the body (EBA) and face (FFA) region. Bottom right: space-selector $\bm{\hat{u}}^{space}$: 3D voxels, dots, are mapped to the image space with color dots indicating the layers. For later layers, only center image regions are selected.
  • Figure 4: Brain Score. Left: raw brain score $R^2$. Right: difference of score to the model-wise max score (left). Insights: 1) CLIP and DiNOv2 predict semantic regions better but relatively weak for early visual, 2) SAM and MAE are better at early visual region but weaker for body (EBA) and face (FFA) region, 3) Stable Diffusion (SD) shows a good prediction in all regions overall.
  • Figure 5: Layer Selectors, Brain-Network Alignment. All models are ViT architecture, number of layers is marked in the colorbar x-axis. Brightness is confidence measurement (defined in Section \ref{['sec:color']}), and lower brightness means a softer selection of multiple layers. Top: average of three subjects, base size 12-layer model. Middle: subject #1, 12 layer small(S) and base(B) model, 24 layer large(L) model, 32 layer huge(H) model, 40 layer gigantic(G) model. Bottom: subject #2 and #3, base size 12-layer model. Insights: 1) CLIP layers align best with the brain's hierarchical organization, 2) ImageNet and SAM last layer align with mid-level in the brain, indicating their training objectives aimed at mid-level concept; 3) DiNOv2: with a larger model, its hierarchy no longer align with the brain.
  • ...and 30 more figures