---
title: Gauge-Sweep Audits Overview
url: https://www.emergentmind.com/topics/gauge-sweep-audits
type: topic
---

# Gauge-Sweep Audits Overview

Gauge-Sweep Audits are audit procedures in which a “gauge” is swept, mixed, accumulated, or adapted over a structured family of hypotheses, latent states, or internal signals. In the supplied literature, the term appears most concretely in ballot-level comparison risk-limiting audits built on comparison-optimal betting, where the gauge is the martingale tuning parameter or bet; it is also used as an interpretive label for one-run privacy auditing in DP-SGD, artifact-level checkpoint triage, profiled side-channel auditing of public metrology releases, and a SHANGRLA-style mapping from discrepancies to half-average null tests. Across these settings, the common pattern is to preserve a formal audit guarantee while improving robustness or efficiency when the true generative or error process is unknown [2304.01010] [2606.12733] [2607.01854] [2606.02934] [1911.10035].

## 1. Domain-specific meanings of “gauge” and “sweep”

The term is not used uniformly across the cited work. In ballot-level comparison RLAs, the gauge is the per-draw bet in a supermartingale test, and sweeping means diversifying or adapting that bet across plausible cast-vote-record error rates. In the supplied terminology mapping for one-run privacy auditing, the gauge is the normalized canary score and the sweep is the accumulation of canary-aligned signals over training steps. In checkpoint auditing, gauges are internal artifact-level signals computed from activations and weights, and sweeping means applying them across a registry of checkpoints and combining them by standardized fusion. In metrology, gauge settings are instrument and processing parameters such as band edge, windowing, overlap, and segment count, and sweeping means varying those settings to map leakage. In the SHANGRLA connection, the gauge is the mapping that converts ballot-level discrepancies into nonnegative quantities fitting a half-average-null framework, and the sweep is the systematic enumeration and testing of the finite set of assertions needed for outcome verification [2304.01010] [2606.12733] [2607.01854] [2606.02934] [1911.10035].

| Domain | Gauge | Sweep |
|---|---|---|
| Comparison RLAs | Per-draw bet $\lambda_i$ | Mixtures or adaptation across hypothesized CVR error rates |
| One-run DP auditing | Canary score $S_T$ | Summing canary-aligned signals across DP-SGD steps |
| Checkpoint auditing | Activation refusal-gap and weight-recovery energy | Sweeping complementary gauges across checkpoints and combining them |
| Metrology side-channel auditing | Instrument and processing settings; protected residual norm | Sweeping chemistry and release-map settings |
| SHANGRLA mapping | Assorter or discrepancy-to-list transform | Enumerating and testing all required assertions |

A plausible implication is that “Gauge-Sweep Audit” names a methodological schema rather than a single fixed algorithm. What remains invariant is the use of an internal scalar or low-dimensional statistic whose evolution under a null and an alternative can be controlled, optimized, or profiled.

## 2. Comparison-optimal betting in ballot-level comparison risk-limiting audits

In COBRA, gauge-sweep audits are risk-limiting audits that “sweep,” mix, or adapt the martingale tuning parameter—called the gauge or bet—across a range of hypothesized CVR error rates. For a plurality contest with $N$ ballots, CVRs $c_i$, human interpretations $b_i$, and assorter $A(\cdot)$ taking values in $[0,1]$, the overstatement in favor of the reported winner is $\omega_i := A(c_i)-A(b_i)$. With diluted margin
$$
v := 2\cdot\left(N^{-1}\sum_i A(c_i)\right)-1,
$$
define
$$
a := (2-v)^{-1}\in(0.5,1], \qquad x_i := \frac{1-\omega_i}{2-v}\in\{0,a/2,a\}
$$
when understatement errors are ignored. The three categories are correct CVR $(x_i=a)$, 1-vote overstatement $(x_i=a/2)$, and 2-vote overstatement $(x_i=0)$ with probabilities $(p_0,p_1,p_2)$. The outcome is correct iff $\bar{x}>1/2$, so the complementary null is $H_0:\bar{x}\le 1/2$.

