Introduction
Large Language Models (LLMs) such as BERT and Transformer-XL have revolutionized natural language processing but impose a significant "computational tax" due to their size and latency. Pruning is a common strategy to mitigate these costs, yet it often faces a trade-off: unstructured pruning maintains accuracy but lacks hardware speedup, while structured pruning offers speed at the cost of significant performance degradation. Researchers from ASAPP have introduced FLOP (Factorized Low-rank Pruning), a novel approach that bridges this gap by decomposing weight matrices into low-rank factors and adaptively pruning them during training.
Methodology: Factorized Low-rank Pruning
FLOP reparameterizes a weight matrix $W$ as the product of two smaller matrices, $P$ and $Q$ ($W \approx PQ$). This approach allows for a more "surgical" reduction in model capacity compared to removing entire rows or columns.
Key technical innovations include:
- Rank-1 Pruning: Each rank-1 component of the factorized matrix is assigned a mask variable. The model learns to identify and discard non-essential components during the training process.
- Differentiable Masking: By employing the "Hard Concrete" distribution and the reparameterization trick, the discrete decision to keep or prune a component becomes differentiable. This enables the model to optimize its own architecture via standard gradient descent.
- Augmented Lagrangian Optimization: To achieve specific target sizes, FLOP uses the Augmented Lagrangian method. This acts as a "target dial," allowing researchers to enforce precise compression constraints (e.g., exactly 50% of the original parameters).
Experimental Setup
The effectiveness of FLOP was evaluated across several standard NLP benchmarks:
- Wiki-103: A large-scale word-level language modeling dataset.
- Enwik8: A character-level Wikipedia dataset for testing fine-grained structural preservation.
- GLUE Benchmarks: Including SST2, MRPC, STS-B, and QNLI, to assess performance on downstream tasks like sentiment analysis and natural language inference using compressed RoBERTa models.
Key Results and Insights
FLOP demonstrates superior performance across multiple architectures and tasks. A key insight is that low-rank factorization preserves the mathematical "shape" of data transformations better than simple row/column deletion. Furthermore, FLOP naturally implements "adaptive" embeddings, allocating more dimensions to frequent words and fewer to rare ones automatically.
Performance on Wiki-103
On the Wiki-103 dataset, FLOP achieved 50% compression with a minimal perplexity increase of only 0.8 points. As shown in the table below, FLOP-based methods consistently outperform traditional techniques like FAC and AGP at various compression levels.
BERT/RoBERTa Compression
The method also scales effectively to pre-trained transformer models. A RoBERTa-base model was compressed by 35% while retaining nearly 99% of its original performance across GLUE tasks.
Beyond accuracy, FLOP delivers tangible hardware benefits. The authors reported real-world inference speedups of 1.5x to 2.2x on standard CPUs for both SRU and Transformer-XL architectures, without requiring specialized sparse kernels.
Limitations and Future Directions
While effective, FLOP requires an initial Singular Value Decomposition (SVD) step when applied to models not originally trained with factorization, which temporarily increases parameter count. Additionally, compression rates for BERT were somewhat constrained because certain embedding layers were not factorized. Future work may involve factorizing entire embedding layers (similar to ALBERT) and combining FLOP with techniques like quantization or knowledge distillation to further enhance efficiency.
Summary updated