Most measured visual-cortical plasticity was reproduced without reward
Zhong, Baptista, Gattoni, Arnold, Flickinger, Stringer and Pachitariu recorded up to approximately 90,000 neurons simultaneously across primary visual cortex (V1) and the higher visual areas (HVAs) while mice learned a texture-discrimination task, and separately while other mice were exposed to the same textures without reward (Zhong et al. 2025).
Neural changes in the task mice tracked behavioural learning, yet many of the same changes appeared in mice exposed to the stimuli without reward. The authors interpret most measured sensory-representation changes as consistent with unsupervised learning, while identifying a distinct task-specific reward-prediction signal.
Plasticity was highest in the medial HVAs (posteromedial, anteromedial and mediomedial-anterior areas), with smaller overall changes in V1, for both task and unrewarded cohorts (Fig. 1i,j). A reward-prediction signal that ramped in anterior HVAs was specific to task mice (Fig. 4).
Primary sources and exact figure pages
| Source | Direct links | Use here |
|---|---|---|
| Publication | Nature article · DOI · open-access full text | Claims, methods, sample sizes, and statistics |
| Main figures | Fig. 1 · Fig. 2 · Fig. 3 · Fig. 4 · Fig. 5 | Panel-level interpretation and reproduction map |
| Extended Data | ED Fig. 1 · ED Fig. 2 · ED Fig. 9 | Threshold, locomotion, and within-day behavioural precedents |
| Data and code | Figshare v2 · paper-tagged code | Released files and executable figure recipes |
| Analysis methods | Stringer & Pachitariu 2024 · open PDF | Cross-validation, controls, and interpretation safeguards |
The paper reports plasticity as an endpoint comparison — selectivity before versus after roughly two weeks of training. Whether the rate of change within a single session differs between passive-reward and unrewarded cohorts is not addressed, and is the subject of the within-session extension in §07.
The animals and the training schedule
The imaging study used 19 mice (13 male, 6 female; 2–11 months; TetO-GCaMP6s × CaMK2a-tTA, GCaMP6s in excitatory neurons) across 89 recordings. Each recording_id = {mouse}_{date}_{block} serves as the {rec} key. Reported n varies by panel; for example Fig. 1j uses n = 4 task, 9 unrewarded and 3 grating mice.
| Cohort | Prefix | Reward | Mice | Notes |
|---|---|---|---|---|
| Task | sup_* | Water associated with leaf1 | 4–5 | Train 1 before-learning: 4 mice, all passive reward. After-learning mixes passive and active-after-cue modes. |
| Unrewarded | unsup_* | None | 6–9 | Identical corridors, no water; sound cue still presented. leaf1 is the same stimulus, unrewarded |
| Grating control | *_grating | None | 3 | Grating walls (0°, 45°); 5–6 sessions |
| Naive | naive_* | Untrained | 7–9 | 11 sessions (each mouse sees more than one pair) |
Fig. 5 and Extended Data Fig. 9 use 23 additional mice with no imaging, split 11 naturalistic-pretrained / 7 grating-pretrained / 5 no-pretrain, followed by a simplified 5-day reward task. Their behaviour files use a per-trial schema (LickPos, LickTrind, WallType) keyed {mouse}_{date}_dayN, distinct from the imaging per-frame ft_* arrays, and carry no neural data.
Stage schedule
The task and unrewarded imaging cohorts follow the staged Train/Test sequence below, with before-learning and after-learning imaging blocks roughly two weeks apart (timeline, Fig. 1b). Naive and grating controls contribute comparison sessions rather than passing through every task stage. The release index contains 23 experiment labels spanning cohort, stage, and learning status.
| Stage | Duration | Stimuli | Description · files |
|---|---|---|---|
| Acclimation | >8 days | grey / spout | Head-fix and running habituation (>6 cm/s); restricted mice receive spout training. |
| Train 1 | ~2 weeks | circle1 (0) vs leaf1 (2) | Coarse discrimination; task mice lick selectively to leaf1. Beh_{sup,unsup}_train1_{before,after}_learning.npy, {rec}_SVD_dec.npy, {rec}_trans.npz. The stage used by the within-session extension. |
| Test 1 | test session | +circle2 (1), leaf2 (3) | New exemplars; licking generalises to leaf2, not circle2. Basis of the visual-versus-spatial analysis (Fig. 2). |
| Train 2 | ~1 week | circle1, leaf1, leaf2 | Fine discrimination until licking to leaf2 ceases; leaf2 orthogonalises from leaf1, strongest in medial HVAs (Fig. 3). |
| Test 2 | test session | +leaf3 (4) | Novel exemplar; coding-direction generalisation. |
| Test 3 | test session | +leaf1_swap (5,6) | Spatially rearranged leaf1; tests stimulus identity against position. |
Stimulus roles are session-specific
The paper refers to stimulus roles; the released files store physical wall names. The mapping between them is set per session, and conflating the two is a frequent source of mislabeling.
| Role | stim_id | Meaning |
|---|---|---|
circle1 | 0 | Unrewarded reference in the leaf1-vs-circle1 comparison |
circle2 | 1 | Other exemplar, unrewarded family |
leaf1 | 2 | Reward-associated texture in task mice; matched but unrewarded role in exposure mice |
leaf2 | 3 | Same visual family as leaf1; introduced without reward (later leaf3 = 4, leaf1_swap = 5, 6) |
Four physical families exist (leaf, circle, rock, brick). The released WallName takes values rock1/rock2/wood1/wood2, where wood corresponds to the paper’s “brick”. Which physical wall carries which role is set per session. In rewarded sessions the role can be recovered with get_cat_id(WallName, isRew) (rewarded wall → leaf1). In unrewarded sessions isRew is uniformly false, so the role is read directly from stim_id: UniqWalls[stim_id==2] is leaf1 and UniqWalls[stim_id==0] is circle1. Either way, stim_ID=[2,0] denotes leaf1 versus circle1 for every cohort and physical pair.
Contents of the release, and the tractable access path
The published dataset is on Figshare (doi:10.25378/janelia.28811129.v2, CC BY 4.0), and the paper recipes are in the paper-tagged analysis release. Files are keyed by recording_id = {mouse}_{date}_{block}. The reduced representation reconstructs spk = UTV and supports efficient exploratory population analysis. Exact paper-style per-neuron selectivity uses the full deconvolved traces; agreement between representations must be measured rather than assumed.
| Layer | File | Contents | Size |
|---|---|---|---|
| Behaviour | Beh_{experiment}.npy | dict: session → per-frame arrays | 108.1–412.5 MiB |
| Reduced neural | {rec}_SVD_dec.npy | U (comp×neuron), V (comp×frame), 400 components | 59.6–174.9 MiB |
| Full neural | {rec}_neural_data.npy | {'spks': [...]} → concat = neurons×frames | 1.4–9.3 GiB |
| Retinotopy | {rec}_trans.npz | iarea (neuron→area), xy_t (cortical x,y) | 0.7–3.1 MiB |
| Area outlines | areas.npz | ['out'] area outline polygons | 158 KB |
| Index | Imaging_Exp_info.npy | 142 experiment–recording memberships | 21 KB |
Two-photon mesoscope with temporal multiplexing, recording V1 and many higher visual areas simultaneously; 20,547–89,577 neurons per recording. Processing used Suite2p followed by non-negative deconvolution (decay 0.75 s). Neural analyses use the deconvolved traces or their released 400-component reduction.
ft_trInd trial, ft_WallID texture, ft_move running, ft_CorrSpc in-texture, ft_Pos/ft_PosCum position, ft_RunSpeed. Per trial: WallName, UniqWalls, stim_id, isRew, ntrials, SoundDelPos.
V1 = iarea==8; mHV (medial) = {0,1,2,9}, grouping PM, AM, MMA and lateral retrosplenial cortex; lHV (lateral) = {5,6}; aHV (anterior) = {3,4}. Identifiers -1 and 7 lie outside the included visual-cortical groups. The largest overall selective-fraction change is medial; the whole-V1 fraction changes less, although subregions and stimulus poles can differ.
Workspace layout, drive.py, and graph.py
The dataset is large enough that a single, verified copy is shared rather than duplicated per user. Two small modules sit on top of that copy: drive.py, which provides safe access to the files, and graph.py, which turns ordinary Python functions into an editable, visible dataflow so that analyses can be run without editing code.
Google Drive workspace
The shared workspace folder holds the code and notebooks at its root; the dataset is a separate shared folder, added as a shortcut and kept read-only, whose layout mirrors the Figshare release. Members add the workspace as a shortcut in their own Drive; a notebook mounts Drive and imports the two modules from that path.
Zhong et al. 2025 — Workspace (shared folder, added as a My Drive shortcut) ├── drive.py access layer over the release ├── graph.py analysis-graph runner and widget ├── zhong2025/ catalog + relationship helpers (Python package) ├── notebooks/ Colab notebooks (00, 03, 04, …) ├── README.md, pyproject.toml │ └── Janelia dataset (Figshare v2) separate shared folder, read-only ├── data/ │ ├── beh/ behaviour bundles + Imaging_Exp_info.npy │ ├── spk/ full neural recordings │ ├── SVD_dec/ 400-PC reduced neural │ └── retinotopy/ transforms + areas.npz └── metadata/ catalog.csv · RELEASE.json · MD5SUMS · TRANSFER_STATUS.json
drive.py — access layer
The module exposes a short public workflow and keeps path resolution, checksum verification, pickle handling, caching and a size guard internal. A catalog drives lookups, so listing or filtering files never scans Drive. Two modes are supported: a connected mode that reads the mounted release and validates it against metadata/catalog.csv, RELEASE.json and TRANSFER_STATUS.json; and a metadata-only mode that uses the bundled catalog without fetching files.
| Call | Result |
|---|---|
data = setup() | a Dataset (connected if the release is mounted, else metadata-only) |
data.recording(id) | a Recording, resolving its behaviour, SVD, full-neural and retinotopy files |
data.recordings(experiment=, mouse=) | recordings selected by scientific identity, not by path |
data.find(category=, contains=, …) | catalog rows matching a query, without opening any file |
rec.load(layer) / data.load(name) | verified, in-memory arrays or dictionaries (size and MD5 checked before load) |
data.figshare() · data.picker() | the Figshare article metadata · a visual file selector |
Each catalog row (DataFile) carries a name, category, size, MD5 and the recording/retinotopy/experiment keys used to relate files; a Recording groups the files belonging to one recording. A default 1 GiB guard keeps the full-neural files an explicit choice, since every reduced-neural, behaviour and retinotopy file is well under that limit.
graph.py — analysis graph and widget
An analysis is expressed as ordinary functions. Decorating a function with @graph.node(outputs=…) makes it a node; its parameter names are input ports. A parameter that matches an upstream node’s output name is wired (a filled port); a parameter with a default value is an editable input (a hollow port). graph.Graph(name, *nodes) assembles the nodes, which execute one at a time in declaration order — the graph is acyclic by construction, so results are reproducible.
graph.widget(controls=…, show=…) renders the graph as a canvas: hollow ports become dropdowns and sliders, a Run flow button executes the nodes in order, and the wires trace data to the displayed output. The result of a run is available as panel.last_run, recording the settings, intermediate outputs and timings. The module is intentionally minimal — node, Graph, and run / run_many / diagram / widget — with no scheduler, persistence, parallelism or cross-run cache.
Definition of d′
Discriminability between the two textures is quantified per neuron by the selectivity index d′ (defined in Fig. 1f). The article and the released code use the same denominator.
d′paper = (μ₁ − μ₂) / (σ₁/2 + σ₂/2)
Equivalently, d′ = 2(μ₁−μ₂)/(σ₁+σ₂). This is the paper-specific average-SD definition, not the pooled-variance effect-size formula.
2·(nanmean(x₁) − nanmean(x₂)) / (nanstd(x₁) + nanstd(x₂))
utils.py, lines 370–374 uses ddof=0. Positive values indicate stronger responses to the first argument.
ddof=1); used for the rate hypothesis(ft_move>0) & ft_CorrSpc — running and inside the 0–4 m textureA within-session test of reward-associated acceleration
Question supported by the release. Among Train 1 before-learning recordings, does the mouse-level early slope of held-out leaf1-versus-circle1 population discriminability differ between four mice receiving passive reward and nine mice receiving no reward? This is a reward-present versus reward-absent cohort contrast. It does not isolate action-contingent feedback and does not by itself establish causality.
Directional hypothesis. The rewarded cohort has a greater early d′held-out slope than the unrewarded cohort. A saturation curve and plateau are secondary because one short session and four rewarded mice provide limited information about an asymptote.
| Element | Primary choice | Reason |
|---|---|---|
| Cohorts | sup_train1_before_learning (4 passive reward) versus unsup_train1_before_learning (9 no reward) | Cleanest available reward-present versus reward-absent contrast |
| Independent unit | One early slope per mouse | Trials, folds, features, bins, and neurons are nested observations |
| Primary region | V1 | Proposal-defined before inspecting the group result; mHV, lHV, and aHV are secondary |
| Representation | 12-feature V1 SVD population read-out | Tractable exploratory estimator; the upstream basis is release-wide and transductive |
| Contrast | leaf1 versus circle1, moving only, 0–4 m, 18 position bins, complete coverage | Controls corridor support and prevents occupancy changes from masquerading as neural change |
| Time | Fixed 40-trial non-overlapping blocks; 140-trial early horizon | Preserves physical order and fixes the rate window across mice |
| Cross-validation | Four contiguous folds; at least 4 training trials per role and 3 valid early blocks | Separates fitting from scoring while respecting slow temporal structure |
| Inference | Rewarded-minus-unrewarded mean slope; one-sided exact label permutation, mouse-bootstrap 95% interval, leave-one-mouse-out | Matches the directional hypothesis and the small mouse-level sample |
The paper measured endpoints after roughly two weeks and found similar qualitative plasticity patterns in task and unrewarded cohorts (Fig. 1i,j). Comparable endpoints do not determine a within-session rate. A positive slope difference would show a steeper trajectory in the rewarded cohort under these protocols; it would be consistent with, but would not prove, reward-associated acceleration. A null result would mean that no difference was detected at this sample size and resolution, not that reward is irrelevant.
Fig. 1j supplies the biological precedent, area definitions, and secondary paper-compatible statistic. The primary rate analysis is not a literal re-parameterization: it uses held-out trial-level population scores to prevent selection and evaluation on the same activity. The procedure is given in §09.
The displayed Figure 1j panel is cropped from the full CC BY 4.0 figure; the scientific content is unchanged.
Figure panels most relevant to the project
Grouped by figure, ordered by relevance to the within-session analysis. high — computed or adapted directly · med — methodological template · low — reference. Each recipe names the analysis functions; full specifications are in §10. Figure headings link to the exact Nature figure page; the source directory above also provides the open-access full text.
Figure 1 plasticity after supervised & unsupervised training
Percentage of |d′|≥0.3 leaf1-vs-circle1 neurons per region (V1/mHV/lHV/aHV), before versus after learning, for task, unrewarded and grating cohorts. The medial fraction rises for task and unrewarded, not grating. This panel supplies a secondary paper-compatible endpoint statistic, not the primary held-out rate estimator.
Per-neuron d′ = 2(μ₁−μ₂)/(σ₁+σ₂) from the two response distributions; selective if |d′|≥0.3.
Two-by-two density histograms of selective-neuron positions on the area map (rows task/unrewarded, columns before/after). Density concentrates in medial HVAs after learning for both learning cohorts.
Example mouse: circle1-selective (g) and leaf1-selective (h) neurons — single-trial heatmaps and trial-averaged population sorted by preferred corridor position. Both panels are the same task mouse (the two selectivity poles), not two cohorts.
Example mesoscope field of view and cellular-resolution zoom establish the scale and density of the recording. Atlas alignment and area boundaries are shown in Fig. 1i and Extended Data Fig. 1b,c.
Figure 4 reward-prediction signal (positive control)
Anterior (aHV) reward-prediction fraction rises only in task mice (paired t: task p=0.0069, unrewarded p=0.708). The reward signal is anterior, not medial.
Medial leaf1-selective neurons in the leaf2 corridor showed no statistically significant lick-versus-no-lick difference in this test (p=0.180). This targeted comparison does not exclude all reward, state, or movement contributions.
Cue-aligned activity is suppressed after the sound cue in panel i, while panel j shows activity ramping in the seconds before the first lick. These alignments help characterize timing but do not by themselves establish the signal’s cause.
Density maps place the reward signal in anterior HVAs of task-after only (f); anterior neurons are higher on lick trials in the unrewarded leaf2 corridor (k, p=0.014), tracking expectation.
Figure 2 visual (not spatial) coding · population read-out
Projection onto the leaf1-vs-circle1 axis = (leaf1-selective population mean) − (circle1-selective population mean), per position and trial-averaged (n=5 task). A population alternative to per-neuron d′.
SI∈[−1,1] places circle2 near circle, leaf2 near leaf, per area × cohort (consistent with behaviour).
Top-5% leaf1-selective (g) and bottom-5% circle1-selective (h) medial populations by position; sequence correlation (f) is high for even-leaf1, low for leaf2 in medial — stimulus-specific, not spatial.
Figure 3 novel/adapted stimuli · methodological template
The positive leaf2 pole of leaf2-versus-circle1 selectivity decreases after the additional week, especially in V1 and lateral HVAs. This is a paired before/after result, not an increase in medial selectivity.
The fraction selective for leaf1 versus leaf2 is elevated in medial HVAs for task and unrewarded cohorts relative to naive controls. This is a separate cross-cohort comparison and includes both selectivity poles.
Extended Data within-session precedent and controls
Behavioural discrimination over the first versus second half of each daily session — learning accrues within a session. The closest published analog to the within-session extension.
Speed versus position, before/after, task and unrewarded; locomotion is largely unchanged with learning.
Fraction selective versus d′ threshold (e); Fig. 1j split into leaf1/reward-associated-role and circle1 poles (f), both of which gain selectivity. In exposure mice neither pole is rewarded.
Figure 5 pretraining accelerates learning (behaviour-only)
Percentage of trials with a lick in the 2–4 m zone, reward versus non-reward, across days, per cohort (naturalistic 11 / grating 7 / no-pretrain 5); (f) reward−non-reward discrimination, naturalistic-pretrained learns fastest.
Analyses to compute
① Cohort audit and exact file plan required first
Select all eligible sup_train1_before_learning and unsup_train1_before_learning mice before opening neural arrays. Record reward mode, water restriction, acquisition date, sex, release notes, and the exact behaviour, reduced-neural, full-neural, and retinotopy file names. The supported primary contrast is four passive-reward mice versus nine no-reward mice; after_learning mixes task reward modes and is a named sensitivity analysis.
② Build held-out blockwise population d′ primary estimator
- Preserve physical time. Assign fixed, non-overlapping 40-trial blocks and four contiguous folds from
ft_trIndbefore filtering stimulus roles. Do not use frame-level odd/even splitting as the primary cross-validation scheme. - Align and validate. Reconstruct the exploratory reduced activity as
spk = UT @ V; truncate behaviour and neural arrays to the same frame count; resolve leaf1 (role 2) and circle1 (role 0) per session. - Make one observation per trial. Restrict to moving frames in the 0–4 m texture, divide the corridor into 18 bins, and require complete position coverage. Average activity within trial and position before model fitting so slow trials do not contribute more observations.
- Fit without leakage. Within each block, estimate scaling and a 12-feature V1 coding direction on the contiguous training folds only. Every requested fold must contain both roles, with at least four training trials per role.
- Score held-out trials. Project only held-out trials and calculate d′held-out from the two score distributions. Average fold contrasts to one value per block; also retain the stimulus-mean separation and score spread as separate diagnostics.
- Estimate one early rate per mouse. Fit the block values through the fixed 140-trial horizon and require at least three valid early blocks. Store all eligibility failures rather than silently dropping blocks.
③ Test the mouse-level rate difference confirmatory
Plot every mouse curve and slope. Report the rewarded-minus-unrewarded mean slope first, a one-sided exact cohort-label permutation test for rewarded > unrewarded, a mouse-bootstrap 95% interval, and all leave-one-mouse-out estimates. Mice are the independent units; trials, blocks, folds, features, positions, and neurons never increase the group-test sample size.
④ Separate rate, plateau, and representational change secondary
Fit d′(t)=b+A(1−exp(−kt)) only as a secondary description. Report initial rate A·k, plateau b+A, and half-time. Label the plateau “not observed” unless at least 90% of the fitted amplitude occurs within the common observed range and the optimum is not on a search-grid boundary. A cross-temporal matrix — train the coding axis in one block, test it in every block — distinguishes stable-axis sharpening from rotation or reorganization.
⑤ Inspect position, behaviour, and recording support Plan B
Plot trial-block × corridor-position d′, activity, speed, occupancy, missing-bin support, cue, reward, lick, and grey-space baselines. Use a mouse-resampling simultaneous band for the whole position curve rather than 18 uncorrected per-bin tests. Cue, reward, and licking may be mediators of the total reward-condition effect, so do not adjust them away in the primary estimate; use pre-cue windows, event censoring, and behaviour-adjusted models as clearly labelled sensitivities. The large-scale neural-data methods review motivates trial-level cross-validation, temporally extended splits, and movement controls.
⑥ Reproduce paper-compatible summaries secondary validation
Using full deconvolved traces where feasible, reproduce d′paper, percentage |d′|≥0.3, pole-specific fractions, threshold sweeps, and density maps from Fig. 1 and ED Fig. 1. Treat leaf1/circle1 pole asymmetry as secondary: neither role is rewarded in the exposure cohort. Compare SVD and full-trace results on feasible sessions instead of assuming equivalence. ED Fig. 9 is a useful behavioural precedent for within-day change, but its separate reward-task cohort is not the neural group-test template.
Recipe reference
The computations behind the paper-compatible recipes above, with direct links to the immutable paper release. These functions reproduce the publication’s frame-level analyses; the held-out trial-level project estimator is specified separately in §09.
Core primitives — d′, frame validity, roles, areas
d′(x1, x2)
utils.py:370–374 u = nanmean(x, axis=1); sig = nanstd(x, axis=1, ddof=0); d′ = 2·(u1 − u2) / (sig1 + sig2)x1, x2 are neurons×frames; the caller groups the frames. The article and code both divide by the average of the two standard deviations, not a pooled root-mean-square variance. Positive d′ indicates tuning to the first argument.
Per-neuron d′ from the SVD without full reconstruction
derived from dprime + the 400-PC basis meanS = UT·V̄S ; meanSquareS = diag(UT·(VSVST/|S|)·U) ; d′ = 2(meanA−meanB)/(√varA+√varB)The moments reproduce d′ for the 400-component SVD reconstruction without materializing the neurons×frames matrix. They do not make the lossy reconstruction identical to the full deconvolved traces used by the publication recipe.
Frame-validity mask
utils.py:431–433 fr_valid = (ft_move[:nfr] > 0) & ft_CorrSpc[:nfr]Running and inside the 0–4 m texture. Always truncate ft_* to nfr = spk.shape[1].
get_cat_id(WallName, isRew) — physical wall → role
utils.py:137–147The rewarded wall maps to role 2 (leaf1); its second exemplar to 3; the first unrewarded wall to 0 (circle1); its second exemplar to 1. This fixes leaf1 = role 2 and circle1 = role 0 for all rewarded cohorts and physical pairs. In unrewarded sessions isRew is uniformly false; read the roles from stim_id instead.
neu_area_ID(iarea) — area masks
utils.py:312–324 V1: iarea==8 · mHV: {0,1,2,9} · lHV: {5,6} · aHV: {3,4} · exclude {−1,7}The medial selector is retinotopy[i]['neu_ar_idx']['mHV']. Identifiers −1 and 7 lie outside visual cortex and are dropped from density maps.
Selectivity — per-neuron d′, fractions, density maps
Get_dprime_selective_neuron(db, Beh, stim_ID=[2,0])
utils.py:418–441Load the full {rec}_neural_data.npy traces; resolve stim1=UniqWalls[stim_id==2][0] and stim2=UniqWalls[stim_id==0][0]. dp = dprime(spk[:, (ft_WallID==stim1)&fr_valid], spk[:, (ft_WallID==stim2)&fr_valid]) — all valid frames, no odd/even split. Returns {'dprime':[per-session], 'retinotopy':[…], 'mname':[…]}.
Get_selective_neuron_fraction_with_dprime(dprime, retinotopy, dp_thrs=[0.1..1.0])
utils.py:443–457Per area, per mouse, per threshold: both=|dp|≥thr, stim1=dp≥thr, stim2=dp≤−thr, each divided by the area neuron count. Output value has shape 4 areas × mice × n_thr × 3; index thr=0.3 → thr_idx=2; slice 0='both', 1=leaf1 pole, 2=circle1 pole.
Get_density_map(dprime, retinotopy, dp_thr=0.3, typ='both', n_down=10) + get_dist_img
utils.py:376–416Mask by typ (both / stim1 / stim2). xpos=−xy_t[:,1], ypos=xy_t[:,0]. Rasterize into 5000² (+800 offset); define the footprint from the all-neuron background blurred with σ=1 and truncate=30; blur the selected-neuron image with σ=30; divide by neuron count; take the NaN-aware mouse mean; then downsample every tenth pixel. Preserve the helper’s left-right flip and the plotting orientation; render magma_r, vmax=5e-8, with areas.npz['out'] outlines.
Population — interpolation, coding direction, reward prediction
get_interpPos_spk / spk_pos_interp — 60-bin position tensor
utils.py:105–131From spk[:, VRmove], ft_PosCum[VRmove], Corridor_Length → neurons × ntrials × 60. Bins ~0–40 are the textured metres, ~40–60 the grey space. Cached to {rec}_interpolate_spk.npy. Used by the coding-direction and reward-prediction recipes, not the primary d′.
Get_coding_direction(stim_ref=[2,0], prc=5, n_bef=10) + load_coding_direction
utils.py:503–597 · 349–364d′ selection on ft_trInd%2==0 frames; corr_neu = texture>grey; normalize spk_norm = 2(spk−u0)/(std1+std2), u0 = grey bins 42:52; prepend 10 previous-trial grey bins; per area stim1_idx=dp≥pct95, stim2_idx=dp≤pct5. resp_diff = proj_2_stim1 − proj_2_stim2; proj_tr = resp_diff[:, 10:50].mean(1). The article’s similarity index is SI=(dx−dy)/(dx+dy); the code’s anchor-span denominator is equivalent when the target projection lies between the two anchors.
Get_dprime_rewPred_neuron(dp_thr=0.3) — anterior value d′
utils.py:459–501sel_ind = stimulus-d′ ≥ 0; u_spk = interp_spk[:,:,5:40].mean(2); SoundPos = mod(SoundDelPos,60); dp1 = dprime(late-cue vs early-cue leaf1 trials); idx1 = (dp1≥0.3) & sel_ind; per-area fraction. This is a value/timing index in anterior HVAs, distinct from the medial stimulus d′.
get_lick_response_in_zone — behaviour metric
utils.py:280–295lickResp = lickCount(def_range=[20,40])['inRange'] (lick in 2–4 m); rew_id = get_cat_id; istim in [2,0]; first 200 trials; perf.reshape(n_mice,5,2). Discrimination = −np.diff = reward − non-reward.
Key parameters
Methods|d′|≥0.3 selective · reduced release representation: 400 components · deconvolution decay 0.75 s · run threshold 6 cm/s for at least 66 ms · imaging corridor: 4 m texture + 2 m grey with sound cue sampled from 0.5–3.5 m · behaviour-only task: reward-zone start sampled from 2–3 m · 20,547–89,577 neurons per recording. The paper uses paired or independent two-sided Student’s t-tests as specified in Methods and reports no multiple-comparison adjustment; the new rate analysis instead uses the locked mouse-level inference above.
Constraints and interpretation rules
- Supported contrast. Train 1 before-learning compares passive reward present with no reward. It does not identify action-contingent feedback; after-learning mixes task reward modes and remains a sensitivity analysis.
- Association, not automatic causality. Reward condition is bundled with water restriction, motivation, licking, and protocol history. A positive rate difference is a cohort difference consistent with reward-associated acceleration, not proof that reward caused it.
- Mouse-level inference. One early slope per mouse enters the group contrast. Trials, blocks, folds, positions, components, neurons, and repeated sessions are not independent group replicates.
- Two estimands. d′paper is a full-trace, frame-level per-neuron statistic. d′held-out is a cross-fitted trial-score population statistic. Their numerical values and the paper’s 0.3 threshold are not interchangeable.
- Reduced representation. The 400-component SVD supports efficient exploratory population analysis, but it is lossy and fitted release-wide. Held-out downstream trials do not make the upstream basis prospective. Full traces are required for exact paper-style selectivity replication.
- Locked region and time choices. V1 is primary because it was specified by the proposal; medial, lateral, and anterior HVA results are secondary and require multiplicity-aware interpretation. Forty-trial blocks and the 140-trial early horizon stay fixed across mice.
- Support and confounds. Complete position coverage, role counts, speed, occupancy, missing bins, cue/reward/lick timing, grey-space activity, and global drift must be visible beside each neural trajectory. Position inference uses a simultaneous mouse-resampling band.
- Plateau restraint. Saturation is secondary. A fitted plateau is “not observed” unless at least 90% of fitted amplitude lies in the observed range and the optimum is not on a parameter boundary.
- Control limits. The non-significant lick comparison in Fig. 4l checks one explanation in another test context; it does not establish stimulus causation or exclude reward and state effects.
- Separate behavioural precedent. Fig. 5 and ED Fig. 9 contain no imaging, use another schema, and eventually reward every cohort. They motivate a within-day question but do not supply the neural group design.
- Null-result language. Similar or uncertain trajectories mean that acceleration was not detected at this sample size and resolution. They do not demonstrate that reinforcement is absent from early cortical plasticity.
The clean report order is: rewarded-minus-unrewarded slope estimate, mouse-level uncertainty and exact permutation result, individual mouse curves, eligibility/support diagnostics, planned sensitivities, then limitations in the same paragraph.