Navigating the Latent Space Dynamics of Neural Models

Marco Fumero, Luca Moschella, Emanuele Rodolà, Francesco Locatello

International Conference on Learning Representations 2026 · Oral

Overview

In this ICLR presentation, Marco Fumero and collaborators introduce a novel perspective on understanding the internal workings of neural networks, particularly autoencoders, by analyzing the emergent dynamical systems within their latent spaces. Moving beyond the traditional view of latent representations as static points, the research proposes that iterating the combined decoder-encoder map (termed the latent map) generates meaningful trajectories and reveals attractors that encode crucial information about the model's learned knowledge and its relationship with the data distribution. This work challenges practitioners to consider latent representations not merely as fixed embeddings, but as dynamic flows shaped by the network's architecture and training objectives.

Watch on SlidesLive

Visual summary for Navigating the Latent Space Dynamics of Neural Models by Marco Fumero, Luca Moschella, Emanuele Rodolà, Francesco Locatello
Visual summary for Navigating the Latent Space Dynamics of Neural Models by Marco Fumero, Luca Moschella, Emanuele Rodolà, Francesco Locatello

Key moments

  1. 0:00 Introduction: Iterating decode-encode creates latent trajectories
  2. 1:57 Visualizing latent vector fields and trajectory convergence
  3. 4:07 Theoretical insight: Latent vector field proportional to score
  4. 5:36 Attractors characterize memorization versus generalization regimes
  5. 8:00 Data-free weight probing with attractors from noise
  6. 10:14 Latent trajectories effectively detect distribution shifts
  7. 12:10 Rethinking representations as flows, not static points
  8. 13:20 Applying dynamics to auto-regressive transformer models (Q&A)

Navigating the Latent Space Dynamics of Neural Models

Speakers: Marco Fumero, Luca Moschella, Emanuele Rodolà, Francesco Locatello

Conference: ICLR 2026

YouTube: https://slideslive.com/39062226

Overview

In this ICLR presentation, Marco Fumero and collaborators introduce a novel perspective on understanding the internal workings of neural networks, particularly autoencoders, by analyzing the emergent dynamical systems within their latent spaces. Moving beyond the traditional view of latent representations as static points, the research proposes that iterating the combined decoder-encoder map (termed the latent map) generates meaningful trajectories and reveals attractors that encode crucial information about the model's learned knowledge and its relationship with the data distribution. This work challenges practitioners to consider latent representations not merely as fixed embeddings, but as dynamic flows shaped by the network's architecture and training objectives.

The core idea revolves around treating the composition of the decoder and encoder as a function that maps the latent space onto itself. Repeated application of this function generates a sequence of latent points, forming a trajectory. The central questions explored are whether these trajectories converge or diverge, what information the resulting fixed points (attractors) encode, and how these dynamics relate to fundamental properties like generalization, memorization, and out-of-distribution detection. This dynamic lens offers a powerful alternative for probing neural network behavior without requiring external data.

The significance of this research lies in its potential to unlock deeper insights into the opaque nature of deep learning models. By formalizing the latent space as a discrete dynamical system, the authors provide both theoretical grounding and empirical evidence that network inductive biases naturally lead to stable dynamics. The findings offer practical tools for model analysis, enabling data-free weight probing to understand learned patterns and a new method for detecting distribution shifts. Ultimately, this work advocates for a paradigm shift in representation learning, encouraging researchers to consider the dynamic evolution of latent states as a rich source of information about model intelligence.

Background

▶ Watch: Introduction: Iterating decode-encode creates latent trajectories (0:00)

The field of representation learning, particularly with autoencoders and their variants, has long focused on compressing high-dimensional data into a lower-dimensional latent space. The prevailing paradigm views these latent representations as static points, each corresponding to a unique input or a feature vector that captures essential characteristics of the data. However, the internal mechanisms by which neural networks learn and organize these representations, and how they evolve under the network's own transformations, remain largely unexplored. This talk addresses a fundamental gap: what happens when a latent representation is not merely observed, but actively iterated through the very network that generated it?

The problem can be framed as understanding the behavior of an iterated function system within the latent space. If we define F as the composition of the decoder and then the encoder (i.e., F(z) = Encoder(Decoder(z))), then iterating this function, z_{t+1} = F(z_t), creates a trajectory. This formalizes the problem as a discrete differential equation in the latent space. The existence and nature of solutions to this equation—specifically, whether trajectories converge to fixed points or attractors, or diverge—is central to understanding the intrinsic dynamics of the network.