For sequential sampling with replacement, COBRA uses the supermartingale update
$$
T_i := 1+\lambda_i(X_i-1/2), \qquad M_0:=1,\qquad M_t:=\prod_{i=1}^t T_i,
$$
where $\lambda_i\in[0,2]$ is predictable. Under $H_0$, $\{M_t\}$ is a nonnegative supermartingale, and Ville’s inequality yields
$$
P\!\left(\sup_t M_t\ge 1/\alpha\right)\le \alpha.
$$
The audit stops and confirms the outcome when $M_t\ge 1/\alpha$; the truncated reciprocal $P_t:=\min\{1,1/M_t\}$ is a sequentially valid $P$-value.

COBRA’s central result is that a fixed bet $\lambda$ should maximize expected log-growth under the Kelly criterion,
$$
\max_{\lambda\in[0,2]} E_F[\log(1+\lambda(X-1/2))].
$$
The first-order condition is
$$
\frac{(a-1/2)p_0}{1+\lambda(a-1/2)}
+
\frac{(a-1)p_1}{2-\lambda(1-a)}
-
\frac{p_2}{2-\lambda}
=0.
$$
In the special case $p_1=0$,
$$
\lambda^*=\frac{2-4ap_0}{1-2a}.
$$
This oracle-optimal $\lambda^*$ depends on the true CVR error rates. When $p_2>0$, maximal betting $\lambda=2$ eventually “goes broke” with probability $1$ because drawing $x_i=0$ yields $T_i=0$.

Gauge-sweep enters through two constructions. In diversified betting, one selects a grid of plausible $(p_1^{(j)},p_2^{(j)})$, solves for $\lambda_j^*$ at each point, forms component martingales
$$
M_t^{(j)}=\prod_{s=1}^t [1+\lambda_j^*(X_s-1/2)],
$$
and mixes them as
$$
M_t=\sum_{j=1}^B w_j M_t^{(j)}, \qquad w_j\ge 0,\ \sum_j w_j=1.
$$
Because mixtures of supermartingales are supermartingales, risk control is unchanged. In adaptive betting, error-rate estimates from previously sampled ballots are plugged into the Kelly condition through truncated-shrinkage estimators
$$
\tilde p_{ki}:=\max\!\left\{\epsilon_k,\frac{d_k\tilde p_k+(i-1)\hat p_{k(i-1)}}{d_k+i-1}\right\}, \qquad k\in\{1,2\},
$$
and the resulting $\lambda_i$ remains valid because it is a predictable function of the past.

The efficiency gains reported for these gauge-sweep strategies are substantial. Across simulated audits with diluted margins $v\in\{0.05,0.10,0.20\}$ and $p_2\in\{1.5\%,1\%,0.5\%,0.1\%,0\%\}$, comparison-optimal oracle bets reduced expected workload by $93\%$ on average relative to a ballot-polling apKelly bet transplanted to comparison audits. At $v=5\%$ and $p_2=1\%$, apKelly often needed the entire population of $10{,}000$ draws, whereas $\lambda^*$ stopped in mean $482$ draws with $90$th percentile $813$. For practical strategies at $v=5\%$ and $N=20{,}000$, geometric mean workload ratios relative to oracle were fixed $\sim 2.4\times$, adaptive $\sim 1.3\times$, and diversified $\sim 1.2\times$; mixtures were best on average. COBRA therefore recommends comparison-optimal gauge-sweep strategies rather than fixed a priori bets, small positive $\epsilon_2$ to avoid stalls, and caution when sampling without replacement not to naively subtract observed errors from hypothesized population rates [2304.01010].

## 3. SHANGRLA and assertion sweeps over half-average nulls

