arXiv Science⌕ Search

arXiv · 2611.27647

Cyclic perturbations encode memories in trained neural networks without loss of performance

Abstract

Many disordered materials exhibit a remarkable form of memory: they retain information about the history of cyclic perturbations. Whether this phenomenon also occurs in artificial neural networks, whose mathematical structure and dynamics share many similarities with disordered physical systems, is unknown. Here we show that cyclically perturbing a trained, overparameterized deep neural network encodes information in the structure of the weights that can subsequently be retrieved, thus retaining memory of the perturbation history. During each write cycle, all weights are displaced, after which the network relaxes through gradient descent. Repeated cycles organise the neural network into a state that is reversible for perturbations up to the write amplitude, allowing the encoded value to be read from the onset of irreversible weight motion. Multiple memories can also be encoded, although under deterministic writing only the largest persists at long times. Inspired by cyclically sheared suspensions, we introduce a novel noisy-write protocol that preserves all encoded memories at long times. Remarkably, neither deterministic nor noisy memory writing measurably affects the network's performance on unseen data from its original learning task. Our results establish cyclic memory as a phenomenon shared by disordered physical systems and deep neural networks, and show that networks can exploit as yet unexplored memory capabilities without compromising their original function.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Max Kerr Winter, Liesbeth M. C. Janssen. 2026-11-20. Cyclic perturbations encode memories in trained neural networks without loss of performance. https://arxiv.science/abs/2611.27647

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Scalable Physics-Inspired Transformers for Spin Glasses

Efficient sampling of the Boltzmann distribution in frustrated spin glasses is central to statistical mechanics and combinatorial optimization. Despite advances in machine-learning-based approaches, two issues persist: limited gains from increased model scale; and high computational cost on large systems that limits practical efficiency. Here, we develop a physics-inspired transformer with interaction-aware attention and concatenated positional embeddings, coupled to population-assisted training to address these challenges. By further leveraging FlashAttention and key-value caching for efficient autoregressive sampling, it achieves up to $36.4\times$ speedup over vanilla variational autoregressive networks, enabling neural-network simulations of spin-glass systems with up to $4096$ spins on a single GPU. Across the Sherrington-Kirkpatrick and two- and three-dimensional Edwards-Anderson models, FlashVAN can resolve full probability distributions and free energies, and generate nontrivial finite-temperature overlap statistics in agreement with independent numerical benchmarks. For ground-state searches, FlashVAN also exhibits instance-dependent advantages complementary to those of Global Annealing (GA), a state-of-the-art machine-learning-assisted optimization approach, while our training strategy can achieve a $3\times$ speedup over GA on a particularly challenging 3D instance. This framework thus establishes a scalable paradigm for frustrated spin-glass systems.

cond-mat.dis-nn↗

Anderson Localization and the Localization Landscape on the Bethe Lattice: Exact Results and Limits of the Landscape Picture

The Localization Landscape Theory (LLT) offers a classical analogy for Anderson localization through an effective confining potential, whose percolation threshold has been proposed to mark the mobility edge. Despite striking numerical agreement in three dimensions, the theoretical foundations of this correspondence remain unclear. Here, we extend our analysis of the LLT on the Bethe lattice presented in~\cite{Tonetti2026}, where both the Anderson and LLT percolation transitions admit exact solutions. We show that the two transitions are distinct: LLT percolation belongs to the standard mean-field universality class, in sharp contrast to the unconventional critical behavior of the Anderson transition on the Bethe lattice. Nonetheless, the LLT reproduces several exact results in the very low-disorder regime: the position of the isolated eigenvalue, the minimal disorder at which the LLT percolation curve appears, compatible with the onset of the mobility edge, and, through analytic continuation of its cavity equations, the Aizenman--Warzel lower bound for localization. At large connectivity, we show that the mobility edge and the LLT percolation line emerge from the band edge at the same point, $W_{\min}$, and determine analytically how they separate at stronger disorder. We also study the dependence of the LLT percolation threshold on the energy shift, evaluate the LLT prediction for the density of states, and derive results on the statistical properties of the variables controlling the problem. Finally, we develop an extreme-value analysis of the cavity Green's functions and Localization Landscape variables. These findings provide an exact analytical benchmark showing that, despite its geometric appeal, the LLT does not reproduce the quantum critical properties of Anderson localization on all geometries, while still offering a powerful tool to understand its very low-disorder regime.

cond-mat.dis-nn↗

Statistical mechanics of episodic memory in LLMs

Episodic memories unfold as ordered sequences of correlated events that must be stored in a network which already embodies extensive knowledge of the world, a setting that classical associative memory theories do not address. The brain is thought to employ complementary learning systems for this task: each new episode is stored rapidly in the hippocampus as its own engram, on top of slowly accumulated cortical knowledge. In such a system, the synaptic cost of storing each episode limits how many can be stored over a lifetime, making efficient storage essential. Recently, it was demonstrated that large language models (LLMs) can efficiently store episodic memories in a continual manner by assigning each episode its own gated low-rank adaptation (LoRA) module. Yet why this method is so efficient, and how the storage cost depends on network size, representation dimension, and the number of possible events, remain unclear. We develop a theory of episodic memory storage by LoRA fine-tuning of an LLM's penultimate weight matrix and solve it using geometric arguments and statistical mechanics. We show that the nonconvexity of the storage constraints leads to replica symmetry breaking in the space of connection weights, and that the one-step solution agrees closely with simulations. We further show that LoRA can store sequences of length P with O(1) parameters per association rather than the O(P) of classical recurrent models, and that it naturally supports a large output vocabulary, with capacity decreasing only logarithmically in the vocabulary size. Finally, the pretrained LLM weights convert a retrieval margin that would otherwise vanish into a finite one. A solvable model of pretrained relative biases explains this effect and reveals an emergent form of prediction-error coding wherein each association's representation strength grows with its surprise under the pretrained network.

cond-mat.dis-nn↗