通过稀疏率 reduction 的白盒 Transformer:压缩即一切?
摘要
在本文中,我们主张表示学习的一个自然目标是将数据(例如令牌集合)的分布压缩并变换为支持在 incoherent 子空间上的低维高斯混合。此种表示的优劣可由一种称为稀疏率 reduction 的原则性度量来评估,该度量同时最大化所学表示的内在信息增益与外在稀疏性。从这一视角,包括 transformer 在内的流行深度网络架构可被视为实现对该度量的迭代优化方案。特别地,我们从该目标各部分的交替优化推导出 transformer 块:多头自注意力算子通过实现对特征编码率的近似梯度下降步骤来压缩表示,随后的多层感知机则稀疏化特征。这导出一类名为 CRATE 的白盒类 transformer 深度网络架构,其在数学上完全可解释。我们通过去噪与压缩之间的新颖联系表明,上述压缩编码的逆可由同一类 CRATE 架构实现。因此,所推导的白盒架构对编码器与解码器均是通用的。实验表明,尽管这些网络简单,它们确实学习到大尺度真实世界图像与文本数据集的表示压缩与稀疏化,并取得了非常接近高度工程化的基于 transformer 的模型:ViT、MAE、DINO、BERT 与 GPT2 的性能。我们相信所提出的计算框架从数据压缩的统一视角展示了在弥合深度学习理论与实践鸿沟上的巨大潜力。代码见:https://ma-lab-berkeley.github.io/CRATE 。
引用
@article{arxiv.2311.13110,
title = {White-Box Transformers via Sparse Rate Reduction: Compression Is All There Is?},
author = {Yaodong Yu and Sam Buchanan and Druv Pai and Tianzhe Chu and Ziyang Wu and Shengbang Tong and Hao Bai and Yuexiang Zhai and Benjamin D. Haeffele and Yi Ma},
journal= {arXiv preprint arXiv:2311.13110},
year = {2024}
}
备注
Accepted at Journal of Machine Learning Research. This paper integrates the works arXiv:2306.01129 and arXiv:2308.16271 into a complete story. In this paper, we improve the writing and organization, and also add conceptual, empirical, and theoretical improvements over the previous work. V2: small typo fixes/formatting improvements. V3: improvements from journal revisions. V4: fix figures