SHANGRLA reduces auditing for many social choice functions to testing a finite set of null hypotheses of the form “the average of this list is not greater than $1/2$.” For a finite list $X=\{x_1,\dots,x_L\}$ of nonnegative numbers, the canonical null is
$$
H_0:\ \frac{1}{L}\sum_{\ell=1}^L x_\ell \le 1/2.
$$
Rejecting all such nulls at level $\alpha$ confirms the reported outcome with risk limit $\alpha$. This reduction applies to majority, super-majority, plurality, multi-winner plurality, Instant Runoff Voting, Borda count, approval voting, and STAR-Voting, among others.

For ballot polling, SHANGRLA works directly with assorters. For ballot-level comparison audits, it maps each discrepancy into a nonnegative quantity that again fits the half-average-null form. If $A$ is an assorter mapping ballots or CVRs to $[0,u]$, define $\omega_i=A(c_i)-A(b_i)$, reported assorter mean $\bar A^c$, and reported margin $v=2\bar A^c-1$. Let
$$
\tau_i = 1-\omega_i/u,\qquad B(b_i,c_i)=\frac{\tau_i}{2-v/u}.
$$
Then $\bar B>1/2$ iff the underlying assertion is correct. In this sense, the gauge is the discrepancy-to-list transform $B(b_i,c_i)$, and the sweep is the systematic testing of every assertion required by the social choice rule.

SHANGRLA provides two sequential risk-measuring functions for sampling without replacement. The first is the Kaplan–Kolmogorov multiplicative martingale with a nonnegativity shift $\gamma>0$, yielding a sequential $p$-value $p_{\mathrm{KK}}$. The second is the integrated-polynomial martingale, yielding $p_{\mathrm{IP}}$. Either can test each half-average null for either ballot polling or comparison auditing. Stratified audits are handled through a union–intersection construction over allocations $\beta=(\beta_1,\dots,\beta_S)$ with $\sum_s \beta_s\le 1/2$, combining stratum-specific $p$-values by Fisher’s method.

The framework also includes “phantoms to evil zombies” for missing ballot cards and missing or redacted CVRs, and ballot-style manifests for contests that do not appear on every ballot card. These devices preserve the risk limit by treating missing or misclassified items in the least favorable manner. SHANGRLA’s reported efficiency gains over previous comparison audits come from testing conditions that are both necessary and sufficient for correctness for most social choice functions, and from avoiding a conservative approximation used in earlier MACRO-style methods [1911.10035].

## 4. One-run Gaussian privacy auditing in DP-SGD

In the supplied terminology mapping for one-run privacy auditing, a Gauge-Sweep Audit is the paper’s one-run, white-box Gaussian audit. The gauge corresponds to the canary score
$$
S_T=\frac{1}{\sqrt{T}}\sum_{t=1}^T X_t,
$$
a normalized sum of canary-aligned per-step observations, and the sweep corresponds to accumulating those observations across all DP-SGD steps. For a canary $x^\star$, clipped canary gradient
$$
c_t=\operatorname{clip}_C(\nabla_\theta \ell(\theta_{t-1};x^\star)),
$$
and unit direction $u_t=c_t/\|c_t\|$ when $c_t\neq 0$, the scalar signal is
$$
X_t=\langle u_t,\widetilde g_t\rangle,
$$
where $\widetilde g_t$ is the privatized average gradient at step $t$.

Under the paper’s idealized scalar model, if $B_t\sim \mathrm{Bernoulli}(q)$ indicates whether the canary is in the minibatch and $Z_t\sim\mathcal N(0,\sigma^2)$ is Gaussian noise, then the absent and present worlds are modeled by
$$
X_t^{(0)}=Z_t,\qquad X_t^{(1)}=B_t C + Z_t.
$$
Accordingly,
$$
S_T^{(0)}\sim \mathcal N(0,\sigma^2),
$$
while
$$
E[S_T^{(1)}]=\sqrt{T}\,qC,\qquad \mathrm{Var}(S_T^{(1)})=\sigma^2+q(1-q)C^2,
$$
and $S_T^{(1)}$ is approximately Gaussian by the CLT. The Kolmogorov distance bound scales as
$$
d_{\mathrm{Kol}}=
\frac{q(1-q)|1-2q|\,C^3}{6\sqrt{2\pi T}\,(\sigma^2+q(1-q)C^2)^{3/2}}
+O\!\left(\frac{1}{T}\right),
$$
with a tail-localized bound that is negligible relative to $\delta$ in the regime $\delta=10^{-5}$.

