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

快速、可微且稀疏的 Top-k:凸分析视角

Fast, Differentiable and Sparse Top-k: a Convex Analysis Perspective

Ecole Normale Supérieure(巴黎高等师范学院);Google Research(谷歌研究院);CNRS(法国国家科学研究中心)

Michael E. Sander, Joan Puigcerver, Josip Djolonga, Gabriel Peyré, Mathieu Blondel

AI总结:

本文从凸分析出发,将 top-k 表述为排列多面体上的线性规划并用 p-范数正则化平滑,提出兼具可微性与稀疏性的通用算子及 GPU/TPU 友好算法。

摘要:

top-k 算子返回一个稀疏向量,其中非零值对应于输入的 k 个最大值。遗憾的是,由于它是一个不连续函数,因此很难纳入通过反向传播进行端到端训练的神经网络中。近期工作研究了基于正则化或扰动技术的可微松弛。然而,迄今为止,尚无方法同时具备完全可微性和稀疏性。在本文中,我们提出了新的可微且稀疏的 top-k 算子。我们将 top-k 算子视为排列多面体(permutation 的凸包)上的线性规划。随后,我们引入一个 p-范数正则化项来平滑该算子,并证明其计算可以归约为保序优化。我们的框架比现有框架显著更通用,例如能够表达按幅值选择值的 top-k 算子。在算法方面,除了 pool adjacent violator(PAV,池化相邻违例者)算法外,我们还提出了一种新的对 GPU/TPU 友好的 Dykstra 算法,用于求解保序优化问题。我们成功地将所提算子用于神经网络权重剪枝、视觉 Transformer 微调,以及作为稀疏混合专家(sparse mixture of experts)中的路由器。

英文摘要:

The top-k operator returns a sparse vector, where the non-zero values correspond to the k largest values of the input. Unfortunately, because it is a discontinuous function, it is difficult to incorporate in neural networks trained end-to-end with backpropagation. Recent works have considered differentiable relaxations, based either on regularization or perturbation techniques. However, to date, no approach is fully differentiable and sparse. In this paper, we propose new differentiable and sparse top-k operators. We view the top-k operator as a linear program over the permutahedron, the convex hull of permutations. We then introduce a p-norm regularization term to smooth out the operator, and show that its computation can be reduced to isotonic optimization. Our framework is significantly more general than the existing one and allows for example to express top-k operators that select values in magnitude. On the algorithmic side, in addition to pool adjacent violator (PAV) algorithms, we propose a new GPU/TPU-friendly Dykstra algorithm to solve isotonic optimization problems. We successfully use our operators to prune weights in neural networks, to fine-tune vision transformers, and as a router in sparse mixture of experts.

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

↑