Randomized Manifold Smoothing for Formal Robustness to Semantic Perturbations

Daniya Niazi, Alaa Anani, Bernt Schiele, Jonas FischerarXiv 2026

TL;DR

Standard mathematical guarantees for AI robustness usually protect models against random static—the kind of pixel-level noise you rarely see in the real world—while collapsing when faced with larger, realistic changes. Randomized Manifold Smoothing fixes this by shaping test noise along the actual directions where real data varies, turning generic spherical guarantees into data-aligned ellipsoids. The result? Provable stability against meaningful, semantic changes—like shifting facial expressions or lighting—without sacrificing model accuracy.

What Problem Does This Paper Address?

Suppose you deploy a medical imaging model. Accuracy isn't enough; you want a mathematical certificate proving its diagnosis won't flip if a lesion looks slightly different or the lighting shifts.

The go-to tool for scalable, black-box guarantees is Randomized Smoothing (RS). Standard RS works by adding isotropic Gaussian noise—equal-opportunity static in every direction—around an input, taking a majority vote of the model's predictions, and carving out a safe "certified sphere" ($\ell_2$-ball) around the data point.

Here is the catch: real-world data doesn't live everywhere in high-dimensional space. By the manifold hypothesis, natural images and embeddings lie along thin, low-dimensional surfaces (manifolds). Standard RS wastes its certification budget defending against arbitrary off-manifold static, and if you crank up the noise to cover larger variations, the image turns to mush and the model's accuracy collapses. The authors ask: Can we certify robustness along the natural directions supported by the data distribution, rather than arbitrary directions in ambient space?

Comparison of isotropic spherical smoothing versus manifold-aligned ellipsoidal smoothing

Methods

Instead of inventing new certification statistics from scratch, the authors cleverly adapt the geometry of the noise before feeding it into standard RS machinery:

  1. Local Geometry Estimation (New): Given an input $x$, they find its $k$ nearest neighbors in the training set (using $\ell_2$ distance) and run Principal Component Analysis (PCA) on this local neighborhood. This yields principal directions (where neighbors vary) and eigenvalues (how much they vary).
  2. Manifold-Shaped Noise (New): Rather than uniform noise, they draw Gaussian perturbations scaled proportionally to those local eigenvalues. High-variance data directions get stretched perturbations; off-manifold directions get virtually zero noise.
  3. PCA Whitening & Certification (Standard + Twist): Standard RS math requires isotropic (spherical) noise to be valid. By applying a whitening transformation based on the local covariance—which stays fixed at $x$ during certification to preserve mathematical soundness—the stretched noise becomes spherical in whitened coordinates. They run standard Monte Carlo voting there, get a certified radius, and map that sphere back to the original space, where it becomes a manifold-aligned ellipsoid (a Mahalanobis ball).
Step-by-step pipeline of Randomized Manifold Smoothing

Datasets

No new datasets were introduced; the authors evaluate across existing benchmarks spanning raw pixels, sparse concepts, and multimodal embeddings:

  • CelebA & CelebA-HQ: Image classification (smile prediction), including out-of-distribution (OOD) attribute shifts (e.g., training without eyeglasses, testing with them).
  • CelebAMask-HQ: Dense pixel-level semantic segmentation of facial features.
  • ImageNet: Evaluated within a sparse Autoencoder (SAE) interpretable concept representation space.
  • RoCOCO: A robustness benchmark augmenting COCO with semantically altered captions (specifically using the security-related Danger split) for CLIP image-to-text retrieval.

Key Insights and Ideas

  • Noise becomes meaningful variation: When you crank up isotropic noise ($\sigma = 1.0$) on a face, you get colorful TV static. When you crank up manifold noise to the exact same scale, the face stays intact—instead, you see coherent variations in smile width, eye color, hair, and lip shape.
  • Preventing "silent" collapse in sparse spaces: In interpretable SAE concept spaces, isotropic noise accidentally triggers unrelated, dormant concepts (turning a "rose hip" activation profile into "human hand" or "tulle"), causing certified accuracy to hit 0%. Manifold smoothing stays faithful to the local embedding structure, keeping concepts coherent.
  • Out-of-distribution resilience: Even when local geometry is estimated from training data missing a semantic attribute (like mustaches or eyeglasses), those local variation directions generalize well enough to maintain strong robustness certificates on OOD test images that have the attribute.
Downstream task improvements across classification, sparse concepts, and retrieval

Key Results

At tiny noise levels ($\sigma = 0.02$), manifold and isotropic smoothing perform similarly. At larger perturbation scales ($\sigma = 0.50$ and $1.00$), isotropic smoothing collapses while manifold smoothing thrives (all evaluated without retraining the base models):

  • Classification (CelebA, $\sigma = 0.50$): Certified accuracy jumps from 45.0% (isotropic, which collapses to predicting a single class) to 92.0% (manifold).
  • Semantic Segmentation (CelebAMask-HQ, $\sigma = 0.50$): Certified pixel accuracy reaches 84.27% vs. 26.87% isotropically, while certified mIoU holds at 57.44% vs. 5.39% (preserving fine details like eyes and lips).
  • Interpretable Concept Space (ImageNet SAE, $\sigma = 0.50$): Manifold smoothing retains 63.8% certified accuracy while isotropic drops to 0.0%. Perturbed embeddings stay much closer to the original ($\ell_2$ distance of 5.15 vs. 90.27 at $\sigma = 1.0$).
  • Vision-Language Retrieval (RoCOCO, $\sigma = 0.10$): Limits Recall@1 retrieval drop to 17.20%, compared to a 93.90% drop under isotropic noise.

Limitations and Future Work

  • Canonical $\ell_2$ assumption: Finding nearest neighbors via $\ell_2$ distance works nicely for aligned faces (CelebA) and learned embeddings (CLIP, SAEs), where Euclidean distance is locally meaningful. For unaligned, raw natural images—where shifting an object by two pixels causes a massive $\ell_2$ spike—future work is needed to build transformation-equivariant local neighborhoods.
  • Compute overhead: Retrieving neighbors and running an eigen-decomposition adds per-input runtime cost, though this is mitigated by approximate nearest-neighbor search and computing the PCA basis only once per input across all Monte Carlo samples.
  • Many-class scaling & intrinsic dimension: Like standard RS, certifying predictions gets harder as the number of output classes grows. Additionally, manifolds with higher intrinsic dimensionality require denser, larger neighborhoods to accurately estimate local covariance without losing locality.

Summary updated

BibTeX
@misc{niazi2026randomized,
  author = {Daniya Niazi and Alaa Anani and Bernt Schiele and Jonas Fischer},
  title = {{Randomized Manifold Smoothing for Formal Robustness to Semantic Perturbations}},
  year = {2026},
  eprint = {2611.36126},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.36126},
}
Figure