Linear layers hold most of a transformer's parameters. We replace each linear layer with one that stores $K$ out of $mn$ two-dimensional DCT coefficients per weight matrix and reconstructs the full matrix through an inverse DCT at every forward pass; the $K$ coefficients are the trainable parameters. A 4-layer, 128-dim transformer trained from scratch on character-level Shakespeare reaches validation loss $1.604$ at $K = mn/2$, against $1.580$ for a standard dense baseline -- a gap of $+0.024$ at half the trainable parameter count, within the terminal-epoch variation of the dense run. A rank-48 LoRA factorization at the same trainable parameter count reaches only $1.801$ ($+0.221$). The structural advantage of sparse-coefficient over low-rank parameterizations at matched $K$ is qualitative. We identify rank flexibility as the mechanism. A random orthonormal basis matches the DCT within noise at $K = mn/2$, and a compression sweep through $K = mn/10$ and $K = mn/20$ shows that subspaces that can host high-rank matrices keep the loss low, while subspaces that flatten into a low-rank block (zigzag-selection variants) converge onto the observed stable rank \emph{and} the loss line of the rank-48 LoRA reference in lock-step. Among these orthonormal bases, the DCT is preferred because its separable fast transform admits a fused reconstruction kernel: the materialized weight matrix never leaves on-chip memory, so the parameter saving translates into a bandwidth saving as well.


翻译:线性层占据了Transformer大部分参数。我们将每个线性层替换为:针对每个权重矩阵,仅存储$mn$个二维DCT系数中的$K$个,并在每次前向传播时通过逆DCT重建完整矩阵;这$K$个系数即为可训练参数。在字符级莎士比亚数据集上从零训练的四层128维Transformer,在$K = mn/2$时达到验证损失$1.604$,而标准稠密基线为$1.580$——即在可训练参数数量减半的条件下差距仅为$+0.024$,且此差距在稠密运行终期迭代的波动范围内。相同可训练参数数量下的秩-48 LoRA分解仅达到$1.801$($+0.221$)。在相等$K$条件下,稀疏系数参数化相比低秩参数化具有结构性优势。我们将秩灵活性识别为其中的机制。当$K = mn/2$时,随机标准正交基在噪声范围内与DCT性能相当;而通过$K = mn/10$至$K = mn/20$的压缩扫描表明:能够容纳高秩矩阵的子空间可保持低损失,而退化为低秩块的子空间(锯齿形选择变体)会同步收敛到观测到的稳定秩与秩-48 LoRA参考的损失线。在这些标准正交基中,DCT因具备可分离快速变换而备受青睐——其实体化权重矩阵始终驻留于片上存储器,从而参数节约可直接转化为带宽节约。

0
下载
关闭预览

相关内容

何恺明&Lecun新论文CVPR2025《无需归一化的 Transformer》
专知会员服务
18+阅读 · 2025年3月15日
非Transformer不可?最新《状态空间模型(SSM)》综述
专知会员服务
75+阅读 · 2024年4月16日
Transformer它就是个支持向量机
专知会员服务
38+阅读 · 2023年9月7日
【CVPR2021】用Transformers无监督预训练进行目标检测
专知会员服务
58+阅读 · 2021年3月3日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
从头开始了解Transformer
AI科技评论
25+阅读 · 2019年8月28日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
多图带你读懂 Transformers 的工作原理
AI研习社
10+阅读 · 2019年3月18日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月2日
VIP会员
相关主题
最新内容
面向国防作战的最佳自主与蜂群无人机技术
专知会员服务
3+阅读 · 今天8:04
《异构人类团队的协作决策过程混合建模研究》
专知会员服务
3+阅读 · 今天7:59
博士论文 | 面向大模型推理的内存高效算法
专知会员服务
3+阅读 · 7月27日
美空军新型反无人机部队初探
专知会员服务
7+阅读 · 7月27日
《防空交战流程的概率建模研究》
专知会员服务
10+阅读 · 7月27日
ICML 2026 教程 | 数值优化理论还重要吗?
专知会员服务
6+阅读 · 7月26日
ICM 2026 | 陶哲轩:人工智能时代的数学
专知会员服务
9+阅读 · 7月26日
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员