Prior work in deep learning has focused on the properties of latent spaces through various means, such as visualizing embeddings, analyzing disentanglement, or studying the geometry induced by different regularization techniques. For instance, Variational Autoencoders (VAEs) incorporate a KL divergence term that regularizes the latent distribution towards a prior, implicitly influencing its structure. Similarly, weight decay is a common regularization strategy that penalizes large weights, potentially leading to smoother or more contractive mappings. While these techniques are known to affect latent space properties, their explicit role in shaping emergent dynamical systems had not been systematically investigated. This research builds upon these foundational concepts by revealing how common inductive biases already present in standard training practices inherently lead to stable, interpretable dynamics within the latent space, offering a new lens through which to interpret the output and internal state of neural models.

Key Findings

▶ Watch: Theoretical insight: Latent vector field proportional to score (4:07)

The research presented by Fumero et al. uncovers several pivotal findings regarding the emergent dynamics within the latent spaces of neural models:

  1. Emergence of Stable Trajectories: Despite being non-recurrent networks, autoencoders exhibit stable trajectories in their latent spaces. This convergence is attributed to various inductive biases commonly employed during training, such as initializing weights close to zero, using deep networks where variance shrinks, and applying regularization techniques like weight decay or KL divergence in VAEs. These biases collectively enforce the latent map to be locally contractive in certain regions, ensuring trajectories do not diverge.
  1. Attractors Encode Data Distribution Modes: Theoretically, under assumptions of a smooth latent marginal distribution and local contractiveness, the latent vector field (representing the direction and magnitude of displacement) is shown to be proportional to the score function of the latent distribution (∇ log p(z)). This crucial insight implies that attractors in the latent space correspond directly to the modes (high-density regions) of the data's distribution within that space. Latent trajectories, therefore, act as "pushes" that guide data points towards these high-density regions.
  1. Attractors Characterize Memorization vs. Generalization: The properties of attractors provide a diagnostic tool for assessing a model's operational regime. In a memorization regime, attractors are numerous, narrow, and closely align with individual training data points. Conversely, in a generalization regime, attractors are wider, fewer, and form more abstract patterns or a "dictionary" that can effectively reconstruct both training and unseen test data. The evolution of attractors during training also reflects this shift, initially corresponding to specific training points before transforming into more abstract representations as generalization improves.
  1. Data-Free Weight Probing: A significant practical finding is that attractors generated purely from noise can reveal a foundation model's learned internal dictionary of patterns. By sampling Gaussian noise in the latent space, computing attractors, and using these attractors as a basis, the authors demonstrate that they can reconstruct arbitrary latent data with significantly lower error compared to an orthogonal basis. This allows for probing the model's knowledge without needing any input data.
  1. Latent Trajectories Detect Distribution Shift: The dynamics of latent trajectories offer a robust mechanism for out-of-distribution (OOD) detection. By defining a score based on the distance between a test data point's trajectory and the attractors learned from in-distribution training data, the method effectively distinguishes between in-distribution and OOD samples. This approach outperforms standard baselines, suggesting that the convergence behavior in latent space is highly sensitive to shifts in the data distribution.

Technical Deep Dive

▶ Watch: Data-free weight probing with attractors from noise (8:00)

The theoretical underpinning of this work hinges on formalizing the iterative process within the latent space. Let E denote the encoder and D denote the decoder. The central object of study is the latent map, F, defined as the composition F = E ∘ D. This map takes a point z from the latent space Z and returns another point in Z, i.e., F: Z → Z. When we iterate this map, z_{t+1} = F(z_t), we generate a latent trajectory. This can be viewed as a discrete differential equation describing the evolution of latent representations.

The stability of these trajectories—whether they converge or diverge—is crucial. The authors observe that trajectories consistently converge to fixed points or attractors, regions where z* = F(z*). This stability is not accidental but is a consequence of common inductive biases in neural network training. For a map to be stable and locally contractive, the spectral norm of its Jacobian (the matrix of partial derivatives) must be bounded, typically less than 1, in certain regions. The paper posits that several standard practices inadvertently enforce this:

  • Weight initialization near zero in deep networks often leads to variance shrinking towards zero, creating a globally contractive map.
  • Weight decay regularizes the magnitude of weights, implicitly constraining the Lipschitz constant of the network and thus the norm of the Jacobian.
  • KL divergence in Variational Autoencoders (VAEs) encourages the latent distribution to conform to a prior, which can also regularize the latent map's behavior and promote contractiveness.

A key theoretical contribution is the proof that, under certain assumptions, the latent vector field (F(z) - z) is proportional to the score function (∇ log p(z)) of the latent marginal distribution p(z). The necessary assumptions are that the latent marginal distribution p(z) is smooth, and the latent map F is locally contractive on patches of the latent space. This proportionality implies that attractors correspond to the modes (peaks) of the latent data distribution. In other words, the network's internal dynamics naturally guide latent representations towards the most characteristic or frequently observed patterns in the data.

