← back to main

bair lab / uw neurobiology & biophysics / two active projects

from living cortex
to learned weights

dec 2024 - present / surgical assistance + computational neuroscience

The two projects ask the same broad question at different levels: how does a visual system build and combine selectivity? XORI measures nonlinear suppression across depth in macaque V1. MechV1 works backward through trained CNN weights to find the connectivity patterns that predict color, form, and texture selectivity.

project 01

cross-orientation suppression across cortical depth

Two-photon calcium imaging in anesthetized macaque V1. Orthogonal plaids are compared with the linear sum predicted from their component gratings, revealing how facilitation, suppression, and tuning structure change through layer 2/3.

One analysis path from stimulus presentation to a depth-resolved account of nonlinear integration.

imaging

Two-photon calcium imaging in anesthetized macaque V1 using PHP.eB-CAG-GCaMP6s. Drifting gratings and orthogonal plaids are presented at 50% contrast, 4 Hz, and 4 cycles per degree.

  • 28 fields of view, 140 to 518 µm deep
  • Superficial through deep layer 2/3
  • Collaboration with the Allen Institute and WANPRC

ROI extraction

Suite2p performs automated cell detection, adapted for primate cortical data, with neuropil correction and signal-quality checks applied to each trace.

  • 4,785 ROIs across 28 fields of view
  • Neuropil subtraction and signal cleanup
  • SNR filtering at multiple thresholds

XORI metric

For each ROI, a linear prediction is assembled from the component grating responses, shifted by 90 degrees and summed with baseline correction, then compared with the observed plaid response.

  • S: plaid response divided by linear prediction
  • S > 1 indicates facilitation; S < 1 indicates suppression
  • C: Pearson correlation between predicted and observed tuning

statistics

Mixed-effects models account for ROIs nested within fields and sessions. Mediation analysis tests how much of the depth relationship is carried by tuning covariates.

  • Linear mixed-effects models in statsmodels
  • Random intercepts for session and field
  • Mediation estimates: spatial frequency roughly 40%; bandwidth roughly 21%

The current analysis supports a gradual laminar change, not a binary layer boundary.

S vs. depth Plaid gain decreases with cortical depth (r = −0.706, p = 2.72 × 10−5), transitioning from facilitation in superficial layer 2/3 toward suppression deeper in layer 2/3. The relationship persists after testing signal-quality and tuning confounds.
C vs. depth The prediction-shape coefficient increases with depth (r = 0.80). Component-derived predictions match the shape of observed plaid tuning more closely deeper in layer 2/3, with a facilitation-to-suppression crossover near 350 µm.
spatial clustering S values cluster spatially within individual fields of view, consistent with local organization of suppressive interactions across the cortical surface.
bandwidth gradient Orientation bandwidth increases from roughly 60 to 80 degrees with depth. It is negatively associated with C within sites but positively associated across sites, exposing a multilevel tuning pattern.
laminar gradient Superficial fields show higher spatial-frequency preference, narrower tuning, higher OSI, and more facilitation. Deeper fields show lower spatial-frequency preference, broader tuning, lower OSI, and more suppression.
my role

I assist with non-human-primate surgical preparation and optical-window procedures, then own the XORI analysis path: ROI processing, metric computation, mixed-effects modeling, mediation analyses, and scientific figures.

project 02

mechv1: reading selectivity from network weights

A trained CNN already computes its activations exactly. The scientific question is different: can its connectivity alone reveal what a unit will care about, and can those weight motifs explain how color, form, and texture selectivity are assembled across layers?

The decoder is a probe, not the explanation. Its job is to prove that predictive structure exists before tracing which connectivity motifs carry it.

reproducible network identity

The analysis pins exact weight files and layer definitions. Caffe AlexNet is treated separately from torchvision AlexNet because similar architectures do not imply interchangeable unit identities or selectivity labels.

independent functional labels

Hand-labeled color-sensitivity (CSI), form/outline, and texture indices provide a functional target independent of the weight decoder. Self-generated labels remain a separate diagnostic lane.

weight-only decoding

Ridge models use only incoming weight tensors and traced upstream summaries. Leave-one-unit-out validation, shuffled-label controls, 1,000-permutation tests, and a 39-test validation suite separate a real signal from memorization or pipeline drift.

from prediction to mechanism

Depth tracing asks whether earlier connectivity improves prediction. Coefficients, sparse alternatives, and architecture-aware traces are then inspected for motifs that can be stated as a mechanism rather than a black-box score.

These are active-project results, not a finished publication. The strongest signal is color selectivity; texture and architecture-aware tracing remain open work.

conv4 CSI For Caffe AlexNet conv4, incoming weights alone predict independent color-selectivity labels with cross-validated R² = 0.776 and Spearman ρ = 0.824 (permutation p = 0.001).
depth tracing At conv2, tracing learned selectivity toward pixel space reaches R² = 0.891, the clearest evidence that input-adjacent color structure carries through the hierarchy.
validation suite Thirty-nine automated tests lock network identity, feature construction, decoder behavior, permutation controls, and result serialization before a score is promoted.
cross-architecture The weight-decoding framework has been exercised across nine CNNs. Simple sequential networks trace cleanly; skip, projection, and concatenation boundaries still require architecture-aware handling.
V1 bridge VGG16 conv10 has a median orientation circular variance of 0.549, within 0.001 of the V1 reference median used in the analysis. This is a distributional comparison, not a claim that the layer reproduces cortex.
open limits Bair-real texture decoding is weaker than CSI, self-generated labels can be circular, and residual or dense connectivity breaks a naive channel-magnitude trace. Those limitations define the next analysis rather than being hidden by the headline score.
my role

I built and validated the weight-only decoding experiments, depth profiles, permutation controls, cross-network comparisons, and V1-reference bridge. Dr. Wyeth Bair supplies the historical network assets, selectivity measurements, and scientific direction.

in preparation

Analysis of Cross-Orientation Responses as a Function of Depth in Macaque Primary Visual Cortex

Mudit Agarwal et al.; first author.

in preparation

Spatial Patterns Across Macaque Primary Visual Cortex

Gaku Hatanaka, Mudit Agarwal, et al.; second author.

active research

MechV1 methods project

Weight-only selectivity decoding, cross-architecture validation, and V1 comparison.

presented may 2026

UW Research Symposium talk

Cross-orientation suppression across cortical depth in macaque V1.

watch the talk ↗
presented nov 2025

Society for Neuroscience poster

San Diego, California.

presented dec 2025

WANPRC talk + poster

Washington National Primate Research Center, Seattle.

XORI poster

The full-detail poster presented at the Society for Neuroscience and WANPRC meetings.

download poster ↓

XORI source code

Suite2p integration, metric computation, mixed-effects models, mediation analysis, and scientific figures.

view on github ↗

neural imaging

two-photon microscopyGCaMP6sSuite2pneuropil correctionROI extraction

statistics

mixed-effects modelsmediation analysisbootstrap CIsPearson/Spearman correlationpermutation testscross-validation

mechanistic analysis

PyTorchridge regressionweight tracingdimensionality reductioncircular statistics

scientific stack

PythonNumPypandasSciPystatsmodelsscikit-learnmatplotlib

surgery

craniotomy preparationoptical windowsperioperative monitoringsterile assistance

infrastructure

GitLinuxMATLABJupyterLaTeXreproducible checkpoints
← back to research