[论文解读] Distinguishability Calibration to In-Context Learning
本文提出了一种用于上下文学习的可区分性校准方法,通过正交变换与比例平衡,结合双曲度量学习以捕捉层次化类别结构,从而提升嵌入的可区分性。该方法在三个数据集上平均提升F1分数5.86%,在100-shot设置下提升显著,表现出更均衡的奇异值分布和更低的输出嵌入余弦相似度。
Recent years have witnessed increasing interests in prompt-based learning in which models can be trained on only a few annotated instances, making them suitable in low-resource settings. When using prompt-based learning for text classification, the goal is to use a pre-trained language model (PLM) to predict a missing token in a pre-defined template given an input text, which can be mapped to a class label. However, PLMs built on the transformer architecture tend to generate similar output embeddings, making it difficult to discriminate between different class labels. The problem is further exacerbated when dealing with classification tasks involving many fine-grained class labels. In this work, we alleviate this information diffusion issue, i.e., different tokens share a large proportion of similar information after going through stacked multiple self-attention layers in a transformer, by proposing a calibration method built on feature transformations through rotation and scaling to map a PLM-encoded embedding into a new metric space to guarantee the distinguishability of the resulting embeddings. Furthermore, we take the advantage of hyperbolic embeddings to capture the hierarchical relations among fine-grained class-associated token embedding by a coarse-to-fine metric learning strategy to enhance the distinguishability of the learned output embeddings. Extensive experiments on the three datasets under various settings demonstrate the effectiveness of our approach. Our code can be found at https://github.com/donttal/TARA.
研究动机与目标
- 为解决预训练语言模型(PLMs)中的信息扩散问题,即不同类别标签的输出嵌入因自注意力层间共享表示而变得过于相似。
- 通过旋转与比例平衡将输出嵌入变换至新度量空间,以提升少样本上下文学习中输出嵌入的可区分性。
- 利用双曲嵌入建模细粒度类别标签之间的层次关系,以指导度量学习并增强特征判别能力。
- 通过确保输出表示更各向同性且不相关,减少预训练与上下文学习之间的分布不匹配。
- 提供一种即插即用的解决方案,兼容现有基于提示的少样本学习框架,在不微调PLM的前提下提升性能。
提出的方法
- 应用具有正交性和缩放约束的可学习权重矩阵,将PLM编码的输出嵌入变换至新度量空间,确保在低数据环境下特征稳定且可区分。
- 引入比例平衡机制,对变换矩阵的奇异值进行归一化,以促进各嵌入维度间的均匀性,减少偏斜。
- 使用双曲空间建模类别间的层次关系,实现从粗到细的度量学习,增强细粒度标签间的判别能力。
- 构建结合正交正则化、比例平衡与L2正则化的可区分性损失,以优化变换矩阵并提升嵌入可分性。
- 将该方法无缝集成至现有基于提示的少样本学习流水线中,无需更新PLM参数,保持与上下文学习的兼容性。
- 利用奇异值分解(SVD)分析并可视化输出嵌入的分布,验证其各向同性提升与重叠减少。
![Figure 1: (a) : The mapping results of 1,500 [MASK] tokens randomly sampled from the GoEmotions dataset. Each red dot is the output representations derived from prompt-based learning for the [MASK] token of an input example, which will be used to predict the masked token in the corresponding positio](https://ar5iv.labs.arxiv.org/html/2302.06198/assets/x1.png)
实验结果
研究问题
- RQ1通过旋转与比例平衡的特征变换是否能提升上下文学习中输出嵌入的可区分性?
- RQ2使用双曲嵌入是否能增强少样本文本分类中细粒度类别标签的判别能力?
- RQ3所提方法在多大程度上减少了PLMs中的信息扩散?以[MASK]标记表示之间的余弦相似度为度量指标。
- RQ4在多种少样本设置下,所提方法与强基线模型在F1分数上的表现如何比较?
- RQ5可区分性损失中的各组件(正交、比例、L2)对整体性能提升的贡献分别是什么?
主要发现
- 在三个多分类数据集的100-shot学习设置下,所提方法平均提升F1分数5.86%,在Emotion、WOS和GoEmotions数据集上分别提升9.60%、5.11%和2.87%。
- 在Emotion数据集上,输出嵌入的中位奇异值从基线的0.0028提升至本方法的0.0145,表明分布更均衡且偏斜减少。
- 在Emotion数据集上,[MASK]标记对之间的平均余弦相似度从基线的0.898降至本方法的0.256,证实嵌入重叠减少且可区分性提升。
- 消融实验表明,移除比例平衡损失($\mathcal{L}_t$)导致性能下降最大,表明其在维持特征维度均衡中的关键作用。
- 通过T-SNE的可视化结果表明,与基线相比,本方法将嵌入投影至重叠更少、更各向同性的分布中。
- 该方法优于强基线模型,包括提示微调和优化词典的模型,尤其在低资源和细粒度分类场景中表现更优。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。