arXiv:2410.13981cs.LGcs.AI2024-10ICLR被引 6

Transformer可实现学习优化算法,高效解决稀疏恢复问题。

On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recovery

  • 用K层Transformer实现可证明收敛的L2O算法
  • 在不同测量矩阵下仍有效,且收敛速度与层数线性相关
  • 适合需要快速泛化和结构利用的稀疏恢复场景

Transformer具备上下文学习(ICL)能力,能基于输入输出示例对无参数更新地解决各类推理任务。已有理论表明,这种能力源于Transformer执行梯度下降算法的能力。本文进一步证明,Transformer可实现学习-优化(L2O)算法。针对上下文稀疏恢复(以LASSO形式建模)任务,我们发现:一个K层Transformer可执行具有理论保证收敛率的L2O算法,其收敛速度与K呈线性关系。这为Transformer即使仅有少量层也表现出卓越的ICL能力提供了新解释,这是标准梯度下降无法实现的。此外,训练好的Transformer可处理不同测量矩阵生成的稀疏恢复问题,而传统L2O算法要求训练与测试时的测量矩阵一致。同时,作为L2O算法的Transformer能利用训练任务中的结构信息加速上下文学习中的收敛,并在不同长度的示例对上实现泛化,而传统L2O算法通常难以做到。这些理论结论得到了实验结果的支持。

原文摘要 · Abstract (English)

An intriguing property of the Transformer is its ability to perform in-context learning (ICL), where the Transformer can solve different inference tasks without parameter updating based on the contextual information provided by the corresponding input-output demonstration pairs. It has been theoretically proved that ICL is enabled by the capability of Transformers to perform gradient-descent algorithms (Von Oswald et al., 2023a; Bai et al., 2024). This work takes a step further and shows that Transformers can perform learning-to-optimize (L2O) algorithms. Specifically, for the ICL sparse recovery (formulated as LASSO) tasks, we show that a K-layer Transformer can perform an L2O algorithm with a provable convergence rate linear in K. This provides a new perspective explaining the superior ICL capability of Transformers, even with only a few layers, which cannot be achieved by the standard gradient-descent algorithms. Moreover, unlike the conventional L2O algorithms that require the measurement matrix involved in training to match that in testing, the trained Transformer is able to solve sparse recovery problems generated with different measurement matrices. Besides, Transformers as an L2O algorithm can leverage structural information embedded in the training tasks to accelerate its convergence during ICL, and generalize across different lengths of demonstration pairs, where conventional L2O algorithms typically struggle or fail. Such theoretical findings are supported by our experimental results.

Transformer稀疏恢复学习优化理论分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。