Manuscript Offprint
arXiv:2611.02632Susceptibilities for Neural Networks Learning from Physical Data
Rohan Hitchcock*
Resolution
Gary W. Delaney
CSIRO
Jonathan H. Manton
University of Melbourne
Richard Scalzo†
Monash University
Jingge Zhu
University of Melbourne
Abstract
Neural networks that are trained on data arising from a physical system must somehow learn regularities induced by the underlying physical laws. In this setting, concepts from statistical physics provide powerful tools for analysing how physical laws influence the learning process. In this paper we explain how susceptibilities — which measure the response of a neural network to perturbations of a parameter of the data distribution — can be applied when learning from physical data. We show that such susceptibilities can identify the conditions under which specific input features are most informative for learning, guiding data selection, a prediction we validate experimentally. For distributions lacking a natural parameter, we propose introducing one via a physically meaningful scalar function of the physical state, and demonstrate that susceptibilities track the emergence of specific capabilities (such as collision detection) during training.
1 Introduction
Distributions of physical data have rich and interesting structure arising from underlying physical laws. While many kinds of data exhibit a high degree of regularity, physical data is somewhat unique in the respect that the distribution is often parametrised by physically meaningful parameters. A typical situation is a Boltzmann distribution where and the energy function of a state depends on a parameter . Statistical physics studies such distributions via expectations and their derivatives with respect to parameters like and . For example, the response of the Ising model (a model of magnetism) to perturbations in an external field controlled by is studied via the magnetic susceptibility , where is the magnetisation (Yeomans, 1992, Chapter 2).
When learning from physical data, physical parameters in the data distribution are inherited by the learning process. For example, when learning to approximate the distribution via a family of distributions parametrised by , the expected negative log-likelihood function
depends on via . It is natural to ask what role plays in the learning process.
*Work done while at the University of Melbourne and CSIRO.
†Work done while at CSIRO.
40th Conference on Neural Information Processing Systems (NeurIPS 2026).
In this paper we study the Bayesian susceptibilities framework, proposed recently by Baker et al. (2025) in the context of language models, for neural networks trained on physical data. These measure the response of a neural network, as measured by a scalar function of the model's parameters, to fluctuations in a physical parameter of the data distribution.
We show that susceptibilities can be used to identify conditions under which certain features of the input data are most informative for learning a particular task, in the setting of a transformer modelling the distribution of percolations on a lattice. This suggests a way of selecting training data to improve learning; this claim is validated experimentally by retraining with differently sampled training data.
For distributions lacking an existing parameter, we propose an approach to introducing one via a physically meaningful scalar function of the physical state. In a transformer trained to simulate a granular material, we demonstrate that a sign change in the susceptibility coincides with the emergence of collision-resolution capability.
2.1 Singular learning theory
Singular learning theory (SLT) was developed as a theory of Bayesian learning (Watanabe, 2009) and it is argued (see Wei et al., 2022; Lehalleur et al., 2025) that SLT can be used as a theoretical framework for deep learning. Developments such as internal model selection (Chen et al., 2023) and the local learning coefficient (Lau et al., 2025) allow concepts from SLT to be applied to neural networks trained via stochastic optimization.
Let be a distribution on some set , which we aim to approximate. Let be the parameter space of the model and consider distributions parametrised by together with a prior distribution on . For example, may be a set of sequences and the probability assigned to a sequence by a transformer with parameters . Let and define the negative log-likelihood function . Given an iid dataset drawn from , define ; the empirical version of . The posterior distribution is .
Posterior probability mass concentrates in distinct regions called internal models, and that the Bayesian learning process can be understood as selection between internal models as the dataset size is increased (Watanabe, 2009; Chen et al., 2023; Lau et al., 2025). Chen et al. (2023); Lau et al. (2025) propose extending SLT to study neural networks trained via stochastic optimization where local neighbourhoods of parameters along the training trajectory are treated as internal models of a Bayesian model. Throughout this paper we refer to the internal model associated to a parameter on the training trajectory as its local Bayesian model and study the behaviour of the network at via this object.
In practice, locality to is enforced using a Gaussian prior , where is a hyperparameter defining a soft localisation constraint, and samples are collected from the posterior using a stochastic gradient Markov chain Monte Carlo algorithm. Lau et al. (2025); Hitchcock and Hoogland (2025) have validated that this approach is able to recover information about the local geometry of , and other empirical work (Wang et al., 2025b; Hoogland et al., 2025; Urdshals and Urdshals, 2025; Baker et al., 2025; Gordon et al., 2026; Wang et al., 2025a) has corroborated the utility of this perspective for understanding neural networks trained via stochastic optimization.
2.2 Susceptibilities
Susceptibilities are used to study how the model responds to variation in the data distribution. Suppose that the data distribution depends smoothly on a real parameter . The negative log-likelihood function
also depends on . Following Baker et al. (2025), for the purpose of defining susceptibility we consider the quenched posterior at inverse temperature , defined in terms of so that derivatives with respect to may be taken. Recall that is the Gaussian prior centred at some .
Definition 2.1 (Baker et al., 2025). Let be a function of the model weights. The susceptibility of with respect to at inverse temperature is
The susceptibility measures the response in the (quenched) posterior to perturbations in . In our experiments is always the loss on some dataset. One can show that (see Baker et al., 2025, Lemma 2.2)
In Baker et al. (2025), the family of distributions is constructed such that setting recovers the training distribution and quantifies the response to a perturbation away from it. More generally, one may estimate for , as the data-refined local learning coefficient (Wang et al., 2025b); we use this generalisation in Section 3.1. Other applications of susceptibilities are discussed and compared with our work in Section 5.2.
3 Susceptibilities in learning physical systems
We consider two settings: a physical system with a natural control parameter, demonstrated for percolations on a lattice (Section 3.1); and a physical system without one, where we propose introducing a control parameter via a scalar function of the state, demonstrated for granular materials (Section 3.2).
3.1 Percolation
We consider the distribution of percolations on a lattice with sites. A state percolates if there exists a connected component of occupied sites spanning from the bottom to the top of the lattice. A site is either occupied or unoccupied, and a state is an assignment of ‘occupied’ or ‘unoccupied’ to each site. We represent a state by a vector where if site is occupied and if it is unoccupied. Let be the number of occupied sites in a state . We define a distribution on by
That is, is obtained by conditioning the iid Bernoulli distribution where each site is occupied with probability on the event that the state percolates. In experiments we sample from using rejection sampling (see Appendix B.1.1 and Figure 5). For an introduction to percolation theory see Stauffer (1985).
We regard as a distribution on binary strings of length by ordering the sites by first ordering the rows of the lattice from bottom to top and then ordering sites from left to right within each row. Let denote the distribution on predicted by an autoregressive transformer with causal attention (see Phuong and Hutter, 2022), where are the trainable parameters. Let and be the expected negative log-likelihood and the local posterior distribution defined in Section 2 respectively, and the susceptibility of a function with respect to .
Lemma 3.1. The susceptibility is given by
Proof. See Appendix A, Lemma A.1.
3.1.1 Masked susceptibilities
Regarding states as binary sequences using the ordering of sites described above, let denote the probability the transformer predicts that site has occupation status , so that
We can break down contributions of physical features of a state to the susceptibility . Let be a function from states to subsets of sites. We think of as defining a physical feature of a state ; for example, might be the set of sites within the largest occupied cluster. Let
denote the contribution to the loss from sites within the mask , and denote the number of occupied sites within .
Definition 3.2. Given , the masked susceptibility is defined as
where .
We use masked susceptibilities to understand the contribution to from different physical features of the input state. Given , define . From Lemma 3.1, using the bilinearity of covariance and the decompositions and , we obtain
3.2 Granular materials
3.2.1 Introducing a control parameter
We begin by considering the general setting of a data distribution on a space , understood as a distribution on the set of states of some physical system. Let be a function which satisfies
for all in some open neighbourhood of zero. We can introduce a control parameter by considering the distribution
Setting recovers the original distribution . The condition (5) is a technical requirement which ensures that the susceptibility below is well defined, but in practice should additionally be chosen to be a physically meaningful observable of the system, so that perturbations in are physically meaningful. We discuss the choice of in practice in Section 5.1. Given a function of the model parameters we consider susceptibility of with respect to , evaluated at . Let .
Lemma 3.3. We have
where is the quenched posterior distribution on at and .
Proof. See Appendix A, Lemma A.2.
Note that the expression (7) for has the same nested covariance structure as the expression (4) for the susceptibility in the percolation model case.

