Randomized smoothing is a defense technique that transforms any base classifier into a certifiably robust smoothed classifier. The method adds isotropic Gaussian noise to the input and aggregates predictions, providing a formal guarantee that the output will remain constant within a mathematically verified L2-radius.
Glossary
Randomized Smoothing

What is Randomized Smoothing?
A technique that constructs a certifiably robust classifier by adding random noise to inputs and returning the most probable prediction under that noise distribution.
This approach provides a probabilistic certified robustness guarantee without requiring modifications to the underlying model architecture. The certified radius is derived analytically from the noise level and the margin of the majority prediction, making it a scalable defense against evasion attacks in high-dimensional signal spaces.
Key Features of Randomized Smoothing
Randomized smoothing constructs a provably robust classifier by adding isotropic Gaussian noise to inputs and returning the most probable prediction under that noise distribution. This technique provides a certified radius within which no adversarial perturbation can alter the prediction.
Certified Radius Guarantee
The core output of randomized smoothing is a certified L2-radius around an input point. Within this mathematically verified bound, the smoothed classifier's prediction is provably invariant to any adversarial perturbation. The radius is computed using the Neyman-Pearson lemma and depends on the margin of the majority class probability under the noise distribution. A higher probability for the top class yields a larger certified radius, providing a direct trade-off between accuracy and robustness.
Monte Carlo Prediction Procedure
At inference time, the smoothed classifier does not operate on a single input. Instead, it generates n copies of the input corrupted with independent Gaussian noise and runs the base classifier on each. The final prediction is the majority vote across these n noisy samples. A larger sample size n provides a tighter statistical estimate of the true underlying probability, enabling more precise certification. Typical values range from 10,000 to 100,000 samples for certification.
Clopper-Pearson Confidence Bounds
To convert the Monte Carlo vote counts into a rigorous guarantee, randomized smoothing employs the Clopper-Pearson binomial confidence interval. This statistical method provides a lower bound on the true probability of the top class with a user-specified confidence level α (typically 0.001). The certified radius is then derived from this lower probability bound, ensuring that the guarantee holds with probability at least 1-α over the randomness of the sampling procedure.
Model-Agnostic Defense
Unlike adversarial training or gradient masking, randomized smoothing is a wrapper method that does not require modifying the base classifier's architecture or training procedure. It treats the underlying model as a black box, making it compatible with any differentiable or non-differentiable classifier. This property enables robustness certification for complex architectures including ensembles, decision trees, and proprietary models where internal access is unavailable.
Noise Level Trade-off
The standard deviation σ of the added Gaussian noise is a critical hyperparameter controlling the robustness-accuracy trade-off:
- Larger σ: Increases the certified radius but degrades the base classifier's accuracy on clean inputs
- Smaller σ: Preserves clean accuracy but provides weaker robustness guarantees Optimal σ selection often involves cross-validation on a held-out set, balancing the desired certification level against acceptable performance on unperturbed data.
Limitations and Extensions
Standard randomized smoothing certifies only L2-norm bounded perturbations and can produce loose bounds when the base classifier is not robust to Gaussian noise. Extensions address these limitations:
- SmoothAdv: Combines smoothing with adversarial training for tighter bounds
- MACER: Optimizes the certified radius directly during training
- Denoised Smoothing: Prepends a denoiser to improve clean accuracy
- L1 and L∞ variants: Extend certification to other perturbation norms
Frequently Asked Questions
Clear, technically precise answers to the most common questions about constructing certifiably robust classifiers using randomized smoothing.
Randomized smoothing is a technique that constructs a certifiably robust classifier from an arbitrary base classifier by adding random noise to inputs and returning the most probable prediction under that noise distribution. The process works by creating a smoothed classifier g(x) that outputs the class which the base classifier f is most likely to return when Gaussian noise is added to the input x. Formally, g(x) = argmax_c P(f(x + ε) = c) where ε ~ N(0, σ²I). This transforms the discrete decision boundary of f into a soft, probabilistic boundary, providing a provable guarantee that the prediction will not change for any perturbation within a certified radius. The key insight is that if the top class probability is sufficiently high, the decision is stable under bounded input perturbations.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the core concepts surrounding certified adversarial robustness, from the foundational attacks that necessitate these defenses to the formal verification methods that provide mathematical guarantees.
Certified Robustness
A formal, mathematical guarantee that a classifier's prediction will remain constant for any input perturbation within a verified bound. Unlike empirical defenses, certified robustness provides a provable lower bound on the model's accuracy against all possible attacks within a defined threat model. Randomized smoothing is the most scalable technique for achieving this on deep networks.
Adversarial Perturbation
A carefully crafted, often imperceptible noise pattern added to an input signal to cause a machine learning model to misclassify it. In the context of signal classification, this could be a subtle waveform added to an IQ sample that causes an automatic modulation classifier to mistake a QPSK signal for 16-QAM. Defenses like randomized smoothing are designed to be provably robust against these perturbations.
Projected Gradient Descent (PGD)
A powerful multi-step iterative attack used as a standard benchmark for evaluating empirical and certified defenses. PGD generates an adversarial example by repeatedly taking gradient steps to maximize the loss and then projecting the result back onto an epsilon-ball to constrain the perturbation magnitude. It is the primary attack that certified defenses like randomized smoothing aim to guarantee against.
Adversarial Training
A defensive technique that injects adversarial examples into the training dataset to improve a model's empirical robustness. While it does not provide a formal guarantee like randomized smoothing, it is often used in conjunction with it. A model can be adversarially trained and then smoothed at inference time to combine strong empirical and certified accuracy.
Neural Network Verification
The formal process of proving that a neural network's output satisfies a specific property for all inputs within a defined adversarial budget. While exact verification is NP-complete, incomplete verifiers provide sound bounds. Randomized smoothing is a probabilistic alternative that provides a statistical certificate without needing to analyze the complex internal weights of the network.
Conformal Prediction
A model-agnostic framework that produces prediction sets with a finite-sample, distribution-free guarantee of marginal coverage. While distinct from randomized smoothing, both are distribution-free statistical techniques that provide formal guarantees. Conformal prediction controls the error rate, while randomized smoothing certifies robustness to input perturbations.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us