The audit can be used either as a one-sided membership test or, in the preferred formulation, as a Gaussian-pair fit. For a single threshold $\tau$, the $p$-value is
$$
p=1-\Phi\!\left(\frac{t-\mu_0}{\sigma_0}\right),
$$
and the power is
$$
1-\Phi\!\left(\frac{\tau-\mu_1}{\sigma_1}\right).
$$
More centrally, one fits
$$
G_0=\mathcal N(\mu_0,\sigma_0^2),\qquad G_1=\mathcal N(\mu_1,\sigma_1^2),
$$
computes the hockey-stick divergence between Gaussians, and defines
$$
\varepsilon_\theta(\delta)=\inf\{\varepsilon\ge 0:\delta_\theta(\varepsilon)\le \delta\},
$$
with confidence-adjusted lower bound
$$
\widehat\varepsilon_{\mathrm{lb}(\alpha)}=\inf_{\theta\in C_\alpha}\varepsilon_\theta(\delta).
$$
The paper uses either Bonferroni rectangles or bootstrap ellipsoids for $C_\alpha$.

The empirical results reported for DP-SGD on CIFAR-10 use WideResNet-16-4, batch size $B=4096$, augmentation $K=16$, and $T=2500$ steps, with analytic-Gaussian accounting at $\delta=10^{-5}$ and theoretical $\varepsilon=8$. For the convergence-bound example, $q=0.0819$, $C=1$, and $\sigma\approx 2.6245$. The empirical $\varepsilon$ lower bound is approximately $6.7$, compared with approximately $4.7$ for an f-DP one-run audit and approximately $3.3$ for a thresholding-based one-run audit. With only $m=100$ canaries, the Gaussian audit attains bounds that the baselines need approximately $2500$ canaries to reach. The method requires white-box access to per-step privatized gradients, assumes approximate normality and cross-canary near-orthogonality, and extends exactly to DP-FTRL when ancestor-path noise sums are Gaussian [2606.12733].

## 5. Two-signal artifact-level checkpoint audits

In the checkpoint-auditing instantiation, Gauge-Sweep Audits are artifact-level audits that score the checkpoint as an object rather than scoring generated text. The paper’s premise is explicit: runtime guards cannot determine whether a checkpoint’s refusal mechanism has been stripped because “they score generations, not the artifact.” The two gauges are a reference-anchored activation refusal-gap and a weight-recovery energy of the base-to-candidate weight difference.

Let $M_b$ be an attested reference model and $M_c$ the candidate checkpoint. Using a fixed harmful/benign contrast set of $500$ paired prompts from AdvBench, JailbreakBench, and HarmBench, a mid-stack layer band $\mathcal B$, unit-norm refusal directions $\hat r_\ell$ learned on the reference, and last-token residual-stream activations $a_\ell(M,p)$, define the band-averaged activation gap
$$
\mathrm{gap}(M)=\frac{1}{|\mathcal B|}\sum_{\ell\in\mathcal B}\langle \mu_h^\ell(M)-\mu_b^\ell(M),\hat r_\ell\rangle
$$
and the base-anchored ratio
$$
\rho(M_c)=\frac{\mathrm{gap}(M_c)}{\mathrm{gap}(M_b)}.
$$
The interpretation supplied is that $\rho\approx 1$ for intact refusal and $\rho\to 0$ as refusal is removed.