(b)
Figure 1: The susceptibility shows how the percolation model described in Section 4.1 becomes calibrated over all values of in the training distribution (9); contrast this with in Figure 2 which shows the difficulty of learning percolation at different values of . (a) over training for various values of . (b) plotted as a function of at various points over training. Observe that is roughly symmetric about — mean value of in the training distribution — at each point in training, and that decays to zero over training for all .
3.2.2 Granular material physics
We consider a system of two-dimensional identical spherical particles of radius r, confined to a rectangular box with constant gravitational acceleration. Collisions between particles are governed by damped linear spring dynamics (see Luding, 2008, Section 2.3.1); the force experienced by a pair of colliding particles is computed as damped linear spring compressed to a depth
where is the distance between particle i and particle j. Note that two particles apply a force on one another if they overlap in space. This can be interpreted as a simple model for deformation at the contact point for real-world collisions. Collisions with boundaries are handled in the same way except that the boundary has “infinite mass”; it does not move when hit by a particle.
The state of the granular material consists of the position and momentum of each particle, and so can be understood as a subset of where is the number of particles. A distribution on is induced by generating initial states according to some chosen distribution and allowing the system to evolve according to damped linear spring dynamics for some fixed duration. We show examples of granular material states in Figure 7.
We train a neural network to predict the future state after some fixed interval , given the current state of the system. This is a regression task and we train the model using mean-squared error loss. To apply susceptibilities, we formulate this as a Bayesian learning task by defining
where denotes the function defined by the neural network with parameters and denotes the result of allowing to evolve with damped linear spring dynamics for a duration ; i.e. is the ‘true’ function the network is being trained to learn. In this case, the quenched posterior is where is the expected mean-squared error on .
4 Experiments
4.1 Percolation experiments
Consider the setting of percolations described in Section 3.1. We train a 15M parameter transformer model on a mixture of percolating distributions on a lattice. Specifically, the training distribution is