For analyzing models in higher-dimensional latent spaces, the concept of a vector field is essential. For any point z in the latent space, the vector F(z) - z indicates the direction and magnitude of displacement after one iteration. Plotting these vectors across the latent space reveals the overall flow and identifies regions where the vector field vanishes, indicating the presence of attractors.

The practical implementations leverage these theoretical insights. For data-free weight probing, the method involves sampling Gaussian noise in the latent space to create an initial set of points. Iterating these points through the latent map F reveals the attractors. These attractors are then used as a dictionary or basis to reconstruct arbitrary latent data using techniques like Orthogonal Matching Pursuit (OMP). The effectiveness of this attractor-derived basis in reconstruction provides a quantitative measure of the knowledge encoded within the model's weights.

For distribution shift detection, a score is defined based on the dynamics of test data points. If a test data point's trajectory converges to an attractor associated with in-distribution data, its score will be low. If it converges to a novel attractor or exhibits divergent behavior, its score will be higher, signaling an out-of-distribution sample. This relies on the premise that the attractors reflect the learned distribution of in-distribution data, and any deviation from these established dynamics indicates a departure from the training distribution.

Experimental Setup & Results

▶ Watch: Latent trajectories effectively detect distribution shifts (10:14)

The authors conducted a series of experiments to validate their theoretical claims and demonstrate the practical utility of analyzing latent space dynamics.

1. Toy Example: MNIST Autoencoder with 2D Latent Space

To visually demonstrate the emergent dynamics, an autoencoder was trained on the MNIST dataset with a deliberately designed two-dimensional latent space.

  • Setup: An autoencoder with a 2D latent space was trained on MNIST.
  • Observation: Plotting the latent vector field (F(z) - z) revealed clear patterns of convergence. All trajectories observed moved towards "darker regions" where the vector field vanished, confirming the existence of attractors and the absence of divergent trajectories. This initial experiment provided intuitive visual evidence for stable latent dynamics.

2. Characterizing Memorization vs. Generalization

This experiment explored how attractor properties correlate with a model's ability to generalize.

  • Setup: A set of autoencoders was trained with varying bottleneck sizes (which effectively upper-bounds the rank of the Jacobian of the latent map), leading to different degrees of regularization. Two metrics were measured: generalization error and a "memorization measure" quantifying how closely attractors correspond to training data points.
  • Results:
  • Strongly regularized autoencoders (e.g., with smaller bottlenecks) exhibited attractors that precisely corresponded to individual training data points, indicating a memorization regime.
  • As regularization decreased and models moved towards a generalization regime, the attractors became wider and formed more abstract patterns. These abstract patterns were described as a "basis or dictionary" capable of reconstructing both training and test data more effectively, suggesting they capture broader semantic features rather than specific instances.
  • During training, attractors initially aligned with training points but evolved into more abstract patterns as the model's generalization performance improved. This dynamic shift provides a novel way to track the transition from memorization to generalization.

3. Data-Free Weight Probing on Vision Foundation Models

This experiment aimed to extract learned knowledge from models without requiring any input data.

  • Setup: The autoencoder component of a Stable Diffusion model was used. Two sets of "dictionaries" were compared for reconstructing arbitrary latent data:
  1. An orthogonal basis generated by sampling Gaussian noise in the latent space.
  2. An attractor basis derived by iterating Gaussian noise through the latent map F to compute attractors.
  • Reconstruction Method: Orthogonal Matching Pursuit (OMP) was used to reconstruct arbitrary latent data using components from each dictionary.
  • Results:
  • Quantitative: Attractors consistently yielded a lower reconstruction error compared to the orthogonal basis across multiple datasets, even when using a smaller number of components from the dictionary.
  • Qualitative: Visualizations showed that attractors, even with only 5% of components, started to reveal discernible semantics (e.g., emerging patterns or structures) in the reconstructed images, whereas the orthogonal basis showed little to no meaningful structure.
  • Takeaway: Attractors generated from noise effectively reveal a foundation model's internal dictionary of patterns, enabling the probing of its learned knowledge without any input data.

4. Distribution Shift Detection

This experiment explored the utility of latent trajectories for identifying out-of-distribution (OOD) data.

  • Setup: A Masked Autoencoder (MAE) trained on ImageNet was used. A score was defined for test data based on the distance between its latent trajectory and the attractors learned from in-distribution training data.
  • Hypothesis: This score should be lower for in-distribution data and higher for OOD data.
  • Results:
  • Across various datasets, the attractor-based score demonstrated superior performance in separating in-distribution from out-of-distribution data compared to standard baselines.
  • Histograms of scores for in-distribution versus OOD data showed a clear separation, with OOD data generally having significantly higher scores.
  • Takeaway: Latent trajectories and their convergence behavior provide a powerful and effective mechanism for detecting distribution shifts.

