Fig. 3: Medial frontal neurons are organized into task-space modules.

a, Simultaneously recorded neurons readily remap their state tuning but maintain their goal-progress preference across tasks. Angles (in degrees) of each cell’s rotation relative to session X are shown on the right of each polar plot. b, Top, schematic showing quantification of tuning angle across sessions. Bottom left, polar histograms of cross-task angle show no single neuron generalization across tasks, with no clear peak at zero relative to the other cardinal directions (two proportions test against a chance level of 25%; n = 1,594 neurons; mean proportion of generalizing neurons across one comparison (mean of X versus Y and X versus Z) = 24%, z = 0.91, P = 0.363. Bottom right, neurons maintain their state preference across different sessions of the same task (X versus X′, two proportions test against a chance level of 25%; n = 1,160 neurons; proportion generalizing = 78%, z = 25.7, P = 0.0). c, Top, schematic showing quantification of relative angle difference between pairs of neurons across sessions. Bottom left, polar histograms show that the proportion of coherent pairs of state-tuned neurons (comprising the peak at zero) is higher than chance but less than 100%, indicating that the whole population does not remap coherently. Two-proportions test against a chance level of 25%; n = 35,164 pairs; mean proportion of coherent neurons across one comparison (mean of X versus Y and X versus Z) = 29.3%, z = 13.0, P = 0.0). Bottom right, as expected from b, the large majority of state-tuned neurons keep their relative angles across sessions of the same task (X versus X′; two proportions test against a chance level of 25%; n = 23,674 pairs; proportion coherent = 63%, z = 83.5, P = 0.0). d, Left, example from a single recording day showing the result of t-distributed stochastic neighbour embedding and hierarchical clustering derived from a distance matrix quantifying cross-task coherence relationships between state-tuned neurons. Each dot represents a neuron. Right, summary silhouette scores for the clustering for real data compared to permuted data that maintains the neuron’s goal-progress preference and initial state distribution. Each dot is a recording day. Two-sided Wilcoxon test: n = 38 recording days; W-statistic = 126.0, P = 2.13 × 10−4. e, Modules in a single recording day. The colour code represents the tuning of the neurons in task X. The x,y position defines the tuning in each task. The z position corresponds to (arbitrary) cluster IDs. Neurons remap in task space while maintaining their within-cluster but not between-cluster tuning relationships across tasks.