[论文解读] Maximum Class Separation as Inductive Bias in One Matrix
本文通过在Softmax之前进行单一的、闭式矩阵乘法,将最大类别分离作为固定的归纳偏置嵌入深度网络中。该矩阵通过递归计算,确保类别向量等角且均值为零,从而在分类、长尾识别和分布外检测任务中实现性能提升,计算开销极低,且无需额外的训练优化。
Maximizing the separation between classes constitutes a well-known inductive bias in machine learning and a pillar of many traditional algorithms. By default, deep networks are not equipped with this inductive bias and therefore many alternative solutions have been proposed through differential optimization. Current approaches tend to optimize classification and separation jointly: aligning inputs with class vectors and separating class vectors angularly. This paper proposes a simple alternative: encoding maximum separation as an inductive bias in the network by adding one fixed matrix multiplication before computing the softmax activations. The main observation behind our approach is that separation does not require optimization but can be solved in closed-form prior to training and plugged into a network. We outline a recursive approach to obtain the matrix consisting of maximally separable vectors for any number of classes, which can be added with negligible engineering effort and computational overhead. Despite its simple nature, this one matrix multiplication provides real impact. We show that our proposal directly boosts classification, long-tailed recognition, out-of-distribution detection, and open-set recognition, from CIFAR to ImageNet. We find empirically that maximum separation works best as a fixed bias; making the matrix learnable adds nothing to the performance. The closed-form implementation and code to reproduce the experiments are available on github.
研究动机与目标
- 将最大类别分离作为固定的归纳偏置嵌入深度学习模型中,避免端到端优化的需要。
- 为等角、零均值类别向量提供一个闭式解,使其在输出空间中实现最大分离。
- 证明该固定矩阵可提升多样化任务(包括长尾识别和分布外检测)的性能。
- 表明该矩阵应保持固定而非可学习,因为学习不会带来任何收益。
- 通过极少的工程工作和可忽略的计算开销,实现广泛采用。
提出的方法
- 一种递归算法计算一个大小为 $ (C+1) imes C $ 的固定矩阵,使 $ C+1 $ 个类别向量实现最大角度分离且均值为零。
- 该矩阵作为网络logits在Softmax前的线性变换应用,将类别分离与训练优化解耦。
- 该方法确保所有类别向量等角且在超球面上均匀分布,形成单纯形等角紧框架。
- 该方法与标准交叉熵损失和任何网络架构兼容,仅需一行代码即可集成。
- 该矩阵通过几何性质(等角紧框架)解析推导得出,无需优化。
- 该解可推广至任意类别数,且与主干网络架构无关。
实验结果
研究问题
- RQ1最大类别分离能否在无优化的情况下以闭式求解?若可,如何将其作为归纳偏置嵌入深度网络?
- RQ2固定矩阵强制实现等角类别向量是否能提升标准和长尾分类任务的泛化性能?
- RQ3与可学习或优化的分离机制相比,该固定矩阵在性能和效率方面表现如何?
- RQ4该归纳偏置是否能超越标准分类任务,在分布外识别和开放集识别中也带来提升?
- RQ5该矩阵在保持固定时是否比训练过程中可学习时更有效?
主要发现
- 所提出的固定矩阵提升了标准ImageNet分类准确率,并显著增强了长尾识别基准的表现。
- 当添加到现有SOTA模型时,该方法在长尾识别任务上实现了最先进性能,证明了其广泛的兼容性。
- 由于输出空间中几何分离更优,分布外识别和开放集识别性能得到提升。
- 将矩阵设为可学习无法带来性能增益,证实最大分离应在训练前以闭式求解。
- 该方法无显著运行时开销,可仅用一行代码集成到任何网络中。
- 通过递归构造矩阵,可确保任意类别数下类别向量等角且均值为零,形成单纯形等角紧框架。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。