TL;DR
DARTSformer introduces a memory-efficient approach to Differentiable Architecture Search (DARTS) for Transformers by utilizing multi-split reversible networks. By reconstructing intermediate activations during backpropagation instead of storing them, the authors enable searching at the full scale of the target model, achieving state-of-the-art translation performance with an order of magnitude less computational cost than evolutionary search methods.
What Problem Does This Paper Address?
Neural Architecture Search (NAS) has become a powerful tool for discovering high-performing models, but it is notoriously resource-heavy. Gradient-based methods like DARTS are generally more efficient than evolutionary algorithms, but they face a major hurdle with Transformers: memory consumption.
In DARTS, a "super network" contains all candidate operations (e.g., different types of convolutions or attention) simultaneously. To calculate gradients, the system must store the outputs of every candidate operation for every layer. As shown in Figure 1, standard DARTS runs out of memory (OOM) on a single GPU once the hidden size exceeds 400. Consequently, researchers are often forced to search using tiny models and then scale them up for evaluation—a "depth/width gap" that often leads to suboptimal final architectures.
Methods
The authors propose DARTSformer, which integrates two key innovations:
- Multi-split Reversible Networks: Inspired by RevNets, the architecture is designed so that the input of a layer can be mathematically reconstructed from its output. The authors split the input $X$ into $n$ parts and apply operations in a way that allows for this inversion.
- Backpropagation-with-Reconstruction: During the backward pass, the model doesn't look up stored activations. Instead, it reconstructs them on-the-fly from the last layer's output. This drastically reduces the memory footprint, effectively halving the memory required compared to vanilla DARTS.
To make this work for architecture search, the authors devised a specific search node structure within each split of the reversible network, as illustrated in Figure 2 and Figure 3. Each node performs a weighted average of candidate operations (Standard/Dynamic Convs, Self/Cross Attention, GLU, FFN, etc.) during the search phase.
Datasets
The researchers evaluated DARTSformer on three standard sequence-to-sequence benchmarks:
- WMT’14 English-German (En-De): 4.5 million sentence pairs (used for the primary search).
- WMT’14 English-French (En-Fr): 36 million sentence pairs.
- WMT’18 English-Czech (En-Cs): 15.8 million sentence pairs.
Key Insights and Ideas
- Size Matters During Search: The most critical finding is that searching with a large hidden size (matching the final model) yields significantly better results than searching small and scaling up. Table 5 in the paper shows that a model searched at "tiny" size (d=120) achieves a BLEU score of 24.2, while searching at "DARTSformer" size (d=960) hits 28.4.
- Efficiency vs. Cost: DARTSformer achieves performance comparable to the Evolved Transformer (ET) but at a fraction of the cost. ET requires massive evolutionary search ($150k USD, 200 TPUs), while DARTSformer costs roughly $1.25k and runs on 8 V100 GPUs.
- Reversibility as a Regularizer: Interestingly, the reversible constraint doesn't just save memory; the resulting architectures (see Figure 4) generalize well across different language pairs, suggesting the learned motifs are robust.
Key Results
- Parameter Efficiency: At a medium model size, DARTSformer matches the translation quality of the original "big" Transformer while using 69% fewer parameters.
- Performance Gains: As shown in Figure 5, DARTSformer consistently outperforms standard Transformers across all model sizes, with the most pronounced gains in resource-constrained (smaller) settings.
- SOTA Comparison: On WMT'14 En-De, the "big" DARTSformer achieved 29.8 BLEU, surpassing both the standard Transformer (29.1) and the Evolved Transformer (29.3).
Limitations and Future Work
- Computational Overhead: While memory-efficient, the reconstruction process adds roughly 33% more add-multiply operations during the backward pass, making the search slightly slower per iteration than a non-reversible equivalent (if one could fit in memory).
- Split Sensitivity: The authors found that increasing the number of splits ($n$) too much actually hurts performance and search convergence. The best results were achieved with the smallest possible splits (2 for encoder, 3 for decoder).
- Future Directions: The authors plan to explore applying this memory-efficient search to other architectures beyond Transformers and to a wider variety of tasks.
Summary updated