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

Quantitative Algebraic Reasoning

Radu Mardare, Prakash Panangaden, Gordon D. PlotkinLICS 2016

Introduction

In classical logic and computer science, equality is a rigid, binary concept: two terms are either identical or they are not. While this suffices for discrete systems, it fails to capture the nuances of modern computing paradigms such as probabilistic computation, machine learning, and randomized algorithms. In these domains, we are rarely concerned with absolute identity; instead, we care about closeness. If two probability distributions or program outputs are nearly identical, we want a formal way to treat them as "equal enough."

Presented at LICS 2016, "Quantitative Algebraic Reasoning" introduces a formal framework that bridges the gap between abstract algebra and metric spaces. By replacing the standard equality symbol ($=$) with an indexed version ($=_{\epsilon}$), the authors provide a logical foundation for reasoning about "approximate equality," where $\epsilon$ represents an upper bound on the distance between two elements.

The Framework: Quantitative Equational Theories

The core innovation of this work is the development of Quantitative Equational Theories. In this system, an equation is not merely a statement of fact but a quantitative measure of similarity. The expression $a =_{\epsilon} b$ asserts that the terms $a$ and $b$ are within a distance $\epsilon$ of each other.

To make this logic robust, the authors adapted standard equational rules to account for the error term:

  • Reflexivity: For any term $t$, $t =_0 t$.
  • Symmetry: If $t =_{\epsilon} u$, then $u =_{\epsilon} t$.
  • Triangle Inequality: If $t =_{\epsilon} u$ and $u =_{\epsilon'} v$, then $t =_{\epsilon + \epsilon'} v$.
  • The Archimedean Rule: This infinitary rule handles limits, stating that if $t =_{\epsilon'} u$ for all $\epsilon' > \epsilon$, then $t =_{\epsilon} u$.

Furthermore, the theory requires that all algebraic operations (such as addition or scalar multiplication) be non-expansive. This ensures that applying a function to two inputs cannot increase the distance between them, maintaining the integrity of the underlying metric geometry.

Semantic Completeness

A pivotal technical contribution of the paper is the proof of strong completeness. In logic, completeness ensures that the proof system is powerful enough to derive all true statements within its domain. The authors demonstrated that their deducibility relation ($\vdash$) perfectly matches the semantic entailment ($\models$) in "Quantitative Algebras." If a quantitative equation holds in every possible metric model of a theory, there is a guaranteed way to prove it using the provided axioms. This result establishes the logic as a reliable tool for formal verification in metric-sensitive contexts.

From Axioms to Metrics

One of the most striking insights of the paper is that well-known mathematical distances emerge naturally from simple algebraic axioms. Rather than manually "plugging in" a metric, one can define the algebraic properties of a system, and the metric is forced to emerge as the unique way to satisfy those properties quantitatively.

  • Hausdorff Metric: By applying quantitative axioms to the theory of semilattices, the authors derived the Hausdorff metric, which is essential for reasoning about nondeterministic systems.
  • Wasserstein and Kantorovich Metrics: By focusing on Barycentric Algebras—structures that model convex combinations like $0.3x + 0.7y$—the authors captured the geometry of probability distributions. Specific axioms, such as "interpolation," lead directly to the $p$-Wasserstein metrics.
  • Total Variation Distance: This metric was shown to emerge from "left-invariant" barycentric algebras.

This unification suggests a deep underlying unity between nondeterminism and probability, viewed through the lens of different quantitative algebraic theories.

Conclusion and Future Directions

Quantitative Algebraic Reasoning provides a much-needed language for the "approximate" side of computer science. By integrating metric spaces into equational logic, it allows for rigorous reasoning about the stability and convergence of algorithms without requiring heavy-duty measure theory.

While the current framework is robust for operations with a finite number of arguments, several avenues for future work remain. These include extending the logic to handle infinite operations (such as infinite sums or integrals), combining different computational effects (e.g., probability mixed with state), and applying the theory to Markov processes. As AI and probabilistic systems continue to grow in importance, this logical foundation will be vital for ensuring their correctness and reliability.

Summary updated

BibTeX
@inproceedings{mardare2016quantitative,
  author = {Radu Mardare and Prakash Panangaden and Gordon D. Plotkin},
  title = {{Quantitative Algebraic Reasoning}},
  booktitle = {LICS},
  year = {2016},
  doi = {10.1145/2933575.2934518},
}
Figure