Fig. 5: Medial frontal neurons track task progress from specific behavioural steps.

a, Single anchor alignment analysis. Top plot (blue) shows activity aligned by the abstract states; state tuning remaps across tasks. Bottom plot (green) shows the same neuron aligned to the behavioural step (goal-progress/location conjunction) to which it is anchored (dashed vertical line). In this and the other analyses in this figure, we concatenated two recording days, giving a total of up to six new tasks per neuron. b, Polar histograms showing the cross-validated alignment of neurons by their preferred anchor (calculated from training tasks) in a left-out test task. The top plot is for all state-tuned neurons, whereas the bottom plot only includes non-zero lag neurons. Two-proportions test against chance (25%), proportion generalizing for all state-tuned neurons: 39%, n = 738 neurons, z = 5.69, P = 1.24 × 10−8; non-zero lag state-tuned neurons: 36%, n = 545 neurons, z = 3.87, P = 1.08 × 10−4. c, Histograms showing the right-shifted distribution of the mean cross-validated task map correlations between state-tuned neurons aligned to their preferred anchor (from training tasks) and the task map aligned to this same anchor from a left-out test task. This is shown for all state-tuned neurons (top) and only non-zero lag state-tuned neurons (bottom). Two-sided t-test against 0 for all state-tuned neurons: n = 737 neurons, t-statistic = 9.86, P = 1.32 × 10−21, d.f. = 736; non-zero lag state-tuned neurons: n = 544 neurons, t-statistic = 7.55, P = 1.86 × 10−13, d.f. = 543. d, Two example paths of mice during a trial in two distinct tasks with two simultaneously recorded mFC neurons. Neuron 1 is an anchor neuron tuned to reward in location 6. Neuron 2 fires with a lag of roughly 270° in task space from its anchor (reward in location 6). Spikes are jittered to ensure directly overlapping spikes are distinguishable. e, Lagged spatial field analysis. Bottom, each row represents a different task and each column represents a different lag in task space, starting from the current location of the mouse (far right column) and then at successive task space lags in the past or future. Because of the circular nature of the task, past bins at lag X are equivalent to future bins at lag 360 - X. Right, zoomed in spatial maps at this neuron’s preferred lag. Top, the correlation of spatial maps across tasks at each lag. Colours are normalized per map to emphasize the spatial firing pattern, with maximum firing rates (in Hz) displayed at the top right of each map. f, Histograms showing the right-shifted distribution of the mean cross-validated spatial correlations between maps at the preferred lag (from training tasks) and the spatial map at this lag from a left-out test task for all state-tuned neurons (left) and only non-zero lag neurons (right). Two-sided t-test against 0 for all state-tuned neurons: n = 738 neurons, t-statistic = 22.6, P = 1.45 × 10−86, d.f. = 737; non-zero lag state-tuned neurons: n = 285 neurons, t-statistic = 7.48, P = 9.07 × 10−13, d.f. = 284. g, Left, regression analysis reveals neurons with lagged fields in task space from a given anchor (goal-progress/place conjunction). Right, this enables prediction of state tuning and its remapping across tasks for each neuron. h, Histograms showing the right-shifted distribution of mean cross-validated correlation values between model-predicted (from training tasks) and actual (from a left-out test task) activity. This correlation is shown for all state-tuned neurons (left) and only state-tuned neurons with non-zero-lag firing from their anchors (right). Two-sided t-test against 0 all state-tuned neurons (with non-zero beta coefficients): n = 489 neurons, t-statistic = 9.3, P = 5.3 × 10−19, d.f. = 488; non-zero lag state-tuned neurons: n = 329 neurons, t-statistic = 3.9, P = 1.08 × 10−4, d.f. = 328. Data are mean ± s.e.m.