Reference. Adequate Losses via Quantitative Linear Logic
As neural components are increasingly embedded in existing symbolic software – including safety-critical systems – the question arises of how to specify and enforce the safety of the newly introduced neural parts. Unlike traditional logical specifications, these must be amenable not only to the standard Boolean interpretation, but also to training and optimisation. The latter calls for a quantitative interpretation of the logical syntax, subject to further requirements such as smoothness and differentiability. Moreover, the qualitative and quantitative sides of the logic must share a unifying proof-theoretic and categorical semantics. Finally, the new logic should link cleanly to the substructural and program logics that underpin the verification of existing symbolic programs. In this paper, we present a logic that ticks all of these boxes. We introduce a family of calculi, pQLL, indexed by a hardness degree , prove a cut-elimination theorem for them, and establish completeness with respect to enriched residuated ‘soft’ lattices. At , pQLL reduces to multiplicative additive linear logic (MALL), and provability in pQLL converges to provability in MALL as . We express optimisation objectives in the syntax of this logic and prove the quantitative adequacy of neuro-symbolic loss functions – a result that has eluded the neuro-symbolic machine learning community for nearly a decade.
Cite
Cited by (1)
Quantitative Linear Logic for Neuro-Symbolic Learning and Verification flinkow-2026-quantitative
Differentiable Logics are deployed in neuro-symbolic learning tasks as a way of embedding logical constraints in the training objective of neural networks. A differentiable logic consists of a syntax to write logical properties and a semantics to interpret them as real-valued functions to be folded in the loss function. A defining trade-off of the field is that between logical properties of the connectives, and analytic concerns for the semantics, with both aspects being relevant in applications. At one extreme we find fuzzy logics, that have well-established algebraic and proof-theoretic foundations, and at the other ad-hoc differentiable logics like Fischer’s DL2, conceived for deep learning applications. However, no satisfactory foundation has emerged yet. We propose a resolution to this long-standing tension via a novel logic, Quantitative Linear Logic (QLL), with foundational ambitions. Our design is driven by naturality – the idea that, since logical constraints are translated to losses, the semantics of the connectives should be pertinent operations used in ML practice (that is, sum and log-sum-exp) on additive quantities (like logits). We then judge the result on two aspects: logical adequacy – that they satisfy most of the standard logical laws of Linear Logic; and empirical effectiveness – test-time performance (as measured by adversarial attacks) is well-correlated to the actual verification of the logical constraints (as measured by off-the-shelf neural network verifiers), which makes QLL stand out among SoTA techniques.
Cites 58 works (2 here)
With notes (2)
Quantitative Linear Logic for Neuro-Symbolic Learning and Verification flinkow-2026-quantitative
Differentiable Logics are deployed in neuro-symbolic learning tasks as a way of embedding logical constraints in the training objective of neural networks. A differentiable logic consists of a syntax to write logical properties and a semantics to interpret them as real-valued functions to be folded in the loss function. A defining trade-off of the field is that between logical properties of the connectives, and analytic concerns for the semantics, with both aspects being relevant in applications. At one extreme we find fuzzy logics, that have well-established algebraic and proof-theoretic foundations, and at the other ad-hoc differentiable logics like Fischer’s DL2, conceived for deep learning applications. However, no satisfactory foundation has emerged yet. We propose a resolution to this long-standing tension via a novel logic, Quantitative Linear Logic (QLL), with foundational ambitions. Our design is driven by naturality – the idea that, since logical constraints are translated to losses, the semantics of the connectives should be pertinent operations used in ML practice (that is, sum and log-sum-exp) on additive quantities (like logits). We then judge the result on two aspects: logical adequacy – that they satisfy most of the standard logical laws of Linear Logic; and empirical effectiveness – test-time performance (as measured by adversarial attacks) is well-correlated to the actual verification of the logical constraints (as measured by off-the-shelf neural network verifiers), which makes QLL stand out among SoTA techniques.
On Quantifiers for Quantitative Reasoning capucci-2024-on
We explore a kind of first-order predicate logic with intended semantics in the reals. Compared to other approaches in the literature, we work predominantly in the multiplicative reals , showing they support three generations of connectives, that we call non-linear, linear additive, and linear multiplicative. Means and harmonic means emerge as natural candidates for bounded existential and universal quantifiers, and in fact we see they behave as expected in relation to the other logical connectives. We explain this fact through the well-known fact that min/max and arithmetic mean/harmonic mean sit at opposite ends of a spectrum, that of p-means. We give syntax and semantics for this quantitative predicate logic, and as example applications, we show how softmax is the quantitative semantics of argmax, and Rényi entropy/Hill numbers are additive/multiplicative semantics of the same formula. Indeed, the additive reals also fit into the story by exploiting the Napierian duality , which highlights a formal distinction between ‘additive’ and ‘multiplicative’ quantities. Finally, we describe two attempts at a categorical semantics via enriched hyperdoctrines. We discuss why hyperdoctrines are in fact probably inadequate for this kind of logic.
External (56)
- A Foundation for Differentiable Logics using Dependent Type Theory (2026)
- Induction and Recursion Principles in a Higher-Order Quantitative Logic for Probability (2026)
- Towards Quantitative Logics in Rocq (2026)
- Compositional Neural-Cyber-Physical System Verification in the Interactive Theorem Prover of Your Choice (2026)
- YALLA: Yet Another Deep Embedding of Linear Logic in Rocq (2026)
- Neural Network Verification is a Programming Language Challenge (2025)
- Vehicle: Bridging the Embedding Gap in the Verification of Neuro-Symbolic Programs (2025)
- Comparing differentiable logics for learning with logical constraints (2025)
- Enhancing Neural Network Robustness via Synthesis of Repair Programs (2025)
- Taming Differentiable Logics with Coq Formalisation (2024)
- Polynomial Lawvere Logic (2024)
- What Is Entropy? (2024)
- Marabou 2.0: A Versatile Formal Analyzer of Neural Networks (2024)
- Propositional Logics for the Lawvere Quantale (2023)
- logLTN: Differentiable Fuzzy Logic in the Logarithm Space (2023)
- Scallop: A Language for Neurosymbolic Programming (2023)
- Handbook of Linear Logic (2023)
- Logic Tensor Networks (2022)
- Neural Network Robustness as a Verification Property: A Principled Case Study (2022)
- Deep Learning with Logical Constraints (2022)
- Analyzing Differentiable Fuzzy Logic Operators (2022)
- Bounded-analytic Sequent Calculi and Embeddings for Hypersequent Logics (2021)
- Scaling up the Randomized Gradient-Free Adversarial Attack Reveals Overestimation of Robustness Using Established Attacks (2020)
- On Robustness Metrics for Learning STL Tasks (2020)
- DL2: Training and Querying Neural Networks with Logic (2019)
- The marabou framework for verification and analysis of deep neural networks (2019)
- The Marabou Framework for Verification and Analysis of Deep Neural Networks (2019)
- Logit Pairing Methods Can Fool Gradient-Based Attacks (2019)
- Hypersequents and Systems of Rules: Embeddings and Applications (2018)
- An Introduction to Differential Linear Logic: Proof-Nets, Models and Antiderivatives (2018)
- DeepProbLog: Neural Probabilistic Logic Programming (2018)
- Theory of Probability: A Critical Introductory Treatment (2017)
- Quantitative Algebraic Reasoning (2016)
- A Multiplicative Characterization of the Power Means (2012)
- The Multiplicative Property Characterizes ℓp and Lp Norms (2011)
- Handbook of Mathematical Fuzzy Logic (2011)
- Handbook of Mathematical Fuzzy Logic (2011)
- Categorical semantics of linear logic (2009)
- Proof Theory for Fuzzy Logics (2009)
- Model Theory for Metric Structures (2008)
- Residuated Lattices: An Algebraic Glimpse at Substructural Logics (2007)
- Categories, Norms and Weights (2007)
- Hypersequent Calculi for Gödel Logics - a Survey (2003)
- Linearly Distributive Functors (1999)
- An Introduction to Proof Theory (1998)
- Proof Theory for Full Intuitionistic Linear Logic, Bilinear Logic, and MIX Categories (1997)
- On the Meanings of the Logical Constants and the Justifications of the Logical Laws (1996)
- Linear logic: its syntax and semantics (1995)
- A Constructive Analysis of RM (1987)
- Uniform, cut-free formulations of T, S4 and S5 (1983)
- Basic Concepts of Enriched Category Theory (1982)
- On a General Class of Fuzzy Connectives (1980)
- ∗-Autonomous Categories (1979)
- Metric Spaces, Generalized Logic, and Closed Categories (1973)
- On Closed Categories of Functors (1970)
- O logice trójwartościowej (1920)