Neural Statistical Functions

Daniel Xu, Yuxin Xie, Minghao Guo, Haixu Wu, Wojciech Matusik

TL;DR

Neural Statistical Functions (NSFs) bypass expensive Monte Carlo sampling by directly predicting statistical properties—such as means, quantiles, and maxima—over continuous intervals of operating conditions. By framing statistics through a novel "prefix view," NSFs achieve up to a 100$\times$ reduction in model evaluations for complex physical simulations while maintaining or improving accuracy.

What Problem Does This Paper Address?

Deep learning surrogates have revolutionized engineering by replacing slow, expensive physics simulators with fast neural networks. However, standard surrogates are limited by a "single-condition" interface: you query the model at one specific condition (e.g., a 45-degree crash angle), and it returns one specific response.

In the real world, engineers rarely care about just one isolated condition. For design, planning, and safety analysis, they need interval statistics—such as the accumulated energy over a time window, the failure probability under uncertain aerodynamic loads, or the maximum stress across a range of potential impact angles. To compute these today, practitioners must use dense sweeping or Monte Carlo sampling, querying the surrogate model dozens or hundreds of times. For large-scale spatial fields, this repeated inference creates a massive computational bottleneck.

Methods

The authors introduce Neural Statistical Functions (NSFs), shifting the paradigm from a single-condition view to a prefix view.

Figure 1: This paper adopts a new prefix view for statistics.

Instead of predicting a response at a single point, the network learns to approximate "prefix statistics"—the accumulated statistical quantity from a baseline condition ($c_{min}$) up to a target condition ($c$). For an integral or mean, the statistic over any arbitrary interval $[c_0, c_1]$ can then be recovered instantly via simple subtraction.

To unify diverse, non-additive statistics like maxima and quantiles into this framework, the authors map conditions into a normalized quantile space ($s \in [0,1]$) and define task-specific transformed local signals ($\psi$):

  • Mean: Uses the standard response function.
  • Maxima: Approximated using a smooth log-sum-exp surrogate.
  • Quantile: Uses a smoothed indicator function to learn the interval-conditioned cumulative distribution function (CDF), which is later inverted via a fast binary search.

Training via a Differential Identity

Computing ground-truth interval statistics for training data would be prohibitively expensive. To avoid this, the authors derive a fundamental first-order differential identity that links the global prefix statistic directly to the local, instantaneous response: $$s \partial_s \tilde{h}(x,s) + \tilde{h}(x,s) = \psi(x,s)$$

This mathematical breakthrough allows the model to be trained using a local gradient-matching loss. The training pipeline uses hybrid supervision, combining a pre-trained single-condition predictor (for dense, continuous coverage) with sparse ground-truth simulation data (to anchor the model and eliminate predictor bias).

Datasets

The authors evaluate NSFs on three distinct physical simulation benchmarks:

  1. 2D Dynamics: A synthetic dataset of 2,500 trajectories describing planar curves, used to evaluate interval-conditioned mean kinetic energy.
  2. Aerodynamic Systems (NASA-CRM): A benchmark containing 149 airplane geometry simulations under varying angles of attack (AoA), evaluating point-wise surface pressure quantiles.
  3. Crash Processes (Car-Crash): A dataset of 280 industrial-standard simulations (using the OpenRadioss solver) of a car model impacting a wall at different angles, evaluating element-wise maximum von Mises stress.

Key Insights and Ideas

  • The Prefix Trick for Non-Additive Stats: While prefix tracking is intuitive for averages, reframing non-additive properties like quantiles and maxima as prefix integrals of transformed signals is a major "aha" moment. For instance, tracking the prefix integral of an indicator function yields a reusable distributional representation (the CDF) from which multiple downstream risk-aware statistics can be extracted.
  • Local Constraints for Global Properties: By differentiating the prefix definition, the authors turn a global interval aggregation problem into a local differential constraint. This means the model can learn global interval properties using only single-point evaluations during training, drastically lowering training data requirements.

Key Results

NSFs consistently outperform standard single-condition models paired with Monte Carlo (MC) sampling, slashing the number of model inferences required at deployment time.

Figure 2: Number of model inferences to achieve comparable accuracy under three experimental scenarios. Compared to the single-condition inference model, neural statistical functions do not rely on unwieldy sampling operations, thereby significantly reducing the number of model inferences.
  • 2D Dynamics: NSFs achieve a 200$\times$ reduction in model evaluations for mean estimation compared to dense MC sampling, while delivering lower relative $\ell_2$ error across all interval widths.
  • Aerodynamics: For quantile prediction, NSFs capture structured spatial variations across complex airplane wing regions more reliably than sparse MC sampling, achieving superior accuracy with a fraction of the evaluation cost.
  • Car-Crash Analysis: NSFs successfully predict the maximum stress envelope across wide impact-angle intervals, proving highly competitive with a 10-sample MC baseline while requiring only endpoint evaluations.

Limitations and Future Work

The primary limitation of the current framework is its restriction to a one-dimensional condition variable (e.g., a single angle or timestamp). While the prefix statistics framework can theoretically scale to multi-dimensional conditions using the inclusion–exclusion principle, the inference cost scales exponentially ($2^{d_{cond}}$ evaluations). The authors note that while this remains acceptable for low dimensions ($d_{cond} \le 4$), designing sampling-free, low-latency neural statistical functions for high-dimensional condition spaces remains an open and vital challenge.

Summary updated

BibTeX
@inproceedings{xu2026neural,
  author = {Daniel Xu and Yuxin Xie and Minghao Guo and Haixu Wu and Wojciech Matusik},
  title = {{Neural Statistical Functions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=DHWVdjJrLt},
}

Loading related content...

Figure