arXiv:2610.37006cs.PLOct 2026

Manuscript Offprint

arXiv:2610.37006

Abstract Lipschitz Continuity

Marco Campion, Isabella Mastroeni, Michele Pasqua, Caterina Urban

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

MARCO CAMPION a^{a}, ISABELLA MASTROENI b^{b}, MICHELE PASQUA b^{b}, AND CATERINA URBAN c^{c}

a^{a} Sorbonne Université, LIP6, Paris, France

e-mail address: marco.campion@lip6.fr

b^{b} University of Verona, Department of Computer Science, Italy

e-mail address: {isabella.mastroeni, michele.pasqua}@univr.it

c^{c}Inria & ENS — PSL, Paris, France

e-mail address: caterina.urban@inria.fr

ABSTRACT. We introduce Abstract Lipschitz Continuity (ALC), an extensional property of functions, in particular of program semantics, requiring that bounded differences between properties of two inputs yield proportionally bounded differences between properties of the corresponding outputs. ALC explicitly discerns between two complementary forms of approximation: property-based (or qualitative) approximations, which retain a property of the data and are formalized by upper closure operators as in abstract interpretation, and quantitative approximations, which measure the closeness of data and are formalized by pre-metrics, a weakening of metrics that covers the distances arising in program analysis. Keeping the two forms of approximation explicit has two main benefits. First, it allows us to precisely relate ALC to established extensional properties: ALC is a sufficient condition for partial completeness in abstract interpretation, for partial abstract non-interference in language-based security and, with a null Lipschitz constant, for abstract robustness in machine learning. Second, it supports reasoning about ALC of program semantics by induction on the syntax of programs: we present a sound deductive system, parametric in the property-based approximations and in the pre-metric of interest, that reduces a proof of ALC for a program to proofs for its basic commands and to some explicit side conditions, which isolate what makes ALC compositional across sequential composition, non-deterministic choice and iteration.

INTRODUCTION

Lipschitz continuity (LC) is a fundamental property in mathematical analysis, which provides a strong quantitative guarantee: the output of a Lipschitz continuous function changes at most linearly with respect to changes in its input, the slope being the Lipschitz constant. Its utility is wide-ranging: it is a cornerstone of convergence guarantees in optimization [Nes18, JT20] and a key tool for certifying the robustness of machine learning models, particularly in adversarial settings [FRH +^{+}19, HZS +^{+}21, ZJHW22a]. In program analysis, LC provides a measure of program robustness for code operating on uncertain inputs [CGL10, CGL12, CGLN11], and Lipschitz-style or continuity-based notions of robustness have been studied,

Key words and phrases: Abstract Lipschitz Continuity, Abstract Interpretation, Partial Abstract Non-Interference, Partial Completeness, Abstract Robustness.

Preprint submitted to Logical Methods in Computer Science

© M. Campion, I. Mastroeni, M. Pasqua, and C. Urban Creative Commons

M. CAMPION, I. MASTROENI, M. PASQUA, AND C. URBAN

<?php int count-a(FILE *F) { int c, nc = 0; while ((c = fgetc(F)) != EOF) { if (c == 'a') nc++; } return nc; } ?>

FIGURE 1. SQL injection (left) and counting pattern program (right).

e.g., for string transducers [SDC13, HOS14], for numerical programs [GP13], and, as function sensitivity, in type systems [RP10]. In all these settings, however, perturbations are measured on concrete data, through a distance between the values themselves.

In this work, we argue that making the properties of data explicit provides a natural and complementary perspective. Indeed, in complex systems such as machine learning models or programs, small changes in the raw representation of data may correspond to negligible or irrelevant changes in the properties of interest, and, conversely, small changes in the raw data may cause relevant changes in their properties. Moreover, properties, rather than values, are what several established notions are about: static analyses compute properties of program states in an abstract domain, whose imprecision has been measured through distances [CDG22, CUDPG23, Log09, PW00]; information-flow policies specify which properties of the inputs may flow to an observer of properties of the outputs [GM18]; and robustness requirements for classifiers may tolerate changes of the output class within a given property [GMP24]. These notions, however, are either qualitative, as they require properties to be preserved exactly, or, in their partial variants, they only bound the effect of indistinguishable inputs. By reasoning quantitatively on how differences between properties of inputs propagate to differences between properties of outputs, we can capture robustness and stability in a way that more closely aligns with the intended behavior of such systems, with applications in areas ranging from program verification [CC04, GM18, RY20, SS15] to machine learning robustness [AHAG23, GMP24, LWSS24].

