Joint sparse coding and temporal dynamics support context reconfiguration

Qianqian Shi, Yue Che, Faqiang Liu, Hongyi Li, Mingkun Xu, Sandra Reinert, Pieter M. Goltstein, Rong Zhao, Luping ShiarXiv 2026

TL;DR

By combining biological insights from mouse prefrontal cortex recordings with computational modeling, this paper reveals that sparse coding and temporal dynamics act as cooperative mechanisms to enable stable lifelong learning. When embedded together within Spiking Neural Networks (SNNs), these properties naturally mitigate catastrophic forgetting, offering a highly energy-efficient framework for sequential task adaptation without needing complex, artificial heuristics.

What Problem Does This Paper Address?

A central challenge in both neuroscience and artificial intelligence is the stability-flexibility balance: how can a system rapidly adapt to new contexts or rules (flexibility) without overwriting previously learned knowledge (stability)?

In artificial intelligence, standard Artificial Neural Networks (ANNs) notoriously suffer from catastrophic forgetting when learning tasks sequentially. While the biological brain handles non-stationary, changing environments gracefully, the exact population-level mechanisms that allow neural ensembles to reconfigure without wholesale erasure of prior policies have remained unclear. This paper bridges that gap by identifying how the brain coordinates spatial and temporal features to protect past memories during context transitions.

Methods

The authors employ a comparative approach combining experimental neurobiology and deep learning:

  1. Biological Analysis: The authors re-analyzed two-photon calcium imaging data from the mouse medial prefrontal cortex (mPFC) during a rule-switching Go/NoGo visual categorization task. They used a Context Tuning Index (CxTI) to isolate context-selective neurons and trained linear Support Vector Machines (SVMs) to decode context identity across varying temporal integration windows.
  2. Computational Modeling: To isolate the underlying computational principles, they compared conventional ANNs against Spiking Neural Networks (SNNs) utilizing Ternary Leaky Integrate-and-Fire (TLIF) neurons (which emit outputs of +1, 0, or -1).
  3. Ablation & Hybrid Models: They systematically introduced threshold-induced sparsity and state-dependent temporal dynamics into standard ANNs—both independently and in combination—to pinpoint their individual and joint contributions.
  4. Alternative Optimization: Beyond standard backpropagation (BP), they evaluated SNNs trained via SoftHebb, a biologically inspired local plasticity rule, to assess performance under strict resource and hardware constraints.

Datasets

The study utilizes a diverse array of datasets across biology and machine learning:

  • Mouse mPFC Calcium Imaging Dataset: Population recordings of 2,306 neurons from 10 mice categorizing 36 distinct visual grating stimuli (varying in orientation and spatial frequency) under shifting contextual rules.
  • Continual Learning Benchmarks:
  • Permuted MNIST (pMNIST)
  • MNIST-Family (a concatenated 30-class dataset combining MNIST, Fashion-MNIST, and KMNIST)
  • CIFAR-10 and CIFAR-100
  • Tiny-ImageNet (T-ImageNet)
  • ImageNet-R

Key Insights and Ideas

  • The Power of Synergy: Neither sparsity nor temporal dynamics is sufficient on its own to prevent catastrophic forgetting. Sparsity acts spatially by partitioning population activity into context-preferential pathways, reducing cross-context interference. Temporal dynamics then operate along the time axis, further separating these representations.
  • The Role of the Reset Mechanism: In temporal dynamics, the "reset" component (returning a neuron's potential to zero after firing) acts as a temporal sparsifier. It prevents the repeated recruitment of recently active units, effectively enforcing a refractory period that limits representational overlap across tasks.
  • Network-Wide Sparsity is Mandatory: Introducing sparsity locally (e.g., at a single hidden layer) provides virtually no benefit because downstream layers remain densely shared. To effectively mitigate forgetting, sparsity must be distributed network-wide to restrict credit assignment to context-relevant subnetworks.
  • Rethinking the SNN Critique: SNNs are frequently criticized for lagging behind conventional ANNs on static, i.i.d. benchmarks. The authors argue this is a benchmark mismatch: SNNs are architecturally optimized not for static fitting, but for stable, sequential updating over time in dynamic environments.

Key Results

  • Biological Sparsity: In the mouse mPFC, the cross-context subnetwork overlap fraction was found to be 0.32, significantly below the shuffle-derived chance level of 0.61, confirming highly segregated context-specific ensembles.
  • Superior Lifelong Learning Performance: SNNs consistently outperformed capacity-matched ANNs across task-incremental, domain-incremental, and class-incremental learning setups, showing minimal accuracy degradation on early tasks.
  • Substantial Power Savings: Hardware-level power estimations based on the Tianjic neuromorphic architecture revealed that SNNs achieved a 32.9% reduction in total power consumption compared to capacity-matched ANNs.
  • Efficiency Gains via Local Plasticity: SNNs trained with the local SoftHebb rule maintained competitive accuracy while drastically reducing computational overhead. At peak batch sizes, SoftHebb reduced the memory footprint from 11.2 MB to 7.1 MB and lowered computational costs from 1.37 to 0.91 GFLOPs compared to backpropagation-trained SNNs.

Limitations and Future Work

  • Simplified Timescales: While biological cortical networks feature complex, hierarchically organized, multi-timescale gradients, the SNN models in this study utilized a relatively restricted, uniform range of temporal dynamics.
  • High-Level Abstraction: The alignment between the biological data and the computational models is established at the level of population coding principles rather than detailed microcircuit matching (e.g., accounting for specific interneuron cell types or distinct microcircuit motifs).
  • Future Directions: The authors suggest that future work should incorporate tighter anatomical and cell-type-specific constraints, alongside causal perturbations (such as optogenetic silencing), to directly interrogate the underlying timescale-generating mechanisms in vivo.

Summary updated

BibTeX
@misc{shi2026joint,
  author = {Qianqian Shi and Yue Che and Faqiang Liu and Hongyi Li and Mingkun Xu and Sandra Reinert and Pieter M. Goltstein and Rong Zhao and Luping Shi},
  title = {{Joint sparse coding and temporal dynamics support context reconfiguration}},
  year = {2026},
  eprint = {2605.10178},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.10178},
}
Figure