Preliminary Results on LLMs:

The authors also mentioned preliminary results on small auto-regressive models (LLMs). While attractors were not fully characterized, the initial observations confirmed that latent trajectories in these models also exhibit stability, suggesting the broader applicability of this framework beyond autoencoders.

Practical Implications

▶ Watch: Applying dynamics to auto-regressive transformer models (Q&A) (13:20)

The findings presented in "Navigating the Latent Space Dynamics of Neural Models" carry significant practical implications for researchers, machine learning engineers, and anyone involved in building, deploying, and understanding deep learning systems.

Firstly, this work offers a powerful new diagnostic tool for model analysis and interpretability. By examining the structure and properties of attractors in the latent space, practitioners can gain insights into whether their model is primarily memorizing training data or learning generalizable patterns. This can be crucial during model development and debugging, helping to identify overfitting or underfitting issues by observing the evolution of attractors during training. The ability to distinguish between memorization and generalization regimes provides a more nuanced understanding than traditional metrics alone.

Secondly, the concept of data-free weight probing is a groundbreaking development. For large foundation models like Stable Diffusion, understanding what knowledge is encoded within their immense parameter sets is challenging. This method allows researchers to query the model's "internal dictionary" of patterns simply by iterating noise through its latent map, without needing any real input data. This could facilitate faster model auditing, allow for a high-level inspection of learned features, or even help in identifying potential biases or unintended patterns learned by the model, all without the computational overhead or privacy concerns associated with feeding real data.

Thirdly, the demonstrated effectiveness of latent trajectories for out-of-distribution (OOD) detection is highly relevant for robust AI systems. Deploying models in real-world scenarios requires them to not only perform well on known data but also to reliably identify when they encounter data outside their training distribution. The proposed attractor-based scoring mechanism offers a novel and effective approach to OOD detection, potentially improving the safety and reliability of ML applications in critical domains by flagging uncertain inputs. This could be integrated into monitoring systems for deployed models.

Furthermore, this research encourages a paradigm shift in how we conceptualize latent representations. Moving from static points to dynamic flows opens up new avenues for designing and training neural networks. Future model architectures or training objectives could explicitly aim to shape these latent dynamics to achieve desired properties, such as encouraging more generalized attractors or designing latent spaces with inherent OOD detection capabilities. This might involve new regularization terms or architectural constraints that directly influence the Jacobian of the latent map.

However, there are also tradeoffs and limitations to consider. While the theoretical proportionality between the vector field and the score function is compelling, the authors acknowledge that it is an approximation in practice, as the strict conditions (e.g., smoothness, exact contractiveness) may not always hold perfectly in real-world neural networks. The current work primarily focuses on autoencoders, and while preliminary results suggest applicability to LLMs, extending these analyses to a broader range of complex, non-autoencoder architectures (e.g., pure transformers without explicit encoder-decoder structures designed for reconstruction) remains an ongoing challenge. The computational cost of iterating and analyzing latent trajectories, especially in very high-dimensional latent spaces, could also be a consideration for large-scale applications. Nevertheless, the framework provides a valuable conceptual and analytical lens that promises to deepen our understanding of neural network behavior.

Key Takeaways

  • Non-recurrent neural networks, particularly autoencoders, exhibit emergent discrete dynamical systems in their latent spaces, generating stable trajectories that converge to attractors.
  • This stability is largely due to common inductive biases in training, such as weight initialization strategies, weight decay, and KL divergence regularization, which enforce the latent map to be locally contractive.
  • Attractors correspond to the modes (high-density regions) of the latent data distribution and provide a powerful diagnostic for characterizing a model's memorization vs. generalization regime.
  • The framework enables data-free weight probing: attractors generated from noise can reveal a foundation model's learned internal dictionary of patterns, offering insights into its knowledge without requiring input data.
  • Latent trajectories and their convergence patterns can be effectively leveraged for out-of-distribution (OOD) detection, providing a robust mechanism to identify novel or anomalous data.
  • This research advocates for a shift in perspective, encouraging the community to think about learned representations not as static points but as dynamic "flows" in the latent space, opening new avenues for model analysis and design.

About the Speaker(s)

The work was presented by Marco Fumero, who collaborated with Luca Moschella, Emanuele Rodolà, and Francesco Locatello. While specific titles and affiliations were not detailed in the presentation, their collective research focuses on understanding the fundamental properties and internal dynamics of neural networks, particularly in the context of representation learning and generative models. Their contributions aim to provide deeper theoretical and empirical insights into how these complex systems learn and organize information.

Reviews

→ Top-rated talks at International Conference on Learning Representations 2026

All talks from International Conference on Learning Representations 2026