(b)
Figure 2: The masked susceptibility (see Section 4.1) shows the difficulty of learning percolation at different values of ; contrast this with in Figure 1. (a) over training for various values of . (b) plotted as a function of at various points over training. Unlike , is non-negative for all values of and is a decreasing function of at each point in training. We interpret this as indicating that smaller values of make it easier to decrease the loss via improving prediction about percolation. This inference is supported by retraining the model on datasets biased toward smaller or larger values of ; see Figure 3.
where is a probability density supported on . In all except for a few specific experiments we take to be the uniform distribution. We use a standard transformer architecture; details are given in Appendix B.1.2. We treat each state as a sequence using the ordering described in Section 3.1; rows are ordered from bottom to top and then within each row sites are ordered from left to right. This ordering determines which sites are ‘visible’ when predicting a given site.
4.1.1 Estimating susceptibilities
To understand how the model responds to different parts of the training distribution, we estimate the susceptibility of with respect to the parameter in for different values of . Since we want to understand how the model responds to different data at different points in training, we estimate the susceptibility at various training checkpoints.
In addition to , we also estimate a masked susceptibility which is designed to isolate the effect of features related to percolation. This is motivated by the observation that, conditioning on sites within the transformer's causal mask, the majority of sites are unconstrained in the sense that their occupation status is not relevant to whether the state percolates, and predictions at these sites dominate the loss at all points in training. Sites involved in percolation are constrained to varying degrees, and certain sites are so constrained that they must be occupied in order for the state to percolate.
Definition 4.1. Let be a percolating state. A critical site is a site which, given the occupation status of sites in the model's causal mask, must be occupied for x to percolate.
We define (see Definition 3.2) where is the set of all critical sites in a percolating state and denotes the set of all sites. Recall that selects the sites included in the sum of per-site losses, so can be understood as the contribution to from the per-site losses at critical sites.
We estimate and using the expression derived in Lemma 3.1. The covariance over the posterior distribution is estimated via stochastic gradient MCMC; see Appendix B.1.3 for details.
4.1.2 Results
The key finding is that and tell different stories: the former reflects calibration across the training mixture and the latter reflects the difficulty of learning percolation at different . In Figure 1 we see that is negative for , positive for and roughly symmetric about over training, where . Over training appears to decay to zero for all

