← All papers
First page of Certifying total-variation contamination by betting on trimmed kernel witnesses

Certifying total-variation contamination by betting on trimmed kernel witnesses

Hristo Inouzhe Valdes

stat.ME Nov 24, 2026 · v1
The paper's numbered results are formalized in Lean 4, with a public repository mapping each result to its formal statement.
Two laws share a common component after each discards a fraction $α$ of its mass, a trimming, exactly when their total variation is at most $α$, so the contamination level $α^\star = \mathrm{TV} (P,Q)$ is the share of each population without counterpart in the other. We bound it from below from two samples on any space with a bounded characteristic kernel. The kernel mean embeddings of all such trimmings of a law form a convex region, the regions of two laws first touch at $α^\star$, and in every direction a region reaches as far as a trimmed mean. The difference of their closest points, the witness, selects the trimming. We fit a ramp of the witness on part of the data and bet on the rest, at each level of a grid. The bound is valid at every sample size. The cut points of the tested level carry most of its finite-sample gain over an untrimmed witness, while refitting the witness at that level makes it consistent, gives its rates and returns the trimming. When a function of the kernel's Hilbert space separates the parts of the two laws without counterpart, the bound is within order $(n\wedge m)^{-1/2}$ of $α^\star$ on a grid of that mesh, which is minimax over such pairs. When these parts touch, a margin condition guarantees a polynomial rate for Sobolev kernels and a logarithmic rate for the Gaussian kernel. For the Laplace kernel on the line this guarantee is not sharp: the witness stays between its two cut points, and for densities that cross once, with a likelihood ratio bounded away from one off the crossing, the error on such a grid is again of that order up to logarithmic factors. No informative upper bound exists without assumptions. On the Right Heart Catheterization data, with confidence $0.95$, each arm must lose more than a fraction $0.35$ of its patients, if both lose the same fraction, before their covariate distributions can coincide.

The contamination level, the total-variation distance between two laws, is the smallest fraction each population must lose before the two can be trimmed into a common law. The goal is to certify lower confidence bounds on this level from two samples, with guarantees that hold at every sample size.

The kernel mean embeddings of all α-trimmings of a law form a convex region, and the regions of two laws first touch exactly at the contamination level. The difference of their closest points, the witness, selects the trimming. A ramp of the witness, with cut points, is fitted on part of the data, and a betting test is run on the held-out data at each level of a grid. The numbered results are formalized in Lean 4.

The bound is valid at every sample size. It is minimax within order (n∧m)^{-1/2} of the contamination level when an RKHS function separates the contaminations, and has polynomial or logarithmic rates under a margin condition. On the Right Heart Catheterization data, with confidence 0.95, each arm must lose more than 35% of its patients before the covariate distributions can coincide.