Naturalistic Cognitive Neuroimaging
Interpreting Brain Activity with Predictive Models
Modeling, prediction, and scientific goals
A common goal across science and engineering is to use measurements to build a model with fewer effective dimensions than the raw data, then use that model to predict new observations. The central challenge is balancing interpretability—understanding what a model represents—with predictive performance—how well it generalizes to new data.
In many areas of science, researchers prioritize finding a model that explains observations in an understandable way. However, studies may rely heavily on statistical significance without requiring separate training and test datasets or direct tests of predictive accuracy.
Engineering places strong emphasis on prediction because a model must work in practice. An engineered system that appears statistically successful but fails in use can have serious consequences.
A mathematically interpretable model is especially valuable when its conditions and limits can be established. When a system is too complex for such a model, a more flexible method—such as a neural network—can be a practical starting point. Its predictions still need to be tested, and its internal operations may be difficult to explain.
In neuroscience, a highly flexible model is useful only if it can be fitted with the available data and interpreted in a way that advances understanding. Otherwise, strong predictive performance alone may not answer the scientific question.
A strong scientific workflow aims not only to fit measured data, but also to estimate how well a model predicts unseen data and what aspects of the system the model captures.
Why the brain is difficult to model
The brain’s organization and activity create substantial challenges for measurement and modeling.
Complex, distributed, and dynamic organization
The brain contains roughly 80 billion neurons arranged in hierarchical, parallel networks.
Connections are many-to-many and recurrent: activity can circulate through interconnected regions rather than moving only in one direction.
Brain systems operate at multiple scales, and the relationships between those scales are not always well understood.
Neural representations change with task demands, attention, and learning. The physical network may remain relatively stable over a short period, while the information represented by its activity changes continually.
The human brain contains many distinct structures—potentially hundreds—with different functions and representations. A complete account of how these regions encode information is not yet available.
These properties make the brain unlike many conventional artificial neural networks. Such networks may simplify the biological system substantially, for example by using fixed representations or a limited form of feedforward processing.
Neuroscience is data-limited
A field can be limited mainly by either its theories or its data. Neuroscience is often data-limited: researchers cannot measure the relevant neural activity with enough spatial, temporal, or population coverage to characterize the system fully.
The challenge is analogous to studying a vast astronomical system using a poor telescope: the object of study is extremely complex, but only a limited and noisy portion can be observed at once.
Even unusually large datasets may remain insufficient for fitting complex models. More data help, but they do not automatically solve the problems of measurement quality, model complexity, or interpretation.
Measurement constraints
Functional MRI measures changes in blood oxygenation and blood flow that are associated with neural activity. It therefore provides a useful, non-invasive view of brain-wide activity, but its temporal resolution is slow relative to neural firing:
Neurons can fire on the order of 100 times per second.
The blood-flow and oxygenation responses measured by MRI change much more slowly.
In the described setting, little useful MRI signal information is available at timescales substantially faster than about one second.
Consequently, MRI can reveal changing patterns of brain activity during complex tasks, but it does not directly record individual neurons firing at millisecond resolution.
Naturalistic navigation as a brain-mapping problem
A virtual driving task illustrates how researchers can study brain activity during complex, naturalistic behavior.
Task and measurements
A participant lies in an MRI scanner and drives through a large virtual town using a steering wheel and pedals. The town contains roads, buildings, vehicles, pedestrians, and traffic signals. Participants first learn the town and then follow navigation instructions, such as driving to a specified destination.
The task engages many kinds of information and behavior at once:
Visual perception: interpreting roads, buildings, vehicles, pedestrians, and signs.
Motor control: steering and operating pedals.
Navigation: determining where the participant is, where to go, and how to get there.
Memory: retaining the town’s layout and recalling past locations.
Planning: anticipating a future route.
Attention and decision-making: prioritizing relevant features and avoiding hazards.
The experimental setup can provide detailed information about the task:
The virtual environment supplies the locations and identities of objects and structures.
Eye tracking reveals where the participant looks.
Recorded controls provide measures of motor behavior.
The MRI provides brain-activity measurements across many locations, or voxels.
In the example described, the MRI data comprised activity from roughly 100,000 locations in the brain. The researchers treated task and stimulus information as predictors, conventionally denoted by X, and brain activity as responses, denoted by Y. The analysis therefore becomes a form of regression: use task-related information to predict measured brain activity.
Why this is a regression problem
A general model can be written as a mapping from predictors to brain responses:
Here, X can include information about the visual scene, task demands, routes, eye movements, and motor actions. The goal is to estimate predictions Y^ that match measured brain activity Y.
A simple linear model may be inadequate because the relationship between a complex task and brain activity is likely to be highly nonlinear. One approach is to transform the task variables into a richer intermediate representation and then use a linear regression to predict brain activity from that representation.
Linearized models and feature spaces
The linearized regression framework
In a linearized model, the inputs first pass through a computational model that produces features intended to represent information that might exist in the brain. A linear mapping then relates those features to brain responses:
The feature-generating step can be nonlinear and complex, while the final regression is linear in the features. For example, a model could extract visual categories, motion information, route distance, or likely future paths from the task.
This approach is useful because it can combine two advantages:
The intermediate model can express complex relationships between task inputs and useful representations.
The final regression provides a relatively tractable way to estimate how those representations relate to measured brain activity.
The approach assumes that the relevant relationship is sufficiently stable over the analysis period. If brain representations change substantially over time—a condition called non-stationarity—a model fitted under one set of conditions may no longer predict activity under another.
Multiple feature spaces
A study can test several candidate feature spaces at once. In the driving experiment, the researchers fitted 33 models or feature spaces simultaneously. These included:
Distance remaining along the route.
The future path the participant was expected to take.
Straight-line, or “beeline,” distance to a destination.
Steering and other controls.
Day or scene semantics.
Affordances, such as where driving is possible or impossible.
Motion energy and other low-level visual features.
Spatial semantics.
Gaze-related semantic information, such as the category of the object being viewed.
Each feature space can have a different signal-to-noise ratio and may be useful in different brain regions. Banded ridge regression allows separate regularization strengths to be estimated for different feature spaces while fitting them together. This is valuable when candidate feature sets are correlated or differ in their reliability.
The final fitted model can contain many thousands of features. In the described analysis, the combined feature set had roughly 40,000 features, which were used to model activity at approximately 100,000 brain locations.
Voxel-wise modeling and avoiding premature averaging
The described workflow fits a separate model to each voxel rather than first averaging brain locations into larger regions. The motivation is to preserve detail: averaging can discard information, and the consequences of averaging may not be known in advance.
The general principle is to begin with fine-grained measurements and aggregate only when there is a clear reason to do so. Carefully justified averaging can be useful, but averaging that obscures meaningful variation can make interpretation harder.
Training, testing, and generalization
Model performance should be evaluated on data not used to fit the model. A rigorous workflow can include several layers of separation:
Training data are used to estimate model parameters.
Held-out test data are used to evaluate prediction on data not used for fitting.
Within the fitting data, additional train-and-test splits can support exploratory analysis and model selection.
Entire subjects can be reserved for later testing. For example, models may be developed using some participants, finalized, and then tested on separate participants.
Separating model development from evaluation reduces the risk of overfitting—the risk that a model captures idiosyncrasies of its training data rather than a pattern that generalizes.
Feature sets do not have to be specified entirely in advance. Researchers may explore candidate features and label or interpret them afterward, but this flexibility increases the need for careful held-out testing. If the same data are used both to discover a model and to claim its success, apparent performance can be inflated.
Prediction metrics and the noise ceiling
Statistical significance is often expected in neuroscience, but it is not the same as useful predictive performance. A significant relationship can be real yet explain only a small portion of the variation in the data.
The described approach emphasizes estimating the noise ceiling: the upper limit on prediction accuracy imposed by measurement noise and variability in the data. Model performance can then be expressed in relation to that limit:
How accurate are the predictions?
What fraction of the predictability permitted by the data has the model captured?
This distinguishes a model that merely achieves statistical significance from one that explains a substantial proportion of the reliably measurable signal.
Building and interpreting features
Constructing candidate features
Features can come from several sources:
Direct task information: routes, destinations, movements, object locations, and scene structure.
Semantic labels: categories such as buildings, signs, people, or vehicles.
Visual measurements: color, optical flow, or motion energy.
Behavioral measurements: eye position, steering, and pedal use.
Computational models: transformations intended to approximate perceptual or cognitive processes.
Theoretical hypotheses: candidate representations of memory, planning, or attention.
For example, a hypothesis that the brain maintains information about a participant’s starting location throughout a trip can be tested by constructing a feature that tracks the starting location across the entire route. Other features can represent prospective planning about where the participant will go or retrospective information about where the participant has been.
Feature construction can therefore test ideas about what information the brain may represent, rather than simply labeling activity after the fact.
Mapping feature models onto the cortex
A common way to inspect the results is to project model information onto a flattened map of the cerebral cortex. Flattening helps researchers view a large portion of cortical surface at once. Feature patterns can be color-coded—for instance, using a principal-component projection—to show where different patterns of fitted weights occur.
This type of visualization can reveal broad spatial organization, but the interpretation depends on what the color coding represents. A color map is not itself an explanation of brain function; it must be connected to the feature weights, anatomical location, and task.
Dimensionality reduction and functional networks
Fitting many feature spaces across many voxels creates a large, complex set of results. Dimensionality reduction can summarize this structure.
Different reduction methods give different views
Common methods include principal component analysis (PCA), clustering, and nonlinear embedding methods such as t-SNE. These methods do not produce a single uniquely correct answer:
PCA identifies directions accounting for variation in a dataset.
Clustering groups observations according to similarity.
Nonlinear embeddings aim to represent relationships in fewer dimensions, often emphasizing local structure.
Different methods can reveal different patterns, so conclusions should not depend uncritically on a single dimensionality-reduction method. When there is no clearly correct method, comparing results from several approaches can show whether a conclusion is robust.
Networks identified in the driving task
Dimensionality reduction of the fitted model results identified broad functional patterns, including:
A motor network, associated with controls and actions.
A visual network, associated with visual input.
A navigation network, associated with movement through the environment and route-related information.
Other summaries distinguished future navigation, visual-motor activity, visual input, and past navigation. The broad categories were plausible given the task, but the informative result was also their distribution across the cortex and their consistency across individual participants.
To interpret components, researchers can inspect which features load strongly on each component and compare the resulting spatial pattern with known anatomy. For example, a component associated with control variables and located in motor-related cortex is more plausibly interpreted as motor-related than one without those properties.
Variance partitioning: useful but difficult
Researchers often want to know which feature models account for brain activity. Variance partitioning attempts to estimate how much predictive contribution is associated with different variables or feature spaces.
In the driving task, affordances, future paths, steering and controls, motion energy, and gaze-related semantics accounted for substantial portions of the modeled variation. More subtle navigation variables—the kinds that navigation researchers might especially want to understand—accounted for much less overall variance.
This result does not necessarily mean that navigation variables are unimportant. They may matter strongly in only a subset of brain areas, and some of those areas may have lower measurement quality. For example, regions far from the MRI scanner’s most sensitive areas can have lower signal-to-noise ratios, making their contribution harder to detect.
Why variance partitioning is challenging
Feature spaces often overlap. For example, a future route may correlate with steering actions, visual scene information, or distance to the destination. When predictors are correlated, it can be difficult to assign unique explanatory credit to one feature space.
Variance partitioning is therefore informative but not definitive. Its results depend on the relationships among predictors, the fitting method, and the quality of the measurements. Even a comparatively simple regression with many feature spaces can be hard to interpret; interpretability is not automatically solved by avoiding deep learning.
Dynamic representations and task-dependent brain activity
Brain representations are not fixed mappings from stimuli to responses. They can be reconfigured by attention, task demands, and learning.
For example, if a person suddenly needs to find a missing pet, many brain systems may become tuned to information useful for detecting that pet. Some early sensory systems may continue to encode the outside world relatively consistently, while more flexible regions—especially in prefrontal cortex—may adapt strongly to the current goal.
In the driving task, representations shifted toward features that were relevant to successful driving, such as traffic signals, sidewalks, other vehicles, and traffic signs. This illustrates how task goals can change which aspects of a scene receive emphasis.
The dynamic nature of representations creates a modeling challenge: the same stimulus or task variable may relate differently to brain activity under different attentional states, learning histories, or behavioral goals.
Why not fit a neural network directly to brain data?
A neural network can, in principle, learn complex relationships between task inputs and brain responses. A direct approach is to train a network using collected neural data and then interpret its learned representations.
However, direct fitting often requires more data than neuroscience can provide. A sufficiently flexible network may fit the available observations well but still generalize poorly, or it may be impossible to determine what its internal representations mean.
Thus, the obstacle is not simply computational. It is also a mismatch between model complexity and the amount of available neural data.
Using pretrained neural networks
A practical alternative is to use a network trained on another task, then use its internal features to predict neural responses.
General approach
Take a pretrained network, such as a vision model trained on images.
Extract features from its layers.
Use a regression model to relate those features to measured brain activity.
Test how well the features predict responses in different brain regions.
This approach reduces the amount of neural data needed to learn the feature representations from scratch. It can also reveal whether representations learned for an artificial task correspond to patterns in the brain.
What pretrained vision networks can reveal
Studies have used features from networks such as AlexNet or VGG to predict responses in the visual system. Different network layers can predict activity in different locations along the visual hierarchy.
One interpretation is that both biological and artificial visual systems learn representations reflecting hierarchical statistics of natural images. The similarity can be informative, but it does not by itself establish that the biological and artificial systems use the same mechanisms.
Correlated network layers
Features from different deep-network layers can be highly correlated. If all layers are treated as one undifferentiated feature set, the result may not clearly identify which layer contributes to prediction.
Banded ridge regression can fit layers separately while estimating their relative contributions. This helps adjudicate among correlated feature sets and can identify which network layers are most useful for predicting each voxel.
A continuing challenge is that neural-network features may carry biases from the task and architecture used to train the network. Better methods are needed to distinguish features that genuinely relate to brain representations from those that are artifacts of the model.
Building an anatomically informed model of visual area V4
When general-purpose neural networks cannot be fitted reliably to the available neural data, another option is to construct a network whose architecture reflects established biological knowledge.
Why V4 requires a dedicated model
V4 is an intermediate area in the visual processing hierarchy. It is important, but its computations have been difficult to characterize with a successful computational model.
To obtain a large dataset, researchers recorded from individual V4 neurons for extended periods. The resulting collection included data from hundreds of neurons across two animals, with substantially more observations per neuron than is typical in many neuroscience datasets.
Even such a large dataset was not considered sufficient to fit an unrestricted neural network and then interpret it reliably. Instead, the researchers built an architected neural network: a network designed around known mechanisms and anatomy.
Architecture based on visual-system mechanisms
The model was a cascade of stages:
Retinal-image transformation: The input underwent a log-polar transform, intended to reflect the emphasis the visual system places on the fovea.
V1 processing: A motion-energy model represented early visual processing. Motion-energy models are established descriptions of important computations in primary visual cortex.
V2 processing: The V1 output was rectified and mixed through a scattering-style transformation, then passed through another V1-like module.
V4 processing: A further mixing stage fed another module of the same general kind.
The architecture was motivated by the known progression of visual information from V1 to V2 and then to V4 along the ventral visual stream, which is important for pattern recognition. The working hypothesis was that later visual areas may repeat a broadly similar computation on inputs that have been transformed, rectified, and remixed by earlier stages.
Although the model contains design choices, its layers were intended to correspond to biological processing stages. It was also locally convolutional, preserving spatial structure while handling features such as color, time, and space.
Why a bespoke model can be useful
Compared with a large pretrained model such as VGG, the bespoke model had far fewer parameters—about 20,000 in the described example—and was designed to be biologically plausible.
This provides two advantages:
A lower-dimensional model is more feasible to fit with limited neural data.
Its components can be related to known neural mechanisms and local circuits.
A model can therefore be preferable not because it is universally more powerful, but because its complexity is appropriate for the available data and its structure supports biological interpretation.
Predictive performance and remaining data needs
The bespoke model predicted V4 responses better than the comparison VGG-based model in the reported analysis. Its predictive accuracy was comparable to the level previously achieved for primary visual cortex with established models.
However, prediction performance continued to improve as more data were added. The learning curves had not reached a plateau: additional observations were still improving the model’s predictions. This is evidence that even unusually large neural datasets can remain insufficient to saturate model performance.
High predictive accuracy does not necessarily make a model easy to interpret. A model can be anatomically plausible and predict well while still failing to provide a simple explanation of what its target brain area represents.
Interpreting V4 responses
The V4 model had nonlinear stages, making it difficult to explain its behavior by inspecting the model directly. Anatomical plausibility could describe how the model was organized, but it did not answer the more specific question of what kinds of patterns individual V4 neurons respond to.
Predicted optimal patterns
Researchers used an iterative method to estimate optimal patterns: stimuli predicted to drive particular neurons strongly. These patterns were spatiotemporal, though some visualizations summarized them over time.
The analysis compared:
A neuron’s predicted optimal pattern or receptive field.
The video frame in the experiment that elicited the neuron’s strongest response.
An overlay of the predicted pattern and the observed stimulus.
In some cases, a natural stimulus—for example, a particular bird—matched the predicted receptive-field pattern well. Such comparisons can make a model’s predictions more concrete.
Multiple optima and variability
A neuron is not guaranteed to have only one optimal stimulus. Optimization may identify multiple relevant optima, so the procedure was repeated many times for each neuron to assess how consistent the results were.
Most neurons in the described analysis had relatively compact optima, while a few showed two or three. An important question was not only whether a neuron had a compact optimum, but also whether its optima were distinct from those of other neurons. The predicted patterns for different V4 neurons were generally far apart, suggesting substantial diversity among their preferred patterns.
Why receptive fields still require analysis
Even when optimal patterns can be visualized, individual receptive fields may be too complicated to interpret directly. A detailed pattern can be difficult to summarize as a concept such as curvature, texture, or color.
Researchers therefore applied dimensionality reduction to the collection of neurons. Depending on the question, neurons could be embedded using different representations, such as:
Spatial structure.
Color.
Global spatial patterns.
Local spatial patterns.
Once the neurons were represented in a suitable lower-dimensional space, methods such as PCA or clustering could reveal groups and dimensions of selectivity. This analysis recovered patterns consistent with many forms of selectivity that had been reported in V4 over several decades.
The general lesson is that model interpretation may require an additional analytical stage: a predictive model produces complex responses, and those responses must then be organized into interpretable dimensions or categories.
Attention, learning, and the diversity of neural responses
The number and distribution of a neuron’s effective optima can depend on the brain area and its position in the processing hierarchy.
Responses across the visual hierarchy
Primary visual cortex, or V1, has been described with relatively simple motion-energy filters.
V1 neurons can nevertheless differ substantially because contextual influences from the surrounding visual field—often called the non-classical surround—can modulate their responses.
In V4, attention can noticeably alter responses; the described estimate was about a 15% effect.
In higher-level regions such as prefrontal cortex, responses can be strongly modulated by attention, goals, and learning. A neuron’s activity may shift substantially with the current task.
Thus, increasing complexity higher in the hierarchy does not simply mean that every neuron has one more complicated, fixed receptive field. Higher-level activity can be more flexible and more dependent on context.
Attention as short-timescale plasticity
One proposed interpretation is that attention acts like a short-timescale form of plasticity. On this view:
Attention temporarily changes which inputs or representations dominate a neural system.
Repeatedly attending to information can make such changes more persistent.
Learning can be understood, in part, as the accumulation of attention-related changes over time.
This is a conceptual proposal rather than a settled account. It emphasizes the possible continuity between transient, task-dependent modulation and longer-lasting learning.
Key principles for neuroscience modeling
Neuroscience is data-limited: even very large datasets may not be sufficient for highly flexible models.
Prediction and interpretation are separate challenges: a model can predict well without providing a clear explanation of the brain process.
Use held-out data: separate fitting, testing, and—where possible—subject-level validation help assess generalization.
Measure prediction quality, not significance alone: noise ceilings help establish how much of the reliably measurable signal a model captures.
Treat feature spaces carefully: multiple candidate representations can be compared, but their correlations complicate claims about unique importance.
Use dimensionality reduction as an exploratory tool: different methods provide different views, so robust findings should be checked across methods.
Match model complexity to data and purpose: pretrained networks, regression models, and biologically informed architectures each have different strengths and limitations.
Interpretation requires additional work: anatomical structure, predictive accuracy, feature analysis, optimal-stimulus methods, and dimensionality reduction can all contribute, but none alone guarantees a complete explanation of neural function.

Ask anything
We've read this whole study set, so questions about it get the best answers.