Introduction
Cross-device Federated Learning (FL) enables training models on millions of edge devices without user data ever leaving the source. However, this decentralized approach introduces significant technical hurdles, primarily centered around device memory limits and the inherent instability of standard language model architectures when trained with non-adaptive optimizers. This paper proposes scale-invariant (SI) architectures to bridge the gap between memory-efficient training and high-performance language modeling.
The Challenge: Memory and Optimization
Edge devices like smartphones have limited RAM, making memory-intensive adaptive optimizers like Adam impractical for large-scale FL. While Stochastic Gradient Descent (SGD) is memory-efficient, standard LSTMs and Transformers are notoriously difficult to train with it, often leading to slow convergence or training instability. The authors address this by modifying the model architecture itself to be "SGD-friendly" through scale invariance.
Scale-Invariant Architectures
A function is scale-invariant if $f(ax) = f(x)$ for any scalar $a > 0$. By making models less sensitive to input and weight magnitudes, gradients become more stable for non-adaptive optimizers.
SI-CIFG
The authors modified the Coupled Input Forget Gate (CIFG) variant of the LSTM by:
- Replacing Activations: Swapping
sigmoidwithReLUandtanhwith linear activations. - Max-Normalization (MaxN): To prevent numerical explosion without squashing functions, they introduced a normalization layer: $\text{MaxN}(x)_i = \frac{x_i}{\max_{j} |x_j|}$.
SI-Transformer
Following similar principles, the authors extended scale-invariant Transformers to the decoder-only setting. This involves replacing the softmax in attention mechanisms with a ReLU followed by row-wise normalization, ensuring the model remains robust to the gradient clipping required by Differential Privacy (DP).
Experimental Results
The researchers evaluated these architectures across Stack Overflow data, live production keyboard data, and the C4 corpus.
Key Findings
- Superior Accuracy: On Stack Overflow, SI-CIFG achieved 33.6% accuracy, outperforming the standard CIFG (33.1%).
- Stability in Production: In live production tests, standard CIFG models often diverged after 2,000 rounds. In contrast, SI-CIFG remained stable, reaching 23.4% accuracy compared to only 18.2% for a standard Transformer.
- DP-FL Synergy: Scale-invariant models are naturally more robust to the update clipping and noise addition required for Differential Privacy. Under a privacy budget of $z$-CDP = 1.05, SI-CIFG consistently outperformed the baseline in both perplexity and accuracy.
Conclusion
By shifting the burden of training stability from the optimizer to the model architecture, the authors enable high-performance language modeling on resource-constrained edge devices. Scale-invariant architectures provide a robust solution for Federated Learning, offering faster convergence, better final utility, and improved privacy-utility trade-offs under Differential Privacy constraints.
Summary updated