For watched matrices $\mathcal W$ consisting of attention $o\_proj$ and MLP $down\_proj$ layers in the same band, define
$$
\Delta W_m = W_b^m - W_c^m,
$$
and the rank-1 spectral energy
$$
E_1(M_c)=\frac{1}{|\mathcal W|}\sum_{m\in\mathcal W}\frac{\sigma_1^2(\Delta W_m)}{\sum_i \sigma_i^2(\Delta W_m)}\in[0,1].
$$
The two signals are negatively correlated, with Pearson $r=-0.41$, and are fused by
$$
z_\rho = zscore(-\rho),\qquad z_E=zscore(E_1),\qquad Z=z_\rho+z_E.
$$
Thresholds are then chosen by maximizing Youden’s $J=TPR+TNR-1$ on a calibration set.

The evaluation uses a $273$-checkpoint registry spanning Qwen, DeepSeek-distilled Qwen, Llama, and Gemma, with an evaluation set of $94=57$ uncensored checkpoints plus $37$ benign edits; $14$ labeled-but-refusing checkpoints were excluded. The combined $z$-sum achieves in-sample AUROC $0.95\ [0.90,0.98]$ and PR $0.97\ [0.94,0.99]$. Under leave-one-family-out transfer, held-out detection is $0.90\ [0.81,0.96]$, balanced accuracy is $0.89\ [0.83,0.95]$, false-positive rate is $0.11\ [0.03,0.22]$, and the detector misses only $4$ of $57$ abliterations. Single-signal baselines are weaker: AUROC $0.84$ for $\rho$ alone and $0.90$ for $E_1$ alone. A fitted two-dimensional logistic does not improve over the threshold-free $z$-sum.

The paper emphasizes that the audit is “effective triage, not tamper-proofing.” The most severe failure is a spoofed reference: declaring the candidate as its own reference yields $\Delta W=0$ and $\rho=1$ by construction, and declaring an abliterated sibling as the base can evade both axes. A second failure mode is white-box owner training past the threshold. In a Qwen2.5-1.5B proof-of-concept at step $600$, the evaded checkpoint had $E_1=0.29$ and $\rho=1.82$, remained guard-unsafe on all $20/20$ held-out harmful prompts, had substring refusal $0.15$, and retained coherence and most capability. The audit therefore presumes an attested reference and is intended as pre-deployment triage with manual review rather than automatic rejection [2607.01854].

## 6. Profiled side-channel audits of public metrology releases

In the metrology instantiation, a Gauge-Sweep Audit is a profiled statistical side-channel test on public power-spectral-density releases in which instrument and processing gauge settings are swept to characterize, bound, and avoid protected-parameter leakage. The release map exposes finite-band PSD statistics derived from
$$
S_\theta(k)=A\exp(-\beta k^2)(1+\lambda^2 k^2)^{-3/2}+S_0,\qquad 0\le k\le K,
$$
with parameters $\theta=(A,\beta,\lambda,S_0,\vartheta)$. The protected coordinate is the effective transport length $\lambda$, linked to quencher loading by
$$
\lambda^2=\frac{D_H}{k_q q_0+k_{\rm loss}},
$$
so sweeping $q_0$ traces the affine line $\lambda^{-2}=a q_0+b$.

