[论文解读] VIRT: Improving Representation-based Models for Text Matching through Virtual Interaction
本文提出 VIRT,一种虚拟交互机制,通过在训练过程中蒸馏来自交互式模型的注意力知识,增强基于表示的文本匹配模型,实现在无需推理开销的情况下进行深度交叉注意力学习。该方法在六个基准测试中达到最先进性能,同时通过在推理阶段移除蒸馏过程保持高效性。
With the booming of pre-trained transformers, representation-based models based on Siamese transformer encoders have become mainstream techniques for efficient text matching. However, these models suffer from severe performance degradation due to the lack of interaction between the text pair, compared with interaction-based models. Prior arts attempt to address this through performing extra interaction for Siamese encoded representations, while the interaction during encoding is still ignored. To remedy this, we propose a extit{Virtual} InteRacTion mechanism (VIRT) to transfer interactive knowledge from interaction-based models into Siamese encoders through attention map distillation. As a train-time-only component, VIRT could completely maintain the high efficiency of the Siamese structure and brings no extra computation cost during inference. To fully utilize the learned interactive knowledge, we further design a VIRT-adapted interaction strategy. Experimental results on multiple text matching datasets demonstrate that our method outperforms state-of-the-art representation-based models. What's more, VIRT can be easily integrated into existing representation-based methods to achieve further improvements.
研究动机与目标
- 解决高效基于表示的模型与强大交互式模型在文本匹配任务中的性能差距。
- 使基于表示的模型能够在不增加推理成本的情况下学习交叉注意力交互。
- 设计一种知识蒸馏机制,将交互式教师模型中的交互感知表示知识迁移至孪生编码器。
- 开发一种轻量级的 VIRT 适配交互层,进一步利用蒸馏得到的知识。
提出的方法
- 引入一个知识蒸馏模块,在训练过程中将交互式教师模型的注意力图迁移至基于表示的学生模型的孪生编码器中。
- 采用基于教师与学生模型间注意力图对齐的蒸馏损失,其定义见公式 7,超参数为 α。
- 在推理阶段移除蒸馏模块,以保持双编码器的高效性。
- 设计一种 VIRT 适配的交互层,用于在孪生编码之后融合编码表示,利用学习到的交互知识。
- 使用组合损失训练学生模型:任务特定损失与蒸馏损失,通过超参数 α 平衡两者。
- 将该方法应用于多种预训练 BERT 变体(从 Tiny 到 Large),覆盖多个文本匹配任务。
实验结果
研究问题
- RQ1从交互式模型中进行知识蒸馏是否能有效提升基于表示的文本匹配模型的性能?
- RQ2通过注意力图蒸馏实现的虚拟交互是否能使孪生编码器在不进行完整交互的情况下学习到有意义的交叉注意力模式?
- RQ3与标准的后期交互模块相比,VIRT 适配的交互层在性能提升方面表现如何?
- RQ4性能增益在不同模型尺寸和文本匹配基准测试中是否具有鲁棒性?
- RQ5VIRT 是否可作为即插即用模块,用于增强现有基于表示的模型?
主要发现
- VIRT 在六个文本匹配基准测试中达到最先进性能,优于现有基于表示的模型。
- 在 MNLI 数据集上,VIRT-BERT-Large 达到 79.3 的准确率,较基线提升 +15.4。
- 该方法在不同模型尺寸(从 BERT-Tiny 到 BERT-Large)上均表现出一致的性能提升,增益范围为 +10.3 至 +15.4 分。
- 消融实验证实,蒸馏模块与 VIRT 适配的交互层对实现最佳性能均至关重要。
- 可视化结果表明,VIRT 蒸馏模型学习到的注意力模式更接近交互式教师模型,例如能将 'peaceful' 与 'peace' 对齐。
- 该方法对超参数 α 具有鲁棒性,最优性能出现在 α=1,且在广泛取值范围内保持稳定。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。