Abstract
We introduce an efficient approach for optimization over orthogonal groups on highly parallel computation units such as GPUs or TPUs. By leveraging the compact WY (CWY) transform, we overcome the low parallelization capabilities of sequential Householder reflections. We further develop a Truncated CWY (T-CWY) approach for Stiefel manifold parametrization. Our methods provide theoretical convergence guarantees and achieve significant speedups—up to 20x over sequential methods and 1-3 orders of magnitude over matrix exponentials—while maintaining state-of-the-art performance in tasks like neural machine translation and video prediction.
Introduction
In deep learning, constraining weight matrices to be orthogonal (where $Q^T Q = I$) is a powerful technique to prevent vanishing or exploding gradients in Recurrent Neural Networks (RNNs) and to improve adversarial robustness in Convolutional Neural Networks (CNNs). However, existing optimization methods face a "critical gap": matrix exponentials and Cayley maps are computationally expensive ($O(N^3)$), while sequential Householder reflections are poorly suited for the parallel architecture of modern GPUs and TPUs. This paper bridges that gap by introducing a method that is both computationally efficient and highly parallelizable.
Methodology: The CWY Transform
The core innovation is the application of the Compact WY (CWY) transform. Instead of applying $L$ Householder reflections sequentially, the CWY transform accumulates them into a compact form: $Q = I - US^{-1}U^T$, where $U$ is a tall-and-skinny matrix and $S$ is a small, upper-triangular matrix. This reframing allows the bulk of the computation to be handled via standard, fast parallel matrix multiplications.
The authors also introduce T-CWY (Truncated CWY) for Stiefel manifolds, which is ideal for layers with differing input and output dimensions. They demonstrate this with ConvNERU, a convolutional unit that ensures stability by keeping kernels orthogonal.
Key Results
The CWY method achieves a "sweet spot" between model capacity and training speed. In experiments on TPUs, CWY provided a 20x speedup over the standard sequential Householder (HR) approach for a matrix size of 1024. Furthermore, it is 1-3 orders of magnitude faster than matrix exponential methods as the matrix size $N$ increases.
Beyond speed, the method maintains high performance. In English-to-Spanish translation (Tatoeba corpus), CWY achieved lower test perplexity than standard GRUs and LSTMs while using fewer parameters. In video prediction on the KTH dataset, ConvNERU outperformed ConvLSTM in stability and memory efficiency, using roughly 4.5x less GPU memory.
Conclusion
CWY parametrization offers a hardware-friendly solution for enforcing orthogonality in neural networks. By aligning the algorithm with the parallel nature of modern accelerators, it enables the use of orthogonal constraints in large-scale models where they were previously too expensive. Future applications could include Orthogonal Transformers and Normalizing Flows.
Summary updated