arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.15725cs.LG
收藏

求解正则化 Exp、Cosh 和 Sinh 回归问题

Solving Regularized Exp, Cosh and Sinh Regression Problems

Huazhong Agricultural University(华中农业大学);Adobe Research(奥多比研究院);University of California San Diego(加州大学圣迭戈分校)

Zhihang Li, Zhao Song, Tianyi Zhou

AI总结:

针对大型语言模型中注意力机制引发的指数回归问题,提出正则化凸版本,并采用近似牛顿法在输入稀疏时间内高效求解,迭代次数与精度对数相关。

摘要:

在现代机器学习中,注意力计算是训练大型语言模型(如 Transformer、GPT-4 和 ChatGPT)的基本任务。在本工作中,我们研究了指数回归问题,该问题受到大型语言模型中注意力机制中 softmax/exp 单元的启发。标准的指数回归是非凸的。我们研究了指数回归问题的正则化版本,该版本是凸问题。我们使用近似牛顿法在输入稀疏时间内求解。\n\n形式上,在该问题中,给定矩阵 $A \in \mathbb{R}^{n \times d}$,$b \in \mathbb{R}^n$,$w \in \mathbb{R}^n$,以及函数 $\exp, \cosh$ 和 $\sinh$ 中的任意一个,记为 $f$。目标是找到最优的 $x$,使得 $0.5 \\| f(Ax) - b \\|_2^2 + 0.5 \\| \mathrm{diag}(w) A x \\|_2^2$ 最小化。直接的方法是使用朴素牛顿法。令 $\mathrm{nnz}(A)$ 表示矩阵 $A$ 中非零元素的个数。令 $\omega$ 表示矩阵乘法的指数。目前,$\omega\approx 2.373$。令 $\varepsilon$ 表示精度误差。在本文中,我们利用输入稀疏性,提出了一种算法,该算法使用 $\log ( \\|x_0 - x^*\\|_2 / \varepsilon)$ 次迭代,每次迭代时间为 $\widetilde{O}(\mathrm{nnz}(A) + d^\omega )$,以求解该问题。

英文摘要:

In modern machine learning, attention computation is a fundamental task for training large language models such as Transformer, GPT-4 and ChatGPT. In this work, we study exponential regression problem which is inspired by the softmax/exp unit in the attention mechanism in large language models. The standard exponential regression is non-convex. We study the regularization version of exponential regression problem which is a convex problem. We use approximate newton method to solve in input sparsity time. Formally, in this problem, one is given matrix $A \in \mathbb{R}^{n \times d}$, $b \in \mathbb{R}^n$, $w \in \mathbb{R}^n$ and any of functions $\exp, \cosh$ and $\sinh$ denoted as $f$. The goal is to find the optimal $x$ that minimize $ 0.5 \| f(Ax) - b \|_2^2 + 0.5 \| \mathrm{diag}(w) A x \|_2^2$. The straightforward method is to use the naive Newton's method. Let $\mathrm{nnz}(A)$ denote the number of non-zeros entries in matrix $A$. Let $ω$ denote the exponent of matrix multiplication. Currently, $ω\approx 2.373$. Let $ε$ denote the accuracy error. In this paper, we make use of the input sparsity and purpose an algorithm that use $\log ( \|x_0 - x^*\|_2 / ε)$ iterations and $\widetilde{O}(\mathrm{nnz}(A) + d^ω )$ per iteration time to solve the problem.

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

↑