Abstract
In machine learning security, one is often faced with the problem of removing outliers from a given set of high-dimensional vectors when computing their average. For example, many variants of data poisoning attacks produce gradient vectors during training that are outliers in the distribution of clean gradients, which bias the computed average used to derive the ML model. Filtering them out before averaging serves as a generic defense strategy. Byzantine robust aggregation is an algorithmic primitive which computes a robust average of vectors, in the presence of an $\epsilon$ fraction of vectors which may have been arbitrarily and adaptively corrupted, such that the resulting bias in the final average is provably bounded. In this paper, we give the first robust aggregator that runs in quasi-linear time in the size of input vectors and provably has near-optimal bias bounds. Our algorithm also does not assume any knowledge of the distribution of clean vectors, nor does it require pre-computing any filtering thresholds from it. This makes it practical to use directly in standard neural network training procedures. We empirically confirm its expected runtime efficiency and its effectiveness in nullifying 10 different ML poisoning attacks.
The Challenge of High-Dimensional Aggregation
In distributed and federated learning, a central server aggregates gradient updates from many clients. However, if some clients are malicious (Byzantine), they can send "poisoned" gradients designed to stall training, degrade accuracy, or insert backdoors. To counter this, researchers use robust aggregators—algorithms that compute a "clean" average by filtering out outliers.
The primary challenge lies in the "curse of dimensionality." Modern models have millions or billions of parameters ($d$). Existing solutions generally fall into two categories: weak and strong aggregators. Weak aggregators, like the Median, are computationally efficient but suffer from error bounds that grow with the square root of the dimension ($\sqrt{d}$), making them vulnerable in high-dimensional spaces. Conversely, strong aggregators provide near-optimal, dimension-independent error bounds but are computationally prohibitive, often scaling quadratically with dimensions ($O(nd^2)$).
RandEigen: Bridging the Gap
The authors introduce RandEigen, an iterative filtering algorithm that achieves the theoretical "gold standard" of dimension-independent bias bounds while maintaining quasi-linear computational complexity ($\tilde{O}(nd)$). RandEigen breaks the $O(d^2)$ bottleneck using three key innovations:
- Randomized Dimensionality Reduction: It utilizes the Johnson-Lindenstrauss (JL) transform to project high-dimensional gradients into a much smaller subspace ($O(\log d)$ dimensions). This projection preserves vector distances, allowing for outlier identification without processing the full-dimensional data.
- Power Iteration for Eigenvectors: Instead of an expensive full eigendecomposition, RandEigen uses Power Iteration to quickly estimate the dominant eigenvector—the direction of maximum variance where attackers typically hide their malicious updates.
- Threshold-Free Stopping: Unlike traditional filtering that requires pre-computed thresholds based on clean data variance, RandEigen uses a convergence check. It stops filtering when the dominant eigenvalue stabilizes, indicating that remaining vectors are statistically consistent.
Empirical Evaluation and Results
The effectiveness of RandEigen was tested against 10 different poisoning attacks, including sophisticated adaptive attacks like HiDRA, across standard benchmarks like MNIST, Fashion-MNIST, and SST2 (using BERT).
Key Findings:
- Performance: RandEigen is 15x to 300x faster than previous strong defenses as dimensionality increases, scaling quasi-linearly with $d$.
- Robustness: It successfully mitigated all 10 evaluated attacks. Notably, it maintained high accuracy against the HiDRA attack, which caused baseline defenses to drop in accuracy by over 80%.
- Utility and Efficiency: In clean settings, the accuracy drop is negligible (less than 2%). Furthermore, by avoiding massive $d \times d$ covariance matrices, it is significantly more memory-efficient than traditional strong aggregators.
Conclusion
RandEigen represents a significant step forward in making Byzantine robust aggregation practical for modern, high-dimensional neural networks. By combining randomized projections with efficient power iteration, it provides strong security guarantees without the computational overhead that previously limited such defenses to small-scale problems. Future work may address "slow-drip" attacks where tiny, non-outlier biases accumulate over long training periods.
Summary updated