Floating-Point-Sound Verification of Path-Specific Fairness

A loan model is path-specifically fair if changing an applicant's sex would not change the decision through forbidden routes, such as the direct effect of sex or its effect through marital status, while legitimate routes like education are still allowed to matter. We propose a verifier that proves this property for a small neural network over a whole region of applicants. The proof also has to hold for the network as it actually runs, in 32-bit floating-point arithmetic, and not only for an idealized real-number version of it. The key technical observation is that fairness is a twin property: it compares the network on a factual applicant and on their counterfactual twin. Twin properties are proved tightly by tracking the difference between the two runs, because the parts the runs share cancel. Floating-point rounding breaks that cancellation, since the two runs round independently. The central question is whether a verifier can account soundly for rounding without losing the tightness that makes twin reasoning work.

This matters because the existing pieces do not fit together. Fairness verifiers such as FETA toggle the sensitive attribute while holding everything else fixed, and they reason in exact real arithmetic. Causal fairness methods estimate path-specific effects statistically. Separately, No Soundness in the Real World built networks that four real-number verifiers certified at about 97% robust accuracy but that scored 0.11% when deployed. A fairness certificate issued in real arithmetic can therefore be defeated the same way, and nobody has checked.

Core Claim

We treat the causal model as a fixed map applied to the input and treat floating-point rounding as a bounded, order-independent error inside a difference-tracking verifier. Two things follow. First, a structural causal model (a directed graph of variables with an equation for each variable) with designated resolving variables, which are mediators allowed to carry influence of the sensitive attribute, following Avoiding Discrimination through Causal Reasoning, yields a counterfactual map $c(x)$. This map sends an individual $x$ to their twin: the sensitive attribute is flipped, its non-resolving descendants are recomputed, and resolving variables and non-descendants are held at their factual values. This is the nested counterfactual $Y(a', M(a))$ written as a function. Path-specific fairness on a region $X$ then becomes

$$\forall x \in X:\quad \mathrm{sign}\,\hat f(x) = \mathrm{sign}\,\hat f(c(x)),$$

where $\hat f$ is the network as executed in IEEE-754 single precision. The map $c$ is a mathematical object and is evaluated in exact arithmetic; only $\hat f$ runs on hardware. For linear or additive-noise causal models, $c$ is affine or a small network, so $\hat f \circ c$ and $\hat f$ together form a two-copy verification problem.

Second, for a layer that computes $z = Wy$ in each run, the standard worst-case summation bound gives

$$\hat z - \hat z' \in W(y - y') \pm \gamma_n\, |W|\,(|y| + |y'|),$$

with $\gamma_n = nu/(1-nu)$, where $u = 2^{-24}$ is single-precision unit roundoff and $n$ is the length of the dot product. The bound holds for every summation order and for 64-bit execution. It therefore covers the order-detector and precision-detector attacks without enumerating execution schedules, a task No Soundness in the Real World argues is likely NP-hard. The catch is visible in the formula. The error term scales with the size of the activations, $|y|$, not with the size of their difference, $|y-y'|$, so it does not shrink when the twins are close. We claim this term can be controlled in two ways. One is to branch on the sign of the twin difference where it is small and on the signs of individual neurons where rounding dominates. The other is a training regularizer on $|W||y|$ near the decision boundary. With both, most of the gain from difference-tracking survives, and the result is certificates that are both path-specific and deployment-sound.

Research Program

We will build the verifier by extending relational branch-and-bound. SABRE supplies the method. It defines "relational neurons" (the difference of a neuron's value across two runs), branches on their sign, and chooses splits with a Lagrangian-dual heuristic. SABRE works over real numbers on image and control robustness benchmarks and has no causal map. We add three things: the composed input map $\hat f \circ c$ with the causal constraints, the rounding term above in every affine layer, and a sound outward-rounded implementation of the bound computation itself. The last addition responds to the point in Geometric Path Enumeration that solvers are themselves floating-point programs. The branching rule will score each candidate split by the dual gain it offers minus the share of the remaining slack that is due to rounding. This lets the verifier choose between difference splits and ordinary neuron splits. For small networks, we will also produce a certificate that can be checked independently, in the spirit of Towards a Certified Proof Checker.

The attack side is equally important. We will adapt the hill-climbing search of Exploiting Verified Neural Networks via Floating Point Numerical Error to twin pairs, and we will build fairness backdoors. These are detector circuits of the kind in No Soundness in the Real World, gated on the sensitive attribute, that open a direct path from sex to the decision only under 32-bit or reordered execution. A real-number verifier should certify such a model as path-specifically fair. Our verifier must refuse.

Scope is deliberately narrow. We take the causal graph as given, from the datasets' published analyses in Fair Inference on Outcomes and fairadapt. Graph misspecification remains the dominant threat to validity for all path-specific methods, and we do not solve it. We also consider only ReLU networks and floating-point execution, not integer quantization.

Baselines

The naive reference point is empirical twin testing. We compute $c(x)$ for every test individual plus dense samples in each region, and we run the deployed network on both twins under several runtimes (CPU, GPU, fp32, fp64, different batch sizes). This test has no guarantee. FETA found counterexamples for about 89% of Adult test samples in models that looked fine empirically. The test serves to count violations missed by any certificate.

The strongest existing complete method is a FETA-style exact mixed-integer encoding of the composed network over the reals. FETA reports a 0% counterexample rate after its interventions and 119 seconds per sample on Adult without in-processing (10 seconds with it). We will reuse its encoding with $c$ substituted for its attribute toggle, on identical networks and regions, with the same wall-clock budget per instance.

The strongest scalable competitor is real-number relational branch-and-bound with a scalar tolerance added to the decision threshold. This is SABRE-style, and SABRE reports solving 67 ACAS Xu instances that its base verifier RaVeN could not, against 12 for ClasIS. No reported result was found on Lacuna for any verifier on path-specific fairness properties.

Two ablations isolate our ingredients. The first bounds each run separately with sound rounding and then compares the outputs, removing difference-tracking. The second uses difference-tracking with rounding but always makes difference splits, removing the rounding-aware branching rule.

Beating the baselines means two things. First, zero certified instances that the twin attacks or backdoors break, where the real-number baselines should fail on the backdoors. Second, a higher certified fraction at equal time than the separate-bounds ablation, while staying within a small factor of the real-number relational baseline's certified fraction.

Why not just…?

Why not just pad a real-number verifier with a small tolerance? Exploiting Verified Neural Networks via Floating Point Numerical Error concludes that ad-hoc tolerances are insufficient, because rounding error compounds across layers and depends on activation magnitude. A fixed threshold cannot track a term proportional to $|W||y|$. Our backdoor experiment tests this directly for fairness: a padded verifier that certifies a gated detector model is unsound on that model.

Why not just bound each run separately with sound floating-point intervals and compare? This is the real threat, because tabular fairness networks are small. It may be tight enough, and if it is, difference-tracking is unnecessary. The first ablation settles the question. If the separate-bounds approach certifies within a few points of our method on the Adult, German Credit, COMPAS and Law School models at every width we test, we will report that the simpler method suffices and that our contribution reduces to the causal encoding plus the soundness audit. We expect the gap to grow with width and depth, because independent intervals lose the shared structure.

Why not just preprocess the data causally and skip verification? Tools like fairadapt repair the training data, not the learned function. A flexible network can recombine features into proxies, and a gated detector trained on repaired data still discriminates at deployment. We will verify networks trained on fairadapt-transformed data and report their certified fraction and attack success.

Proposed Experiments

The benchmarks are Adult, with sex as the sensitive attribute and marital status as a disallowed mediator following Fair Inference on Outcomes; COMPAS; German Credit; Law School; and the synthetic admissions model in which department is the resolving variable. In each case we train MLPs of increasing width and depth. The regions are boxes around each test individual over the continuous non-descendant features, as in FETA's per-sample checks. The metrics are certified fraction, time and subproblem counts per instance, the fraction of certificates broken by twin attacks across runtimes, and accuracy for models trained with the rounding regularizer.

Three checks decide the proposal. On the backdoored models, the real-number exact and relational baselines should certify path-specific fairness while deployed fp32 execution discriminates, and our verifier should never certify these models. On clean models, our certified fraction should stay close to the real-number relational baseline and clearly above the separate-bounds ablation as networks grow; failure here means rounding eats the relational advantage, which is itself a useful negative result. Finally, the regularizer should shrink the rounding share of the slack at an accuracy cost comparable to what Path-Specific Counterfactual Fairness reports for its fairness constraint on Adult, where accuracy falls from 81.2% to 73.4% as the constraint tightens.