Abstract
Coded-smoothing is a novel regularization module inspired by distributed "coded computing" that improves both model generalization and adversarial robustness. By processing weighted linear combinations of data through a spline-based encoding/decoding framework, it enforces higher-order smoothness and enables a randomized inference technique that effectively "blinds" gradient-based adversarial attacks. This approach provides a robust defense without the massive computational cost of traditional adversarial training.
Introduction
Deep neural networks are notoriously overparameterized, which often leads to two major issues: overfitting (poor generalization to unseen data) and brittleness (vulnerability to tiny, adversarial perturbations). While classical techniques like weight decay or dropout help, recent "data-centric" methods like Mixup have shown promise by training on interpolations of data points. However, most existing methods are either limited to supervised learning or only enforce simple linear smoothness between pairs of points.
Coded-Smoothing addresses these gaps by creating a flexible, higher-order smoothing mechanism that works across both supervised and unsupervised tasks. It leverages principles from coding theory to ensure that the learned function remains smooth across a manifold defined by complex data combinations.
Methodology
The Coded-Smoothing Module
The core of the framework is the Coded-Smoothing Module, which processes data in three distinct stages:
- Encoding: A batch of $K$ input samples is mapped to a set of "encoding points." Using natural cubic splines, the module generates $N$ "coded samples" ($N > K$). Each coded sample is a unique, weighted linear combination of all inputs in the batch.
- Computation: These $N$ coded samples are passed through the target neural network layers.
- Decoding: A second spline-based process reconstructs estimates of the original outputs from the results of the coded computation.
Training Strategy
The authors employ a dual-path architecture to integrate this module. One path processes the raw data to calculate a standard loss, while a parallel "coded path" utilizes the module. A penalty term encourages the outputs of the coded path to match the original path, effectively forcing the network to maintain smoothness across the manifold defined by the coded combinations.
Randomized Coded Inference (RCI)
At test time, the module can randomly shuffle the input batch before encoding. Because the specific "mix" depends on a sample's position in the batch, a gradient-based attacker cannot easily calculate the precise gradients needed to craft an adversarial example, as the "target" is constantly shifting due to this order-invariance.
Key Insights
- Higher-Order Smoothness: Unlike Mixup, which encourages the model to behave linearly between two points, Coded-Smoothing uses splines to enforce a much richer, higher-order smoothness constraint across the entire batch.
- Label-Free Regularization: Because the smoothing happens at the representation level rather than the label level, it works for GANs and other unsupervised models where label-dependent methods typically struggle.
- Efficiency: The module is non-parametric (no new weights to learn) and uses efficient B-spline representations, resulting in minimal computational overhead during training.
Experimental Results
The authors evaluated Coded-Smoothing across several standard benchmarks, including CIFAR-10/100, TinyImageNet, and WGAN-GP on CelebA.
- Generalization: On TinyImageNet (ResNet50), Coded-Smoothing achieved 67.1% accuracy, outperforming both standard Empirical Risk Minimization (62.9%) and Mixup (65.4%).
- Adversarial Robustness: The combination of Coded-Smoothing and RCI showed massive gains. Under a 100-step PGD attack on CIFAR-10, standard Mixup accuracy drops to near 0%, while Coded-Smoothing maintains 27.7% to 37.4% accuracy.
- Generative Quality: When applied to WGAN-GP on the CelebA dataset, it improved the Fréchet Inception Distance (FID) from 28.22 to 24.58, indicating higher-quality image generation.
Conclusion and Future Work
Coded-Smoothing successfully bridges coding theory and deep learning to provide a robust, efficient regularization framework. While effective, the module currently depends on batch processing (requiring a batch size $K' \ge 4$ for spline fitting), which may limit some real-time, single-sample applications. Future work may explore different encoding functions beyond cubic splines and investigate scaling to larger datasets like full ImageNet.
Summary updated