Abstract
Modern AI scaling laws suggest that larger datasets lead to better models, but the associated costs in storage and computation are immense. Data Distillation (DD) offers a solution by synthesizing a tiny "summary" dataset that retains the essential information of the original. However, DD has historically struggled with autoregressive data due to discrete token spaces and computational complexity. We present FARZI, a framework specifically designed for autoregressive tasks like language modeling and sequential recommendation. FARZI utilizes latent space factorization and a memory-efficient reverse-mode Adam optimizer to distill datasets to as little as 0.1% of their original size while maintaining or even exceeding full-data performance.
Introduction
The "scaling laws" of modern AI suggest that more data equals better models. However, massive datasets are expensive to store, process, and train on, and they often contain significant redundancy or noise. Data Distillation (DD) aims to solve this by synthesizing a tiny "summary" dataset that captures the essential information needed to train a model to the same (or better) accuracy as the original.
While DD has seen success in computer vision, it struggles with autoregressive data (sequences like text or user clicks). The challenges are twofold:
- Discrete Spaces: Sequences consist of discrete tokens from huge vocabularies, making gradient-based optimization difficult.
- Computational Complexity: Standard DD requires "unrolling" the training process, which leads to a memory explosion when dealing with long sequences and many training steps.
Methodology
FARZI (meaning "fake" or "synthetic") overcomes these hurdles through three primary innovations:
Latent Space Factorization
Instead of distilling raw tokens, FARZI distills a low-rank latent summary and a "token-decoder" matrix. This approach makes the optimization independent of the vocabulary size and provides implicit regularization, preventing the distilled data from over-fitting to specific model architectures.
Efficient Reverse-Mode Adam
Most DD methods rely on SGD because it is easier to differentiate. However, Adam is often superior for training autoregressive models. FARZI derives a memory-efficient version of the Adam optimizer's reverse-mode differentiation using Hessian-Vector Products. This technique keeps the memory footprint constant, regardless of the number of training steps unrolled during distillation.
Trajectory Initialization
Rather than starting from scratch, FARZI leverages a small number of pre-trained model trajectories from the real dataset to initialize the distillation process, significantly improving sample efficiency.
Experimental Setup
The researchers evaluated FARZI across two primary domains:
- Sequential Recommendation: Benchmarked on MovieLens-100k, MovieLens-1M, Amazon Magazine, and Netflix.
- Language Modeling (LM): Benchmarked on the Penn Treebank (PTB) corpus.
Key Results and Insights
FARZI consistently outperforms traditional data-reduction techniques like random sampling and "head" sampling (keeping the longest sequences).
Extreme Compression
On the Netflix dataset, FARZI achieved 98–120% of the full-data performance using only 0.1% of the original data. This suggests that the distillation process acts as a powerful "denoiser," stripping away redundant or confusing information and leaving only the most "instructive" patterns.
The Role of Adam
Contrary to previous meta-learning research that favored SGD, this study finds that using Adam in the "inner loop" (the process of training on distilled data) is critical for performance in autoregressive tasks.
Cross-Architecture Generalization
Data distilled using one model (e.g., a Transformer "teacher") can be used to effectively train entirely different architectures (e.g., an RNN or MLP "student"). This indicates that the distilled data captures fundamental task patterns rather than model-specific quirks.
Conclusion
FARZI represents a significant advancement in data distillation for sequential data. By achieving high performance with extreme compression, it paves the way for more efficient model training and potentially improved privacy by removing personally identifiable information during the distillation process. Future work will focus on scaling the approach to longer sequences and foundation-model scales.
Summary updated