NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Better Models and Algorithms for Learning Ising Models from Dynamics

Jason Gaitonde, Ankur Moitra, Elchanan MosselarXiv 2025 · DOI

Abstract

Learning the structure and parameters of Ising models is a fundamental task in statistical physics and machine learning. While traditional methods rely on independent and identically distributed (i.i.d.) samples from equilibrium, real-world data often arrives as a sequence of state changes over time. Previous approaches to learning from these dynamics required "strong observability"—the ability to record every attempted state transition, even those that failed. This paper introduces the first efficient algorithms capable of reconstructing Ising models under a "weak" observation model, where only successful state flips are recorded. By utilizing a novel localized flip cycle statistic, the proposed method achieves efficiency comparable to state-of-the-art i.i.d. learning techniques.

Introduction

The Ising model provides a mathematical framework for understanding how individual components in a system—such as spins in a magnetic lattice or individuals in a social network—influence one another. Historically, the problem of "structure learning" (identifying which variables interact) and "parameter estimation" (quantifying those interactions) has been solved using static snapshots of the system at equilibrium.

However, in many practical scenarios, we do not have access to equilibrium snapshots. Instead, we observe the system's stochastic evolution. A significant bottleneck in learning from such dynamics has been the requirement for high-fidelity data. Most existing algorithms assume the observer knows whenever a variable considers changing state, regardless of whether a change actually occurs. In physical or social systems, this is often impossible; we typically only observe the events that happen, not the ones that were contemplated and rejected. This paper addresses this gap, providing a robust framework for learning from sequences of actual state transitions.

The Challenge of Weak Observability

In a standard Markov chain representing Ising dynamics (such as Glauber or Metropolis-Hastings dynamics), a site is chosen at random and a transition is proposed. The transition is accepted or rejected based on the energy state of the system. Under "strong observability," the learner knows every time a site is chosen. Under "weak observability," the learner only sees the "flips."

Missing the "non-transitions" introduces significant statistical bias. Without knowing how many times a site failed to flip, standard estimators cannot accurately gauge the underlying influence of neighboring sites. This paper overcomes this by focusing on the relative frequencies of specific sequences of flips within very short time intervals.

Methodology

1. Structure Learning via Localized Flip Cycles

The authors introduce a "localized flip cycle" statistic to identify the graph structure. The algorithm monitors the system for specific patterns of activity within a small time window $\epsilon$. For example, it looks for sequences where site $i$ flips, then site $j$ flips, then $i$ flips back, and finally $j$ flips back.

By comparing the frequencies of different permutations of these flips (e.g., the sequence $iijj$ versus $jiij$), the authors derive a degree-8 cycle statistic. They mathematically demonstrate that if $i$ and $j$ are connected in the underlying graph, this statistic will be significantly higher than if they are not. This allows the algorithm to distinguish between true neighbors and nodes that only appear correlated due to indirect influences.

2. The "Squaring" Trick and Reversibility

A primary difficulty in analyzing these dynamics is that the bias of a site can be positive or negative, potentially averaging to zero over time. To solve this, the authors employ a "squaring" technique, ensuring the signal remains positive and can be aggregated across the trajectory.

Once the dense parts of the graph are identified, any remaining edges (forming simple matchings) are recovered using short-term spin-spin correlations. Finally, the exact interaction strengths ($A_{ij}$) and external fields ($h_i$) are calculated using the principle of reversibility (detailed balance) and Freedman’s inequality for pathwise concentration.

Key Results and Efficiency

The proposed algorithm demonstrates that learning from dynamics is not inherently more difficult than learning from static samples, even with restricted observations.

  • Computational Complexity: For an Ising model with $n$ variables and a maximum degree $d$, the structure is recovered in $poly(d) \cdot n^2 \log n$ time.
  • Sample Complexity: The algorithm succeeds with high probability given a trajectory length of $T = O(poly(d) \log n)$.
  • Generality: The approach is not limited to a single type of dynamics; it is proven to work for a broad class of "site-consistent" and "stable" reversible Markov chains, including the widely used Metropolis-Hastings algorithm.

Discussion and Future Work

While this work represents a major step forward, it highlights several areas for further research. Currently, the runtime for parameter learning depends exponentially on the maximum degree $d$. While this is a common trait in Ising model literature, some i.i.d. algorithms have managed to circumvent this for structure learning; whether a similar feat is possible for dynamics remains an open question.

Additionally, the current framework relies on the system being reversible. Extending these localized statistics to non-reversible chains—which are frequently used to model biological and non-equilibrium systems—would significantly expand the applicability of these findings. Despite these limitations, the paper provides a rigorous mathematical foundation for extracting deep structural insights from the mere observation of change.

Summary updated

BibTeX
@misc{gaitonde2025better,
  author = {Jason Gaitonde and Ankur Moitra and Elchanan Mossel},
  title = {{Better Models and Algorithms for Learning Ising Models from Dynamics}},
  year = {2025},
  eprint = {2507.15173},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.15173},
}
Figure