Figure 3: Biasing the training data towards smaller values of makes learning percolation easier. We retrain the model with different training datasets parametrised by and track the mean maximum cluster height generated by the model as a downstream measure of to what degree the model has learned percolation. When the dataset is biased toward small () the model learns percolation faster than when the dataset is biased towards large (). For reference, we show the mean maximum cluster height when the model is replaced with a random Bernoulli model (baseline) and the optimal value for a model which always generates percolating configurations (optimal).
values of . On the other hand, is positive over training for all values of and appears to decay to zero. These results are displayed in Figure 2.
We interpret Figure 1 as the model becoming calibrated across the training distribution. The expected value of over the local Bayesian model measures how well the model fits ; smaller is better. at and at early in training reflects that the model is best adapted near — the mean of the training mixture — and the decay of toward zero reflects calibration across the full range. This behaviour reflects the mixture training distribution and is not specific to percolation.
In contrast, across all indicates that critical sites contribute more to decreasing the posterior expectation of as decreases. We interpret this as: smaller makes it easier for the model to improve via better prediction about percolation. Note that the model must both predict unconstrained sites at the correct Bernoulli probability and ensure that overall configurations percolate (these tasks are not independent).
To validate the prediction that smaller is easier for percolation, we retrain the model on biased distributions of the form (9) with on ( weights toward small , toward large , and recovers the uniform mixture). We track the model's ability to generate percolating states via the mean maximum cluster height of generated sequences (see Appendix B.1.4). Figure 3 shows that models with learn percolation faster, and learn slower — consistent with our interpretation of .
We also compared to other diagnostic values: the empirical loss on iid samples drawn from , the norm of the gradient of this loss, and the dot product between the gradient of and the gradient of the loss . at critical sites in samples drawn from the training distribution . These do not predict the same data selection result as cleanly as , though does have some similar structure. We discuss this in more detail in Appendix B.1.5.
4.2 Granular material experiments
Consider the setting of Section 3.2. We train a transformer model to predict the future state of a granular material with damped linear spring dynamics after a short duration , given an input state . The data distribution is defined by randomly generating a particle state (with non-overlapping

Figure 4: The change in sign of the susceptibility over training reflects the development of collision resolution capability by the model. Early in training (the model's susceptibility to the total collision force) is positive, reflecting that the model is less suitable for states with more collisions. Later in training it becomes negative at the same time that the collision loss (the mean-squared error of predicted vs. actual states of colliding particles) decreases rapidly. The full susceptibility does not show this signal.
particles) and simulating damped linear spring dynamics, taking snapshots of particle states at regular intervals. The parameters of the particle simulation are given in Appendix B.2.1.
In the transformer, each particle is processed in its own residual stream and attention heads are used to transfer information between particles. We use a variant of attention where the sum of the attention scores can be less than one, but otherwise the transformer architecture and training setup is standard; see Appendix B.2.2 for details.
4.2.1 Susceptibilities for granular materials
In the granular materials setting there is no natural control parameter, so we demonstrate that one can be introduced via a physically meaningful scalar function as described in Section 3.2.1. Because the main difficulty in predicting future states of a granular material is resolving collisions between two or more particles, we take where is the magnitude of the force exerted on particle by particle . This is computed as where is the overlap between particles and given in (8) and is the collision spring constant.
Attention heads are expected to be essential for enabling the collision resolution capability of the model, given the model architecture. If susceptibilities defined using are informative, they should detect when this capability emerges. Following Baker et al. (2025, Definition 2.4), we consider component-wise loss observable , where is an architectural component of the model and is a delta function-like term which has the effect of restricting posterior expectation integrals to only integrate over parameters in ; details are given in Appendix B.2.3. In our experiments with granular models we take to be the set of all attention heads in the model. This allows us to study how the loss varies over the posterior due to changes exclusively within attention head parameters. The corresponding susceptibility quantifies how this varies in response to perturbations in .
Let denote the susceptibility of with respect to the control parameter in (6) at , where is the total collision force magnitude above. Similarly, let denote the susceptibility of ; that is, the susceptibility without the restriction to attention heads. We can estimate and using the nested covariance expression (7) derived in Lemma 3.3.
4.2.2 Results
We see in Figure 4 that shows that at a certain point in training, the model changes from being poorly suited to states with many collisions to being well-suited to such states. This coincides with the development of collision resolution capabilities as measured by the loss on colliding particles. Additionally, since we use the component-wise loss restricted to attention heads, this confirms attention heads contribute to this capability developing.
More specifically, the susceptibility is positive early in training, indicating that decreasing below zero (i.e. weighting the data away from states where is large) decreases the expected component-wise loss. We interpret this as indicating that the attention heads have not yet learned how to correctly resolve collisions between particles and so the model is better suited to a dataset with fewer collisions. Later in training, changes quickly to a negative value, indicating that increasing (i.e. weighting the data towards states where is large) decreases the expected component-wise loss. In contrast, stays flat over training and does not undergo a clear sign change that coincides with the emergence of collision detection behaviour.
5 Discussion
In percolation models, we showed that susceptibilities are able to identify components of the training distribution that are most informative for learning percolation. While the overall susceptibility reflects calibration over the range of parameter values in the training distribution, the contribution to the susceptibility from critical sites suggests that smaller parameter values make it easier to learn features related to percolation. This demonstrates how susceptibilities can be used to inform training data selection so as to promote or inhibit the model developing a given capability; for percolation models, the ability to generate states which percolate. Retraining on datasets biased toward (resp. away) from smaller parameter values accelerates (resp. decelerates) learning percolation capabilities, supporting our interpretation of susceptibilities at critical sites.
We further propose a general approach to defining susceptibilities via a scalar function of the data (Section 3.2.1). The construction applies to any data distribution and any satisfying the technical condition (5) — though should be chosen to be a physically meaningful observable (Section 5.1) — and the resulting susceptibility admits the same nested-covariance form as in the percolation case (Lemma 3.3). We demonstrate the construction in a transformer trained to simulate a granular material, taking to be the total magnitude of all collision forces in a state. The susceptibility undergoes a sign change that coincides with the emergence of collision-resolution capability.
5.1 Choosing observables in practice
In choosing an observable to define a susceptibility, we have in mind a practitioner who knows some property of the physical system they want the model to represent, and designs to capture it. This choice does not need to be made once, or correctly on the first attempt: most of the cost of estimating the susceptibility comes from posterior sampling, and choosing several observables only requires computing additional data covariances at each sampling step. There is little additional cost to choosing many observables and analysing the resulting vector of susceptibilities.
Candidate observables can often be generated without deep domain knowledge. Several observables can serve as a proxy for the same behaviour: for example, while for the granular system we used total collision force, but quantities such as the mean overlap and mean number of particle contacts all capture interactions between particles. Another reasonable candidate are quantities which govern the crossover from one regime to another, such as the Reynolds number in fluid mechanics. Likewise, quantities related to the modelling application such as the stress or strain on a solid body due to mechanical or thermal loads.
5.2 Related work
Susceptibilities in the general sense were introduced by Baker et al. (2025), and prior work has applied the concept to different kinds of perturbations of the data distribution. In Baker et al.
(2025); Wang et al. (2025a); Gordon et al. (2026) a parameter controls the mixture of two datasets in the context of language modelling. These are used to study the response of components of the model to different types of data (e.g. code vs. prose). In Kreer et al. (2025); Lee et al. (2025); Adam et al. (2025) the perturbation parameter is the importance of a particular sample and the loss of another sample . This instantiation of susceptibilities is referred to as a local Bayesian influence function, and is proposed as a method for data attribution. In contrast to this prior work (which considers data-mixture and sample-importance perturbations) we study susceptibilities derived from physically meaningful perturbations of the data distribution, in the context of learning from physical data. These arise via either an existing control parameter or a function of the physical system; the latter can be applied to any data distribution.
Analogies between statistical physics and statistical inference have been noted by many (see for example Zdeborová and Krzakala, 2016; LaMont and Wiggins, 2019). We exploit a direct connection when the training data itself comes from a physical system. In this context, we explain how perturbations of physical parameters — which induce a response in the physical system — similarly induce a response in the model, and that this connection can be used to make decisions about training.
5.3 Limitations
The sampling protocol which is used to estimate susceptibilities has hyperparameters (sampler step size, , and ) which must be jointly tuned to ensure stable sampling. This requirement substantially constrains the available choices. We did not conduct a systematic study of robustness to sampler hyperparameters. Our procedure for selecting them uses diagnostics of sampler health that are independent of the susceptibility (see Appendix C); a systematic sensitivity analysis is an important direction for future work. The measurements we report are corroborated by their predictive validity: in Section 4.1 the susceptibility correctly predicts which training distributions accelerate learning and in Section 4.2 the susceptibility tracks the independently measurable emergence of collision resolution.
The experimental evaluation in this paper is limited to two synthetic physical systems. Broader empirical validation in more complex or naturalistic settings is a natural direction for future work.
5.4 Future directions
It is natural to consider the effect of phase transitions and critical phenomena in the data distribution on the learning process, and in particular upon susceptibilities. The percolation system described in Section 3.1, for example, has a phase transition at (Stauffer, 1985, Table 1; see Remark B.1). We did not see any special behaviour near (we did not specifically design experiments to investigate critical phenomena), likely due to finite size effects; critical phenomena only truly occur as where is the size of the lattice. In our percolation experiments, is relatively small and scaling means scaling the context window of the model, which introduces additional cost and complexity.
The -based construction offers an alternative to the data mixture approach described in Baker et al. (2025). Our approach may offer advantages when it is difficult to curate a dataset to target a certain property. Whether these approaches offer different trade-offs or are complementary remains to be investigated.
Acknowledgments and Disclosure of Funding
RH was supported by CSIRO through the AI for Missions PhD Program and by the Commonwealth through an Australian Government Research Training Program Scholarship (DOI: https://doi.org/10.82133/C42F-K220). Computing resources were provided by CSIRO.
References
Maxwell Adam, Zach Furman, and Jesse Hoogland. The Loss Kernel: A Geometric Probe for Deep Learning Interpretability, September 2025. URL http://arxiv.org/abs/2509.26537.
Garrett Baker, George Wang, Jesse Hoogland, and Daniel Murfet. Structural Inference: Interpreting Small Language Models with Susceptibilities, May 2025. URL http://arxiv.org/abs/2504.18274.
Zhongtian Chen, Edmund Lau, Jake Mendel, Susan Wei, and Daniel Murfet. Dynamical versus Bayesian Phase Transitions in a Toy Model of Superposition, October 2023. URL http://arxiv.org/abs/2310.06301.
Andrew Gordon, Garrett Baker, George Wang, William Snell, Stan van Wingerden, and Daniel Murfet. Towards spectroscopy: Susceptibility clusters in language models, 2026. URL http://arxiv.org/abs/2601.12703.
Rohan Hitchcock and Jesse Hoogland. From global to local: A scalable benchmark for local posterior sampling, 2025. URL http://arxiv.org/abs/2507.21449.
Jesse Hoogland, George Wang, Matthew Farrugia-Roberts, Liam Carroll, Susan Wei, and Daniel Murfet. Loss Landscape Degeneracy Drives Stagewise Development in Transformers. Transactions on Machine Learning Research, 2025.
Philipp Alexander Kreer, Wilson Wu, Maxwell Adam, and Jesse Hoogland. Bayesian Influence Functions for Scalable Data Attribution. In 3rd Workshop on High-dimensional Learning Dynamics, June 2025.
Colin H LaMont and Paul A Wiggins. Correspondence between thermodynamics and inference. Physical Review E, 99(5):052140, 2019.
Edmund Lau, Zach Furman, George Wang, Daniel Murfet, and Susan Wei. The local learning coefficient: A singularity-aware complexity measure. In Proceedings of The 28th International Conference on Artificial Intelligence and Statistics, volume 258, pages 244–252. PMLR, May 2025.
Jin Hwa Lee, Matthew Smith, Maxwell Adam, and Jesse Hoogland. Influence Dynamics and Stagewise Data Attribution, October 2025. URL http://arxiv.org/abs/2510.12071.
Simon Pepin Lehalleur, Jesse Hoogland, Matthew Farrugia-Roberts, Susan Wei, Alexander Gietelink Oldenziel, George Wang, Liam Carroll, and Daniel Murfet. You Are What You Eat – AI Alignment Requires Understanding How Data Shapes Structure and Generalisation, February 2025. URL http://arxiv.org/abs/2502.05475.
Chunyuan Li, Changyou Chen, David Carlson, and Lawrence Carin. Preconditioned stochastic gradient Langevin dynamics for deep neural networks. In Proceedings of the AAAI conference on artificial intelligence, volume 30, 2016.
Stefan Luding. Introduction to discrete element methods: basic of contact force models and how to perform the micro-macro transition to continuum theory. European journal of environmental and civil engineering, 12(7-8):785–826, 2008.
Mary Phuong and Marcus Hutter. Formal Algorithms for Transformers, July 2022. URL http://arxiv.org/abs/2207.09238.
K. Samiei, B. Peters, M. Bolten, and A. Frommer. Assessment of the potentials of implicit integration method in discrete element modelling of granular matter. Computers & Chemical Engineering, 49: 183–193, February 2013.
Dietrich Stauffer. Introduction to percolation theory. Taylor & Francis, 1985.
Robert Tuley, Matthew Danby, John Shrimpton, and Mark Palmer. On the optimal numerical time integration for Lagrangian DEM within implicit flow solvers. Computers & Chemical Engineering, 34(6):886–899, June 2010.
Einar Urdshals and Jasmina Urdshals. Structure development in list-sorting transformers. In ICML 2025 Workshop on Structured Probabilistic Inference & Generative Modeling, 2025. URL https://arxiv.org/abs/2501.18666.
George Wang, Garrett Baker, Andrew Gordon, and Daniel Murfet. Embryology of a Language Model, August 2025a. URL http://arxiv.org/abs/2508.00331.
George Wang, Jesse Hoogland, Stan van Wingerden, Zach Furman, and Daniel Murfet. Differentiation and specialization of attention heads via the refined local learning coefficient. In The Thirteenth International Conference on Learning Representations, 2025b.
Sumio Watanabe. Algebraic Geometry and Statistical Learning Theory. Cambridge University Press, 2009.
Susan Wei, Daniel Murfet, Mingming Gong, Hui Li, Jesse Gell-Redman, and Thomas Quella. Deep learning is singular, and That's good. IEEE Transactions on Neural Networks and Learning Systems, 2022.
J. M. Yeomans. Statistical Mechanics of Phase Transitions. Oxford University Press, 1992.
Lenka Zdeborová and Florent Krzakala. Statistical physics of inference: Thresholds and algorithms. Advances in Physics, 65(5):453–552, 2016.
Appendix
These appendices contain proofs and additional methodological details, supporting the main text.
-
Appendix A gives proofs for the theoretical results stated in Section 3.
-
Appendix B provides additional details about the methodology of the experiments discussed in Section 4.
-
Appendix C gives detail on sampling and hyperparameter selection.
A Proofs
Lemma A.1 (restating Lemma 3.1). Consider the setting of Section 3.1 and let be a function of the model's weights. The susceptibility of with respect to (see Definition 2.1) is given by
where is the number of occupied sites in a given state.
Proof. Using (2) we have
We have
Let be the subset of all percolating configurations, and the number of occupied sites in a state . We have
where we define . Taking derivatives with respect to , we have:
and
It follows from the product rule that
Hence we have
Lemma A.2 (restating Lemma 3.3). Consider the setting of Section 3.2.1. In particular, let be a function of the model weights and a function which satisfies
for all h in some neighbourhood of zero. We have
Proof. Using Equation (2) we have
where
and
Note that and . By the product rule
Then
(b)


Figure 5: An example of percolating and non-percolating states. Each lattice site is displayed as a square on a grid. Occupied states are coloured black and unoccupied sites are coloured white. (a) A percolating state; the type of states which we train the model to predict. The percolating cluster — a cluster spanning from the bottom to the top of the lattice — is highlighted with a red border. (b) A non-percolating state; we do not include such states in the training distribution. In contrast to (a), there is no connected component of occupied sites spanning from the bottom to the top of the lattice. When evaluating a transformer trained on distributions of percolating states we consider the tallest cluster in the generated configuration (see Appendix B.1.4). The tallest cluster in (b) is highlighted with a red border and has height eight because it spans eight rows. The tallest cluster in (a) is the percolating cluster and it has height 16.
B Experiment details
B.1 Percolation models
In this section we give a detailed methodology for the experiments involving percolation models, discussed in Section 4.1.
B.1.1 Data generation and identifying critical sites
We sample from the distribution defined in (3) as follows. First we generate a candidate sample in which each site's occupation status is independent of the other sites. A site in is occupied with probability and unoccupied with probability . We then check whether percolates by finding the largest connected cluster of occupied sites and checking whether it intersects with both the top and bottom row of the lattice. This process is repeated until is found to percolate; is then returned as a sample from . An example of a percolating and non-percolating state is visualised in Figure 5.
Remark B.1. In an infinite lattice a state percolates if there exists a connected component of occupied sites with infinitely many sites. For an infinite two-dimensional (square) lattice (i.e. in the limit ) it is known that percolation happens with probability zero for where (the exact value is not known; see Stauffer 1985, Table 1). At finite however, percolation occurs with positive probability for . This allows us to consider distributions for in our experiments with percolation models.
Let be a percolating state. To identify if a given occupied site is a critical site (Definition 4.1) in we form a new state in which , for and for . We then check whether percolates. Site is a critical site in if and only if percolates, according to Definition 4.1.
B.1.2 Training and model details
We train an autoregressive transformer model on a mixture of data from different , where the lattice size . That is, for some distribution with support equal to , the training distribution is defined as
In most experiments we take to be uniform on ; in experiments demonstrating the effect of biasing the training distribution to smaller and larger values of we take
for and otherwise, where is a parameter controlling the bias towards either end of the interval . As the density approaches the uniform density on .
When considering a state as an input to our model, we treat it as a binary string by fixing an ordering on lattice sites. Rows are ordered from bottom to top and sites are ordered from left to right within each row. Since the model uses a causal mask, when making predictions about site , it can see all sites in rows below and all sites to the left of and in the same row. Each site has four input features: the coordinates of the site (normalised to ), the occupation status of the site (either 0 or 1), and the prior probability of occupation.
We use a standard transformer architecture with blocks consisting of multi-head self attention, a two layer MLP with GeLU activation, and layer normalization applied twice: before computing attention and in-between the attention and MLP. For a positional embedding, we use a 2D version of RoPE which applies rotations based on the row and column of each lattice site. The initial embedding of the input features into the residual stream is done by treating the four input features as a vector in and applying a two layer MLP with GeLU activation. For each input site, the model predicts a distribution on ; the output logit is obtained by applying a linear layer to the final vector in the residual stream.
The model is trained using binary cross entropy loss and the AdamW optimizer for 262 144 steps. Unseen data is used every training step. We use a learning rate schedule, starting at 0 with a linear warmup over 2000 steps to a peak learning rate of followed by cosine decay to a final learning rate of over the remainder of the training steps. Gradient clipping and weight decay are used.
Training and architecture hyperparameters are summarised in Table 1.
Table 1: Hyperparameter values for the model architecture and training procedure of the percolation models.
| Hyperparameter | Value |
|---|---|
| Total trainable parameters | 14 839 809 |
| Number of layers | 8 |
| Residual stream dimension | 256 |
| Number of heads | 4 |
| MLP width | 1024 |
| Optimizer | AdamW |
| Batch size | 64 |
| Weight decay | 0.01 |
| Gradient clipping norm | 1 |
| Peak learning rate | |
| Final learning rate | |
| Total training steps |
B.1.3 Estimating susceptibilities
We estimate susceptibilities using the covariance expression (4) found in Lemma 3.1:
Recall that
is the quenched posterior.
We estimate the covariance over using stochastic gradient-based Markov chain Monte-Carlo sampling; the sampling procedure and the procedure for selecting sampling hyperparameters are described in Appendix C. Hyperparameter values are given in Table 2.
After a burn-in period, we estimate the inner covariance each step. To estimate this covariance, we use a fixed ‘evaluation’ dataset, which is drawn from independently of the data used by the sampler to compute each step. We run a number of independent chains; each chain receives independent data for the sampler, independent data to compute the inner covariance, and has independent noise. We estimate the variability in the estimate of the susceptibility by computing the standard error over the independent chains.
B.1.4 Evaluating percolation performance via generated cluster height
Here we explain the methodology for evaluating a model's overall ability to make predictions about percolation; these results are presented in Figure 3 for models trained on different distributions.
We assess the model’s ability to generate percolating configurations by sampling 16 384 elements from the mixture of percolation distributions defined in Equation (9), where is taken to be the uniform distribution on . Note that the uniform mixture is used regardless of the training distribution of the model so that we can compare evaluation metrics. The top 8 rows of each data sample are removed (recall the lattice size is ) and the model is used to generate the occupation status for the remaining sites, using the first 8 rows as a prompt. We then record the height of the tallest cluster in the generated state, and take the mean of this quantity over the dataset. An optimal model which always generates percolating configurations will always record a maximum cluster height of 16. An example demonstrating the maximum cluster height is given in Figure 5(b).
For a baseline we use the same procedure described above, except that the top 8 rows are instead completed by randomly generating the occupation status from an iid Bernoulli distribution with probability h, where h is the probability parameter used to generate the sample.
B.1.5 Comparing susceptibilities to other quantities
To compare to , we compute other diagnostic quantities over the training of percolation models. In Figure 6 we show the empirical loss on iid samples drawn from , the norm
Table 2: Hyperparameter values for susceptibility estimation in percolation models.
| Hyperparameter | Value |
|---|---|
| Sampler step size | |
| 50 | |
| 0.5 | |
| RMSProp stability parameter | |
| RMSProp exponential decay rate | 0.99 |
| Sampler batch size | 256 |
| Total steps | 10240 |
| Burn-in steps | 9728 |
| Estimation steps (draws) | 512 |
| Number of chains | 12 |
| Estimation dataset size | 4096 |

(b)
(c)
Figure 6: Other diagnostic quantities do not predict the same data selection result as cleanly as ; compare to Figure 2 (a). (a) The empirical loss on iid samples drawn from . (b) The norm of the gradient of . (c) The dot product between the gradient of and the gradient of the loss at critical sites in samples drawn from q.
of the gradient of this loss, and the dot product between the gradient of and the gradient of the loss at critical sites in samples drawn from the training distribution . These do not predict the same data selection result as cleanly as . The loss is non-monotonic in , not suggesting that smaller values of should be more informative for learning percolation. The gradient norm is noisy, with no consistent ordering in across training steps. The gradient dot product does show similar structure to : the values are consistently ordered by over training. However, the quantity changes sign twice in the period of training where percolation is learned and the different curves are not as cleanly separated as .
A more detailed comparison between susceptibilities and other diagnostic quantities is an important direction for future work.
B.2 Granular material models
B.2.1 Data generation
We train a model on a distribution of granular material states defined by the following data generation procedure. An initial state is generated by randomly generating particle positions in the top half of the box such the particles do not overlap, and initial velocities generated according to the standard normal distribution. Damped linear spring dynamics are simulated for 5.12 s; see Table 3 for other quantities defining the granular physics. This duration was chosen as it is long enough that the system has usually dissipated most of its energy via the damped collisions, but short enough that it avoids including a large number of states where the particles are static in the dataset. Example states are shown in Figure 7.
(a)
(b)


Figure 7: Two example states of the granular system: 64 identical spherical particles confined to a rectangular box under damped linear spring dynamics. Particle momenta — which are part of the data of a state — are not visualised.
B.2.2 Training and model details
We train a model with a transformer architecture to predict the future state of the granular material after some fixed duration , given an input state . The architecture of the transformer blocks is standard. Each block consists of multi-head attention followed by a two-layer MLP with ReLU activation function, and two separate layer normalisations applied prior to both the attention and MLP layers. Each particle is processed in parallel in its own residual stream, and the attention heads are used to transfer information between particles. No attention mask is used. We allow the total attention assigned by a head to be less than one by including an additional null position with zero-valued key and value vectors.
Boundary information is included in the embedding step. Along each boundary, we define fixed points spaced regularly along the boundary. The position vector of each point is passed through a learned two-layer MLP (with ReLU activation), where the output has dimension equal to the residual stream dimension. Each particle's state is passed through a separate two-layer MLP (with ReLU activation), and its embedding is augmented by summing the representations of all boundary points within a fixed radius.
The predicted state of particle with position and velocity is computed by projecting the output of residual stream to a vector using a linear layer. This is then used to compute
where is acceleration due to gravity. This is based on the update rule for the semi-implicit Euler integrator, which has good numerical stability properties for numerical simulations of damped linear spring dynamics (Samiei et al., 2013; Tuley et al., 2010).
The model is trained using mean-squared error loss and the Adam optimizer for 64000 steps. Unseen data is used each training step. We use a constant learning rate of . We do not use either gradient clipping or weight decay.
Training and architecture hyperparameters are summarised in Table 4.
B.2.3 Estimating susceptibilities
Susceptibilities are estimated in essentially the same way as for the percolation models (see Appendix B.1.3), using the covariance expression (7) found in Lemma 3.3
where is the (quenched) posterior. Expectations with respect to the (quenched) posterior are computed by sampling as in the percolation models; the sampling procedure and the procedure for selecting sampling hyperparameters are described in Appendix C. Hyperparameter values are given in Table 5. The inner covariance over the data distribution is estimated using an evaluation dataset which is independent of the dataset used for sampling.
In the granular materials models we consider the susceptibility of the component-wise loss (Baker et al., 2025, Definition 2.4) , where denotes a component of the model and is similar to a delta function which we describe below. By a 'component' of the model we
Table 3: Hyperparameters of granular material data.
| Hyperparameter | Value |
|---|---|
| Number of particles | 64 |
| Particle diameter | 1 |
| Particle mass | 1 |
| Collision spring constant | 1000 |
| Collision damping coefficient | 10 |
| Acceleration due to gravity | 9.8 |
| Box height | 14 |
| Box width | 28 |
| Simulated duration | 5.12 s |
mean a subset of the parameters (not a subset of parameter space). In experiments we take to be the set of all attention heads; a parameter is in if it is used in any attention head of the model. Formally, indicates a factorisation of parameter space . Writing as where and , the notation indicates the restriction of the integral to parameters only in :
When estimating integrals involving using MCMC, only parameters in are updated and the remainder are held fixed. This allows us to investigate the effect of specific parameters on posterior expectations. It is related to the weight-refined local learning coefficient introduced by Wang et al. (2025b).
C Sampler hyperparameter selection
In both the percolation and granular material experiments, estimating susceptibilities involves estimating a covariance with respect to a posterior distribution of the form
where is the expected loss at a parameter and is a prior distribution. We estimate this covariance using stochastic gradient-based Markov chain Monte-Carlo sampling, using a similar methodology to Lau et al. (2025) for estimating the local learning coefficient. Following Lau et al. (2025), to estimate the susceptibility at parameter vector , we localise the posterior using a Gaussian prior
centred at , where is a hyperparameter of the estimation process used to control locality. Replacing with an estimate computed from a batch of data points, the gradient term used in sampling — which is designed to approximate — is
We sample from using stochastic gradient Langevin dynamics (SGLD) with the RMSProp preconditioner (Li et al., 2016). We run several independent chains; the estimate is the mean over chains and its standard error is computed across chains. The sampler step size, and are treated as hyperparameters of the estimation procedure.
Sampling hyperparameters must be tuned so that sampling converges and is stable. This is primarily evaluated by visual inspection of loss traces: the plot of the loss versus sampling step. When sampling is working well, the loss trace increases above the value at and levels off into random oscillation about a stable mean. Hyperparameters are rejected if the loss traces have large spikes, do not level off, or have significant autocorrelation, or if independent chains level off at different values. We aim to find hyperparameters which produce stable sampling across all checkpoints of the model for which we want to estimate the susceptibility. Hyperparameters for the percolation and granular material models are tuned separately.
In practice, hyperparameter selection was done by sweeping over the sampler step size, and values (in log-space), and over several model checkpoints. Loss traces were inspected and
Table 4: Hyperparameters for model architecture and training procedure of granular material models.
| Hyperparameter | Value |
|---|---|
| Total trainable parameters | 432 989 |
| Number of layers | 4 |
| Residual stream dimension | 128 |
| Number of heads | 8 |
| MLP width | 128 |
| Optimizer | Adam |
| Batch size | 64 |
| Learning rate | 0.001 |
| Total training steps | 64000 |
Table 5: Hyperparameter values for susceptibility estimation in granular material models.
| Hyperparameter | Value |
|---|---|
| Sampler step size | |
| 1385 | |
| 1 | |
| RMSProp stability parameter | |
| RMSProp exponential decay rate | 0.99 |
| Sampler batch size | 128 |
| Total steps | 2000 |
| Burn-in steps | 1800 |
| Estimation steps (draws) | 200 |
| Number of chains | 16 |
| Estimation dataset size | 2048 |
evaluated according to the above criteria, and additional values were swept as needed until a single hyperparameter setting which produced healthy sampling at each selected training checkpoint was found. The number of steps and sampler batch size were increased as needed if no values for the step size, and could be found. Once candidate hyperparameter values were found, estimation was run at every checkpoint and the loss traces from sampling runs used to estimate the susceptibility were checked and evaluated according to the criteria above.
The robustness of this hyperparameter selection process and the question of how best to tune hyperparameters is an important direction for future work.