Clustered alpha-smoothing mixture wrapper
Implementation & benchmark of arXiv:2608.12037 — Clustered Randomized Smoothing for Stochastic Prediction Functions
Source paper: Clustered Randomized Smoothing for Stochastic Prediction Functions arXiv:2608.12037 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Wrap a stochastic neural predictor with a robust multimodal aggregation procedure: sample the predictor at perturbed inputs, cluster the resulting outputs, trim an alpha-fraction of outliers separately inside every cluster, and return a weighted mixture rather than one global average. This should preserve distinct plausible modes while suppressing adversarial or heavy-tailed samples that would otherwise distort the prediction.
Formulas
Mathematical statement
Definition 2 defines the alpha-smoothed predictor from N i.i.d. noisy outputs. Let h_w:X->Y be a stochastic predictor, x in X the input, epsilon_i sampled independently from P_epsilon, and H_i=h_w(x+epsilon_i) the i-th prediction. For alpha in [0,1/2), let k=floor(alpha N); after sorting outputs element-wise, global alpha-smoothing is the coordinate-wise trimmed mean ilde{H}_{N,alpha}(x)=(N-2k)^{-1}\sum_{i=k+1}^{N-k}H_{(i)}. The clustered extension applies the same operation locally. Given a clustering map c:{1,...,N}->{1,...,K}, cluster C_j={i:c(i)=j}, size n_j=|C_j|, and k_j=floor(alpha n_j), define the local trimmed center m_j=(n_j-2k_j)^{-1}\sum_{r=k_j+1}^{n_j-k_j}H^{(j)}_{(r)}, where H^{(j)}_{(r)} are coordinate-wise order statistics of the outputs in C_j. The smoothed predictor is a mixture with weights pi_j=n_j/N: p_cluster(y|x)=\sum_{j=1}^K pi_j p_j(y|x), where p_j is represented by retained cluster samples or by a Gaussian with center m_j and covariance estimated from those retained samples. The useful property is that trimming removes within-mode outliers while clustering prevents averaging points from different modes. The extracted text does not provide the paper's explicit probability lower-bound theorem, so certification constants must be derived or empirically calibrated rather than assumed.
Implementation notes
(1) Exact integration point: place this module after any stochastic predictor that can be queried repeatedly, such as a trajectory policy, diffusion denoiser, probabilistic world model, or multimodal regression network. At inference time, draw N perturbations epsilon_i around input x, run the existing model once per perturbation, and aggregate its output trajectories or actions. Do not change the neural network initially. (2) Pseudocode: sample H_i=h_w(x+epsilon_i) for i=1,...,N; cluster {H_i} into K clusters using k-means, a Gaussian mixture model, or a cheap farthest-point algorithm; for each cluster C_j, set n_j=|C_j| and k_j=floor(alpha*n_j); sort each output coordinate within C_j, retain indices R_j after removing the lowest and highest k_j values, compute m_j=mean(H_i for i in R_j), and compute Sigma_j from the retained samples; return mixture weights pi_j=n_j/N and components Normal(m_j,Sigma_j+lambda I). If the downstream controller needs one action, select the component with maximum pi_j, sample from the mixture, or use a risk-sensitive rule that rejects components with high predicted collision probability. (3) The mathematical quantities are N, alpha, local trimmed means, mixture weights, and covariance estimates. The clustering algorithm, K, perturbation distribution, and covariance floor lambda are empirical design choices. Require n_j>2*k_j; merge small clusters into their nearest larger cluster. For vector trajectories, cluster on a learned low-dimensional embedding or endpoint features, then trim coordinates in the original output space. (4) First cheap experiment: use a small stochastic MLP or diffusion trajectory predictor on a synthetic two-mode 2-D regression dataset with adversarial input perturbations, comparing ordinary Monte Carlo averaging, global alpha-smoothing, and clustered alpha-smoothing at equal N. Then test a compact trajectory model on a driving or quadrotor benchmark. Measure Wasserstein distance to the target distribution, mode coverage, collision rate, and runtime. Success is lower Wasserstein error and fewer unsafe averaged trajectories at the same sample budget, without a large increase in inference latency.
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a fixed-seed NumPy implementation of global coordinate-wise trimming and clustered trimmed mixture aggregation, with mixture weights and retained-sample bookkeeping. Weight normalization matched the mathematical claim to 2.2e-16, and clustering preserved two modes while improving error at q=0.05 contamination (0.027 versus 0.126 for global trimming and 0.351 for the ordinary mean). However, the separation sweep did not show the predicted global error scaling, and clustered trimming became worse than global trimming at q>=0.10, so the required mechanism predictions were not sufficiently confirmed.
- Agent confidence
- 8/10
- Baseline
- Ordinary mean error: 0.011, 0.351, 0.706, 1.062, 1.768 for contamination q=0,.05,.10,.15,.25; global-trim error: 0.011, 0.126, 0.275, 0.563, 1.342.
- Idea
- Clustered-trim center error: 0.017, 0.027, 0.401, 0.785, 1.470 for q=0,.05,.10,.15,.25; two components were retained with average smallest mixture weight 0.50, 0.476, 0.449, 0.425, 0.373. Weight-sum maximum absolute error was 2.22e-16.
Limitations: This was a synthetic 2-D experiment, not a neural stochastic predictor or trajectory benchmark. Clustering used known-separation nearest-center assignments rather than learned k-means, covariance/Gaussian sampling was not benchmarked, runtime/FLOPs/Wasserstein distance and safety metrics were not tested, and contamination was injected across modes rather than exclusively within one cluster.
How to run: python3 clustered_alpha_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- clustered_alpha_experiment.py 5.8 KB View Raw
- report.md 1.7 KB View
- results.json 3.3 KB View Raw