通过频谱分解压缩大模型参数,实现高效低冗余的文本建模。
Structured Multidimensional Representation Learning for Large Language Models
- 将嵌入空间重构为频谱张量块,分拆注意力与前馈操作于变换域。
- 在IMDB上参数减少75%仍保持竞争力,AG~News上压缩4倍后性能回归。
- 适合追求模型轻量化且需保持精度的NLP部署场景。
Transformer架构在模式识别与自然语言处理任务中表现卓越,但其扩展伴随参数量激增与嵌入维度冗余。本文提出基于三阶张量L-积的结构化频谱分解方法,将标记表示重塑为频谱张量切片,并在变换域执行注意力与前馈运算,构建出张量化Transformer(L-Transformer)。该架构将编码器分解为p个独立的频谱子变换器,保留标准Transformer语义。理论证明,所提L-Transformer在频谱上等价于在降维嵌入上并行运行的p个标准Transformer,固定总嵌入大小下编码器参数可降至约1/p(忽略偏置、归一化等低阶项)。采用实值离散余弦变换(DCT)时,方法保持完全可微,兼容现有训练流程。除压缩外,频谱分解引入频率归纳偏置,支持切片级频率缩放,提升泛化能力。在IMDB和AG~News数据集上的实验表明,模型可显著减少编码器参数(如p=4时最多降低75%),同时保持竞争性准确率。在IMDB上,压缩后性能匹配或优于基准;在AG~News中,中等宽度下略有下降,但4倍压缩后,当达到BERT-base宽度(d=768)时性能恢复至相当水平。
原文摘要 · Abstract (English)
Transformer architectures achieve state-of-the-art performance across a wide range of pattern recognition and natural language processing tasks, but their scaling is accompanied by substantial parameter growth and redundancy in the embedding dimension. In this work, we introduce a structured spectral factorization of the embedding space based on the L-product for third-order tensors. By reshaping token representations into spectral tensor slices and performing attention and feed-forward operations in the transform domain, we obtain a Tensor Transformer architecture that decomposes the encoder into p independent spectral sub-transformers while preserving standard Transformer semantics. We prove that the proposed L-Transformer is spectrally equivalent to p parallel Transformers operating on reduceddimensional embeddings, which yields approximately 1/p reduction (up to lower-order terms such as biases and normalization parameters) in encoder parameters under fixed total embedding size. When instantiated with a real-valued Discrete Cosine Transform (DCT), the method remains fully differentiable and compatible with existing training pipelines. Beyond compression, the spectral decomposition introduces an inductive bias over embedding frequencies, enabling slice-dependent frequency scaling that improves generalization. Experiments on IMDB and AG~News show that the proposed model can substantially reduce encoder parameters (up to 75\% for p=4) while maintaining competitive accuracy. On IMDB, the tensorized encoder matches or improves upon the standard baseline under compression, whereas on AG~News at moderate width we observe a small accuracy decrease in exchange for a 4 times encoder reduction; at BERT-base width (d=768), performance returns to parity.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。