arXiv:2411.15675cs.LG2024-11

大模型能在上下文中学会矩阵函数计算,且表现优于传统方法。

Can a Large Language Model Learn Matrix Functions In Context?

  • 通过少量示例实现矩阵函数的上下文学习
  • 在奇异值分解任务中准确率高于传统模型,尤其对前k个奇异值
  • 仅需极少样本即可快速收敛,不易过拟合

大型语言模型(LLMs)在无需显式微调的情况下,可通过少量输入输出示例实现上下文学习(ICL),解决复杂任务。本文探究了LLMs在非线性数值计算中的能力,重点研究奇异值分解(SVD)相关函数。实验表明,尽管在简单任务中与基于随机梯度下降(SGD)的线性回归和神经网络(NN)表现相当,但在更复杂的任务中,尤其是前k个奇异值计算上,LLMs显著优于传统模型。此外,LLMs展现出强可扩展性,在矩阵规模增大时仍保持高准确率。同时,它们仅需极少数先验示例即可快速收敛,避免了经典模型常见的过拟合问题。这些结果表明,LLMs可作为高维问题求解的高效替代方案。未来工作将拓展至更大矩阵和更复杂的矩阵运算,并探索不同数值表示在ICL中的影响。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have demonstrated the ability to solve complex tasks through In-Context Learning (ICL), where models learn from a few input-output pairs without explicit fine-tuning. In this paper, we explore the capacity of LLMs to solve non-linear numerical computations, with specific emphasis on functions of the Singular Value Decomposition. Our experiments show that while LLMs perform comparably to traditional models such as Stochastic Gradient Descent (SGD) based Linear Regression and Neural Networks (NN) for simpler tasks, they outperform these models on more complex tasks, particularly in the case of top-k Singular Values. Furthermore, LLMs demonstrate strong scalability, maintaining high accuracy even as the matrix size increases. Additionally, we found that LLMs can achieve high accuracy with minimal prior examples, converging quickly and avoiding the overfitting seen in classical models. These results suggest that LLMs could provide an efficient alternative to classical methods for solving high-dimensional problems. Future work will focus on extending these findings to larger matrices and more complex matrix operations while exploring the effect of using different numerical representations in ICL.

大模型矩阵计算上下文学习

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