Abstract
Probabilistic numerical methods (PNMs) solve numerical problems via probabilistic inference. They have been developed for linear algebra, optimization, integration and differential equation simulation. PNMs naturally incorporate prior information about a problem and quantify uncertainty due to finite computational resources as well as stochastic input. In this paper, we present ProbNum: a Python library providing state-of-the-art probabilistic numerical solvers. ProbNum enables custom composition of PNMs for specific problem classes via a modular design as well as wrappers for off-the-shelf use. Tutorials, documentation, developer guides and benchmarks are available online at www.probnum.org.
Introduction
In traditional scientific computing, numerical solvers are often treated as "black boxes" that return a single, precise answer. However, every numerical calculation—whether it involves a finite number of iterations in a linear solver or discrete steps in an ODE solver—is an approximation that introduces error. In high-stakes scenarios, such as tsunami prediction, researchers often face a trade-off between accuracy and speed. Traditional methods fail to quantify the trust one should place in these "fast" approximations.
The field of Probabilistic Numerics (PN) addresses this by casting numerical tasks as statistical inference problems. ProbNum is an open-source Python library designed to bridge the gap between PN theory and practice, providing a unified framework for researchers to apply these methods to their own problems.
The ProbNum Framework
ProbNum is designed to be the "SciPy of Probabilistic Numerics," offering a unified interface for three core areas: Linear Algebra, Differential Equations (ODEs), and Numerical Integration.
A key innovation of the library is its modular design. Rather than providing monolithic solvers, ProbNum decomposes numerical algorithms into reusable components:
- Policies: Strategies for choosing the next computational action (e.g., which direction to search in a linear solver).
- Information Operators: Mechanisms for observing the system (e.g., computing a residual).
- Belief Updates: Rules for incorporating new data into the current estimate using Bayesian inference.
This "plug-and-play" architecture allows users to either use solvers out-of-the-box or build custom ones by swapping components, facilitating the development of new PN algorithms.
Computation as Inference
The core philosophy of ProbNum is that every numerical operation provides "information" about a mathematical truth. Instead of returning a point estimate, ProbNum solvers return a belief—a probability distribution or stochastic process.
To encourage adoption, ProbNum’s API is designed to be compatible with the standard Python scientific stack. Many methods "shadow" the function signatures of NumPy and SciPy, making it a near drop-in replacement for existing workflows.
By returning distributions, ProbNum enables uncertainty propagation. The uncertainty from a linear solver can be passed directly into an ODE solver, allowing for a holistic assessment of error across complex simulation pipelines.
Results and Benchmarking
ProbNum has been evaluated against standard numerical benchmarks in linear algebra, ODE simulation, and integration. The library successfully demonstrates that specialized solvers, such as BayesCG, can be instantiated from modular components. While probabilistic methods involve additional bookkeeping, many PNMs can recover classical solutions exactly while providing uncertainty estimates with minimal computational overhead.
Conclusion and Future Work
ProbNum represents a significant step toward fully propagating uncertainty through computational chains. While current challenges include the trade-off between probabilistic overhead and the raw speed of optimized C++ libraries, future work will focus on expanding the library of available methods and fostering a community-driven ecosystem for algorithmic research in probabilistic numerics.
Summary updated