arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.00660cs.LGstat.ML
收藏

一种用于重缩放双曲函数回归的迭代算法

An Iterative Algorithm for Rescaled Hyperbolic Functions Regression

The University of Washington(华盛顿大学);Simons Institute for the Theory of Computing(西蒙斯理论计算研究所);UC Berkeley(加州大学伯克利分校);Rice University(莱斯大学)

Yeqi Gao, Zhao Song, Junze Yin

AI总结:

针对大语言模型注意力机制中的重缩放 softmax 回归,本文提出可处理指数及双曲正、余弦函数的迭代算法,并给出小扰动下解变化的界。

摘要:

大语言模型(LLM)在自然语言翻译、情感分析、语言建模、聊天机器人与会话智能体、创意写作、文本分类、摘要和生成等多个领域拥有大量现实应用。LLM 在提升这些任务的准确性和效率方面展现出巨大前景,并有可能在未来数年革新自然语言处理(NLP)领域。基于指数函数的注意力单元是 LLM 中的基本组成部分。此前已有若干工作研究指数回归和 softmax 回归的收敛性。本文提出一种迭代算法,用于求解大语言模型注意力机制中出现的、softmax 回归问题在表述上略有不同的一个重缩放版本。具体而言,我们考虑最小化某个函数与其和目标 n 维向量 b 的内积之间的平方损失,该内积由归一化项缩放;前述函数可以是指数函数、双曲正弦函数或双曲余弦函数。这种“重缩放 softmax 回归”与经典 softmax 回归的区别在于归一化因子的位置。该框架对多种双曲函数的高效性和可推广性,使其与注意力机制优化相关。分析还得出一个推论,为上下文学习在小扰动下的解变化给出界。文中讨论了局限性和社会影响。

英文摘要:

Large language models (LLMs) have numerous real-life applications across various domains, such as natural language translation, sentiment analysis, language modeling, chatbots and conversational agents, creative writing, text classification, summarization, and generation. LLMs have shown great promise in improving the accuracy and efficiency of these tasks, and have the potential to revolutionize the field of natural language processing (NLP) in the years to come. Exponential function based attention unit is a fundamental element in LLMs. Several previous works have studied the convergence of exponential regression and softmax regression. In this paper, we propose an iterative algorithm to solve a rescaled version of the slightly different formulation of the softmax regression problem that arises in attention mechanisms of large language models. Specifically, we consider minimizing the squared loss between a certain function, which can be either the exponential function, hyperbolic sine function, or hyperbolic cosine function, and its inner product with a target $n$-dimensional vector $b$, scaled by the normalization term. This ``rescaled softmax regression'' differs from classical softmax regression in the location of the normalization factor. The efficiency and generalizability of this framework to multiple hyperbolic functions make it relevant for optimizing attention mechanisms. The analysis also leads to a corollary bounding solution changes under small perturbations for in-context learning. Limitations and societal impact are discussed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