Neural structure learning with stochastic differential equations

Benjie Wang, Joel Jennings, Wenbo Gong

In fields ranging from biology to finance, we are often staring at a series of measurements over time, trying to answer one fundamental question: Who is influencing whom? This is the "structure learning" problem—inferring the underlying graph of dependencies from observational data.

While many tools exist for this, they often stumble when faced with the messiness of the real world: data points aren't always collected at neat, regular intervals, and systems often behave with an inherent randomness that deterministic models can't capture. At ICLR 2024, researchers introduced SCOTCH, a framework that uses Neural Stochastic Differential Equations (SDEs) to bridge this gap.

TL;DR

SCOTCH is a novel framework for learning the causal structure of time-series data by modeling them as continuous-time stochastic processes. By combining Neural SDEs with variational inference, it naturally handles irregularly sampled data and captures intrinsic system randomness, significantly outperforming deterministic and discrete-time baselines.

What Problem Does This Paper Address?

Most existing structure learning methods assume time is discrete (e.g., $t=1, 2, 3$). However, physical and biological processes happen in continuous time. When we force these processes into discrete "buckets," we risk learning the wrong relationships.

Furthermore, two specific hurdles plague current models:

  1. Irregular Sampling: Real-world data (like clinical records or climate sensor logs) often has missing entries or varying time gaps. Discrete models struggle to "fill in" these gaps accurately.
  2. Intrinsic Stochasticity: Many systems aren't just noisy; they are inherently random. A deterministic model (like an Ordinary Differential Equation or ODE) tries to find a single "average" path. If a system is bimodal—meaning it could randomly swing either "up" or "down"—an ODE might just predict a flat line in the middle, failing to capture the true dynamics and the structure driving them.

Methods

The authors propose SCOTCH (Structure learning with COntinuous Time stochastic models).

The core idea is to model the system using a Latent SDE:

  • Drift ($f$): Represents the deterministic "trend" or physics of the system.
  • Diffusion ($g$): Represents the "wobble" or intrinsic randomness.
  • The Graph ($G$): The dependency structure is baked directly into these functions. An edge exists from variable $i$ to $j$ if the evolution of $j$ depends on the current state of $i$.

To train this, they use Variational Inference (VI). Instead of just looking for one "best" graph, they infer a posterior distribution over possible graphs. They maximize an Evidence Lower Bound (ELBO) that balances how well the model fits the data against the complexity (sparsity) of the learned graph. Because it's an SDE, the model can calculate the likelihood of an observation at any time point, making it natively "gap-aware."

Key Insights and Ideas

  • The "Average" Trap: The paper highlights a major failure mode for ODE-based models (like NGM). In a bimodal system, an ODE learns a zero-drift "mean" process, resulting in an empty graph. SCOTCH, by modeling the diffusion, correctly identifies the self-loops and dependencies that drive the branching behavior.
Comparison of Data, NGM, and SCOTCH trajectories on a bimodal system.
  • Signature Graphs: The authors define a "signature graph" based on the partial derivatives of the drift and diffusion functions. This provides a mathematically rigorous way to define what an "edge" means in a continuous-time stochastic system.
  • Theoretical Guarantees: Beyond just "it works," the authors provide proofs for structural identifiability (showing that the true graph can actually be uniquely recovered) and consistency (showing the model converges to the truth as you get more data).

Key Results

The researchers evaluated SCOTCH across a mix of synthetic and real-world benchmarks, including Lorenz-96 (meteorology), Glycolysis (biology), DREAM3 (gene expression), and Netsim (fMRI brain imaging). SCOTCH consistently outperformed baselines like NGM (ODE-based), Rhino (discrete-time), and PCMCI+ across various metrics, particularly the Area Under the ROC curve (AUROC).

Performance comparison (AUROC) on Lorenz-96 and Glycolysis datasets.
  • Handling Irregularity: On the Lorenz-96 task with 60% of data points missing ($p=0.6$), SCOTCH maintained an AUROC of 0.645, while discrete-time methods like Rhino dropped to 0.512 (barely better than a random guess).
  • Biological Accuracy: On the Glycolysis dataset, SCOTCH achieved an AUROC of 0.711, significantly beating the ODE-based NGM (0.595).
  • Scalability: In the 100-dimensional DREAM3 gene network task, SCOTCH achieved a mean AUROC of 0.677, outperforming the next best baseline (Rhino) at 0.636.

Limitations and Future Work

While powerful, SCOTCH has a few areas for growth:

  • Instantaneous Effects: The current SDE formulation assumes influences take some (even if tiny) amount of time to propagate. It doesn't handle "instantaneous" effects—common in some economic models—as well as some discrete-time SEMs.
  • Computational Cost: Solving SDEs is more computationally expensive than discrete steps. The training time scales linearly with the length of the time series.
  • Stationarity: The model assumes the "rules" (drift and diffusion) don't change over time. Future work could incorporate time-varying embeddings to handle non-stationary systems.

By moving structure learning into the continuous-time, stochastic domain, SCOTCH provides a more robust lens for looking at the complex, "jittery" systems that define our world.

Summary updated

BibTeX
@inproceedings{wang2024neural,
  author = {Benjie Wang and Joel Jennings and Wenbo Gong},
  title = {{Neural structure learning with stochastic differential equations}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=V1GM9xDvIY},
}
Figure