用新函数替代Softmax,让离散变量训练更高效
Beyond Softmax: A Natural Parameterization for Categorical Random Variables
- 用分层二元分割构造新函数catnat,避免Softmax的梯度瓶颈
- 实验显示新方法在图学习、自编码器和强化学习中提升训练效率与性能
- 代码兼容性强,可直接替换现有Softmax,适合深度学习开发者
隐式离散变量广泛存在于深度学习架构中,用于建模强化学习中的动作、潜在变量模型中的类别或图神经网络中的关系。尽管应用广泛,其离散性给基于梯度的学习算法带来挑战。现有工作多聚焦于改进梯度估计,本文另辟蹊径:1)从信息几何角度重新审视普遍使用的Softmax函数,揭示其局限性;2)用由一系列分层二元分割构成的catnat函数替代Softmax,证明该选择可使Fisher信息矩阵对角化,从而显著提升梯度下降效率。大量实验(包括图结构学习、变分自编码器和强化学习)表明,该方法提升了学习效率,并获得更高且更稳定的测试性能。catnat实现简单,可无缝集成至现有代码库,兼容标准训练稳定技术,是Softmax的更优替代方案。
原文摘要 · Abstract (English)
Latent categorical variables are frequently found in deep learning architectures. They can model actions in discrete reinforcement-learning environments, represent categories in latent-variable models, or express relations in graph neural networks. Despite their widespread use, their discrete nature poses significant challenges to gradient-descent learning algorithms. While a substantial body of work has offered improved gradient estimation techniques, we take a complementary approach. Specifically, we: 1) revisit the ubiquitous $\textit{softmax}$ function and demonstrate its limitations from an information-geometric perspective; 2) replace the $\textit{softmax}$ with the $\textit{catnat}$ function, a function composed of a sequence of hierarchical binary splits; we prove that this choice offers significant advantages to gradient descent due to the resulting diagonal Fisher Information Matrix. A rich set of experiments - including graph structure learning, variational autoencoders, and reinforcement learning - empirically show that the proposed function improves the learning efficiency and yields models characterized by consistently higher test performance. $\textit{Catnat}$ is simple to implement and seamlessly integrates into existing codebases. Moreover, it remains compatible with standard training stabilization techniques and, as such, offers a better alternative to the $\textit{softmax}$ function.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。