For instance, in the context of security, applications such as code injection and file integrity call for an explicit distinction between the closeness of data and their properties. SQL injection vulnerabilities arise from an unchecked interaction between untrusted input and the execution of a SQL query, which allows an attacker to execute arbitrary queries on the database. A trivial example is given on the left of Figure 1: an attacker can dump the whole users table by injecting the value "3 OR 1 = 1" in the unsanitized input argv[0], which turns the condition of the query q into a tautology. In this scenario, we could require that inputs with a similar number of Boolean operators select a similar number of tuples: a legitimate identifier contains no Boolean operator and selects at most one tuple, whereas the injected value above contains a single operator and selects the whole table. In other words, we aim at bounding the distance between properties of the outputs by the distance between properties of the inputs, rather than comparing concrete values.

As another example, malware detection tools look for malicious patterns, e.g., signatures or byte sequences, in the files under inspection. A simple detector is given on the right of Figure 1: it counts the occurrences of “a”, standing for a malicious pattern, in a file. Here we could require the detector to be robust. Suppose that the count is observed only up to a fixed granularity, namely through the interval of width 10 containing it (0–9, 10–19, …), which plays the role of the verdict of the detector. Then, modifying a few bytes of a file should move this interval by a proportionally bounded amount, whereas merely reordering the bytes of the file should not move it at all: an attacker cannot make the verdict switch between distant intervals by tampering with a file only slightly. Again, the relevant distances are between properties of data, namely the content of a file up to the order of its bytes and the interval containing a count (Example 2.5). The choice of the property matters as well: the length of a file would not be a suitable input property, since files of the same length, such as “aaaa” and “bbbb”, may contain very different numbers of patterns.

In principle, these requirements can be expressed by LC, provided that the property of interest is incorporated into the distance, e.g., by comparing files through their edit distance up to the order of their bytes, rather than through the plain edit distance, which would also accept detectors whose count changes when the bytes of a file are merely reordered. However, such a tailored distance hides the property within the distance itself: the property cannot be combined with a different distance, nor the distance with a different property, and the resulting requirement is hardly comparable with other established notions in the literature, which are typically expressed in terms of abstractions of data.

We introduce Abstract Lipschitz Continuity (ALC for short), a property that generalizes LC from data to their properties (Section 2). ALC requires that differences between the properties of inputs lead to proportionally bounded differences between the properties of the corresponding outputs: the distance between the properties of two outputs is at most k times the distance between the properties of the corresponding inputs, for an abstract Lipschitz constant k. In particular, inputs with the same property must be mapped to outputs at distance 0, as required, e.g., for files that only differ in the order of their bytes in the example above. Our formalization is grounded in the theory of abstract interpretation [CC77, CC79]. We model property-based (or qualitative) approximations by upper closure operators, which abstract concrete values to the set of values sharing a common property, e.g., all the files with the same bytes, up to their order, or all the strings with the same number of Boolean operators. We model quantitative approximations by pre-metrics, a weakening of metrics that only requires each element to be at distance 0 from itself, and thus covers the distances arising in program analysis, which in general are neither symmetric nor satisfy the triangle inequality. Unlike LC, ALC is parametrized by both forms of approximation and keeps them explicitly apart, which is what allows us to relate ALC to other extensional program properties, and to reason about ALC of programs by induction on their syntax.

Thanks to this explicit separation, we relate ALC of program semantics to other extensional properties that capture input/output relations in comparable yet distinct ways, and show that ALC is a sufficient condition for three of them (Section 3). In abstract interpretation, ALC implies (partial) completeness [CDG22, CUDPG23, GRS00]: when the distance satisfies mild assumptions, any program whose semantics is ALC w.r.t. an abstraction admits a complete best correct approximation on it, i.e., an analysis on that abstraction that introduces no imprecision; when ALC is known for an input abstraction different from the one used by the analysis, the imprecision of the analysis is at most k times the largest distance, measured through the former abstraction, between an input and its approximation in the latter, and it is null when the latter is more precise. In language-based security, ALC implies (partial) abstract non-interference [CMU25, GM18]: inputs with the same property yield outputs with the same property, or with properties at a bounded distance. In machine learning, ALC with a null constant implies (abstract)

