TL;DR
Deflex is a novel AI framework that automatically discovers mathematical laws across different scales in complex systems by combining deep energy-based models with lambda-calculus symbolic regression. By unifying deterministic invariants and stochastic distributions under a single probabilistic framework, it bridges the "scale gap" in physics and achieves up to a 7-fold efficiency boost over state-of-the-art methods.
What Problem Does This Paper Address?
From fluid dynamics to crowd behavior, complex systems are notoriously hard to model because their governing rules change depending on the scale of observation. At a microscopic scale, you might see deterministic equations (like particle collisions); at a macroscopic scale, these blur into stochastic probability distributions (like diffusion).
Traditional AI methods for formula discovery—specifically Symbolic Regression (SR)—face three massive hurdles here:
- The Volume Challenge: Complex systems involve massive numbers of interacting elements, making computation prohibitively expensive.
- Search-Space Explosion: The number of possible mathematical formulas grows exponentially with expression depth and variable count.
- The Scale Gap: Existing SR tools treat equations and probability distributions as entirely different mathematical beasts, failing to capture how patterns transition across scales. Furthermore, standard tree-based SR lacks native support for variable bindings or higher-order operations (like mapping or summing over an arbitrary number of interacting neighbors) without relying on rigid, pre-defined templates.
Methods
The authors introduce Deflex, an end-to-end framework consisting of two main subsystems:
- Deflexformer (The Neural Guide): A deep Energy-Based Model (EBM) designed using self-attention mechanisms. It processes data by separating spatial mixing (inter-element interactions) and temporal mixing (time dependencies). Crucially, it is built from multiple decomposable, Transformer-like blocks. Instead of learning a massive, complex formula all at once, Deflexformer breaks the system's energy function down into elementary mathematical transformations.
- Deflexpressor (The Symbolic Engine): A symbolic regression subsystem based on an extended lambda calculus (augmented with types and arrays). Lambda calculus natively supports function abstraction, variable binding, and recursion (using a
Fixoperator). This allows Deflexpressor to naturally express complex, higher-order relationships—like aggregating variable-length lists of particle interactions—from scratch.
The Workflow: 1. Deflexpressor generates a pool of random formulas to create a synthetic dataset. 2. This synthetic data pre-trains a Deflexformer block, embedding mathematical priors into the network. 3. Multiple copies of this pre-trained block are cascaded to form the full Deflexformer, which trains on real-world observational data to learn the system's underlying energy landscape. 4. Finally, Deflexpressor uses a hybrid generation strategy (combining a rule-based genetic algorithm with an autoregressive neural network) to perform Hierarchical SR, fitting compact lambda expressions to the intermediate representations output by each neural block.
[Deflexpressor (Synthetic Formulas)] ➔ [Pre-train Deflexformer Block]
↓
[Real Observation Data] ➔ [Cascaded Deflexformer Blocks (Learn & Decompose Energy)]
↓
[Intermediate Representations] ➔ [Hierarchical SR via Lambda Calculus] ➔ [Final Multiscale Formulas]
Datasets
The framework was validated across six diverse, multiscale complex systems:
- Particle Motion: Simulated systems of rare gases (Argon) and pollen in water to capture energy conservation, Boltzmann distributions, and Langevin dynamics.
- Human Mobility: Real-world trajectory data from the Zurich Carnival dataset (24M locations, 29,000 visitors).
- Bird Migration: Real-world bird movement data from the eBird dataset (176M data points across 7 species).
- Water Particles: Cross-scale simulations tracking the transition of water molecules into ice crystal lattices.
- Fluid Dynamics: A 2D simulated cylinder wake flow and a highly complex 3D forced isotropic turbulence dataset from the Johns Hopkins Turbulence Database (JHTDB).
- Benchmark Evaluation: The standard Feynman Symbolic Regression Database (120 classical physics formulas with added noise).
Key Insights and Ideas
- Formulas as Distributions: The core conceptual breakthrough is treating all mathematical formulas as probability distributions. A strict physical law (like conservation of momentum) is simply a distribution with an infinitely narrow peak (zero uncertainty), while a statistical pattern has a wider peak. This allows EBMs to model both seamlessly.
- Lambda Calculus Over Expression Trees: Moving away from traditional expression trees to lambda calculus solves the combinatorial explosion of variable arguments. It allows the system to learn how to aggregate data recursively rather than searching through an unrolled chain of pairwise additions.
- Divide and Conquer via Neural Decomposition: By forcing the neural network to be decomposable, the authors turned an intractable global symbolic search into a series of simpler, localized optimization problems.
Key Results
- Unmatched Discovery Capability: Deflex successfully recovered highly complex, higher-order equations that completely broke competing methods (such as PySR, AI Feynman, and SINDy). These included the 3D Navier-Stokes equation from turbulent data, the Langevin equation, and the Maxwell-Boltzmann distribution with a Lennard-Jones potential (a non-linear equation spanning 23 nodes).
- High Efficiency: Deflex demonstrated up to a 7-fold higher efficiency (speedup in runtime) compared to state-of-the-art methods when discovering complex formulas.
- Cross-Scale Consistency: In water-to-ice and fluid dynamics experiments, Deflex maintained the lowest Earth Mover’s Distance (EMD) across multiple coarse-graining scales, proving it can successfully bridge the scale gap without needing manual renormalization.
Limitations and Future Work
Despite its success, the authors note a few limitations:
- Invalid Candidates: The symbolic synthesis phase still wastes time generating syntactically invalid or meaningless lambda expressions. Future iterations could benefit from tighter type-theoretic constraints during the search.
- Scale Interference: When a system contains competing patterns of vastly different magnitudes, the low-frequency approximations can sometimes overwhelm and suppress high-frequency, complex structures.
- Data Dependencies: The current framework assumes clean, pre-processed observational data. Real-world applications will require better robustness against noisy or incomplete datasets, as well as explicit, rather than implicit, scale separation techniques.
Summary updated