Two channel models are used. In the independent-bin case, averaged PSD bins follow a gamma channel:
$$
\widehat S_i\mid \theta \sim \mathrm{Gamma}(m_i,S_\theta(k_i)/m_i),
$$
with exact divergence
$$
D_{\mathrm{KL}}(P_\theta\Vert P_{\theta'})=\sum_i m_i\left[\log r_i+\frac{1}{r_i}-1\right],\qquad r_i=\frac{S_i(\theta')}{S_i(\theta)},
$$
and exact Chernoff information
$$
C(\theta,\theta')=\sup_{0\le s\le 1}\sum_i m_i\!\left[(1-s)\log S_i(\theta)+s\log S_i(\theta')+\log\!\left(\frac{1-s}{S_i(\theta)}+\frac{s}{S_i(\theta')}\right)\right].
$$
When overlap or short records induce correlations, the audit switches to a covariance-weighted log-spectrum channel,
$$
D_{\mathrm{KL}}(P_\theta^R\Vert P_{\theta'}^R)\approx \frac12(\mu(\theta)-\mu(\theta'))^\top \widehat\Sigma^{-1}(\mu(\theta)-\mu(\theta')),
$$
with local Chernoff equal to one quarter of this when the covariance is equal across the pair.

Amplitude and blur are treated as nuisance directions and eliminated by projection in log-spectrum space. With $g_\lambda(k)=-3\lambda k^2/(1+\lambda^2k^2)$ and projection $\Pi_{\alpha,\beta}$ onto $\mathrm{span}\{1,k^2\}$, the protected Fisher information is
$$
\mathcal I_{\lambda\mid \alpha,\beta}(K)=\{g_\lambda,(I-\Pi_{\alpha,\beta})g_\lambda\}_{w,K}.
$$
The headline finite-band law for $K\lambda\ll 1$ is
$$
\mathcal I_{\lambda\mid \alpha,\beta}(K)=\frac{64}{1225}\,w\,\lambda^6 K^9 + O(w\lambda^8 K^{11}),
$$
so for a local pair separated by $\Delta\lambda$,
$$
C_R=\frac18(\Delta\lambda)^2\mathcal I_{\lambda\mid \alpha,\beta}(K)+O((\Delta\lambda)^3).
$$
This yields the closed-form safe band
$$
K \le \left(\frac{1225\cdot 8}{64\,L\,w\,\lambda^6(\Delta\lambda)^2}\right)^{1/9}.
$$
For a protected quencher bit along the chemical line,
$$
\delta\lambda=-\frac12\lambda^3\frac{k_q}{D_H}\delta q_0,\qquad
\mathcal I_{q_0\mid \alpha,\beta}(K)=\frac{16}{1225}\,w\,\frac{k_q^2}{D_H^2}\lambda^{12}K^9+O(\cdots).
$$

The operational protocol is explicit: estimate per-bin effective shapes $m_i$ from repeats, test gamma goodness of fit, estimate and possibly shrink $\widehat\Sigma$, fit the screened model in the log domain, build nuisance tangents, project to obtain the protected residual norm, compute the exact or covariance-weighted Chernoff exponent, and report $L_{0.9}=\lceil \log 10/C\rceil$ together with $K_{\rm safe}$. If any gate fails—gamma fit, unstable covariance, or structured residuals—the exponent is deferred and the release should either restrict the band or gather more repeats.

The EUV roughness case study calibrates the theory at an $18$-nm half-pitch scale using correlation length $7.2$ nm, $\Delta y=5$ nm, Nyquist $K=0.628$ nm$^{-1}$, edge length $2400$ nm, $m=16$, and $\Delta\lambda/\lambda=5\%$. The reported per-spectrum Chernoff exponents and corresponding $L_{0.9}$ show a sharp transition as the band admits the transport knee: at $K=0.050$ nm$^{-1}$, $C=1.13\times 10^{-6}$ and $L_{0.9}\approx 2{,}032{,}914$; at $K=0.200$ nm$^{-1}$, $C=1.30\times 10^{-2}$ and $L_{0.9}\approx 178$; at $K=0.628$ nm$^{-1}$, $C=3.76\times 10^{-1}$ and $L_{0.9}\approx 7$. The same setting also shows that compressing the release to RMS alone destroys most transport signal: at $K\lambda=1$ and $\Delta\lambda/\lambda=5\%$, full-PSD maximum-likelihood success is approximately $0.986$ versus approximately $0.554$ for RMS-only releases. Positive AR(1)-like correlation can reduce the correlated/diagonal exponent ratio to approximately $0.30$ at $\rho=0.6$, so diagonal audits over-state leakage unless $\widehat\Sigma$ is used [2606.02934].

Source: https://www.emergentmind.com/topics/gauge-sweep-audits