M. CAMPION, I. MASTROENI, M. PASQUA, AND C. URBAN

robustness [GMP24, MMF25] for any perturbation radius, and it is, in general, strictly stronger.

Finally, we propose a sound deductive system for proving ALC of programs by induction on their syntax (Section 4), parametric in the input and output abstractions and in the pre-metric of interest. Unlike Lipschitz continuous functions, ALC functions are not closed under composition in general, since the output abstraction of a program need not match the input abstraction of the next one. The rules of the system make explicit the side conditions that recover compositionality: a compatibility, through the distance, between consecutive abstractions for sequential composition, a bound on how joins affect the output distance for non-deterministic choice, and either a continuity condition on the distance or a bound on the number of iterations for Kleene iteration. A proof of ALC for a program is thus reduced to proofs for its basic commands and to these side conditions.

Related Work. Section 3 studies in detail the relationship between ALC and (partial) completeness [CDG22, CUDPG23, GRS00], (partial) abstract non-interference [CMU25, GM82, GM18], which generalizes approximate non-interference [PHW04], and (abstract) robustness [GMP24, MMF25].

Our deductive system (Section 4) generalizes the proof system of Chaudhuri et al. [CGL10, CGLN11, CGL12] for proving the Lipschitz continuity of programs: when the property-based approximations are the identity, it recovers (an extension, due to the (star) rule, of) the system in [CGL12]. Lipschitz-style robustness has also been studied for string transducers [SDC13, HOS14], w.r.t. similarity functions generalizing, e.g., the Hamming and Levenshtein distances, and for numerical programs [GP13], where abstract interpretation is used to bound the discontinuity errors due to unstable tests in finite-precision implementations. Type systems track Lipschitz constants as function sensitivity [RP10], and de Amorim et al. [dAGHK19] encode relational properties, such as approximate differential privacy, as sensitivity w.r.t. suitable distances, possibly violating the triangle inequality. In all these works, perturbations are measured directly on concrete values, whereas ALC measures them between properties of data, formalized by upper closure operators.

The notion of software doping, technically introduced in [DBB+17][DBB^{+}17], pursues an effect similar to ALC, with the aim of detecting programs that intentionally deviate from their expected behavior. The authors propose a Lipschitz-style condition for defining software doping which is tailored to the Hausdorff lifting. This is then further generalized via a functional modulus of continuity. Their work, like ours, discerns a property of interest, expressed through the Hausdorff lifting, while, in our approach, we discern a property that can be formalized as a closure operator (or Galois connection). Other potential related works are cited in Section 5, since a better understanding of the relation with ALC deserves further research.

Structure of the Paper. The rest of the paper is organized as follows.

  • Section 1 introduces the programming language of interest and its semantics, and recalls property-based approximations via upper closure operators, quantitative approximations via pre-metrics, and their combination.

  • Section 2 defines Lipschitz continuity over pre-metric spaces and ALC, and illustrates ALC on examples.

  • Section 3 shows that ALC is a sufficient condition for partial completeness, partial abstract non-interference and abstract robustness.

• Section 4 presents the deductive system for proving ALC of programs and proves it sound.

• Section 5 concludes and discusses future work.

This article is an extended version of [CMPU26]. With respect to the conference version, the whole presentation has been thoroughly revised and extended, with many new examples illustrating the main results, the complete proofs of all the results, and the correction of some statements and examples. A new figure, Figure 6, summarizes the relations between ALC and the other extensional properties established in Section 3. Moreover, Section 3 contains two groups of new results. First, we relate ALC to partial completeness and partial abstract non-interference when the latter are expressed w.r.t. an input abstraction different from the one for which ALC is known, as is often the case when the abstraction of interest is dictated by an existing analysis or by a security policy. Second, we show that 0-ALC is equivalent to abstract robustness when the latter is required for every perturbation radius, whereas it is, in general, strictly stronger than abstract robustness for a fixed radius.

References (58)