Skip to main content
QUICK REVIEW

[论文解读] ESimCSE: Enhanced Sample Building Method for Contrastive Learning of Unsupervised Sentence Embedding

Xing Wu, Chaochen Gao|arXiv (Cornell University)|Sep 9, 2021
Topic Modeling参考文献 22被引用 69
一句话总结

ESimCSE 通过 (1) 使用更安全的正向对长度扩展(通过单词/子词重复)和 (2) 通过动量对比增加负向对,在基准测试中相对于 SimCSE 在 STS 方面表现更强,提升无监督句子嵌入的性能。

ABSTRACT

Contrastive learning has been attracting much attention for learning unsupervised sentence embeddings. The current state-of-the-art unsupervised method is the unsupervised SimCSE (unsup-SimCSE). Unsup-SimCSE takes dropout as a minimal data augmentation method, and passes the same input sentence to a pre-trained Transformer encoder (with dropout turned on) twice to obtain the two corresponding embeddings to build a positive pair. As the length information of a sentence will generally be encoded into the sentence embeddings due to the usage of position embedding in Transformer, each positive pair in unsup-SimCSE actually contains the same length information. And thus unsup-SimCSE trained with these positive pairs is probably biased, which would tend to consider that sentences of the same or similar length are more similar in semantics. Through statistical observations, we find that unsup-SimCSE does have such a problem. To alleviate it, we apply a simple repetition operation to modify the input sentence, and then pass the input sentence and its modified counterpart to the pre-trained Transformer encoder, respectively, to get the positive pair. Additionally, we draw inspiration from the community of computer vision and introduce a momentum contrast, enlarging the number of negative pairs without additional calculations. The proposed two modifications are applied on positive and negative pairs separately, and build a new sentence embedding method, termed Enhanced Unsup-SimCSE (ESimCSE). We evaluate the proposed ESimCSE on several benchmark datasets w.r.t the semantic text similarity (STS) task. Experimental results show that ESimCSE outperforms the state-of-the-art unsup-SimCSE by an average Spearman correlation of 2.02% on BERT-base.

研究动机与目标

  • 识别 transformer 编码器中来自相同长度正向对的 Bias 在 SimCSE 中带来的偏差。
  • 开发能够在保持含义不变的前提下进行安全的句子长度扩展的方法,以用于正向对。
  • 在不产生过高计算代价的前提下,通过动量对比增加有信息量的负向对。
  • 在标准的语义文本相似性基准上评估所提出的增强。
  • 证明组合方法(ESimCSE)在多种模型上的无监督句子嵌入性能有所改进。

提出的方法

  • 引入词语/子词重复来修改正向对中的一个成员,同时保持含义不变。
  • 应用动量对比队列以通过一个动量更新的编码器扩大负向对集合。
  • 将两种增强与标准的 SimCSE 目标结合,形成 ESimCSE。
  • 使用 English Wikipedia(1M 句)并以 BERT/RoBERTa 作为骨干网络,在 CLS 上加入 MLP 以获取句子嵌入。
  • 像 SimCSE 那样使用基于 dropout 的正向对生成,但为正向对独立构造成对。
  • 使用 STS 基准和 Spearman 相关性进行评估,报告相对于 SimCSE 的平均增益。

实验结果

研究问题

  • RQ1SimCSE 中相同长度偏见是否会对语义相似性学习产生负面影响,是否可以通过安全的长度扩展方法来缓解?
  • RQ2词语/子词重复能否提供更安全且有效的正向对增强而不扭曲语义?
  • RQ3引入动量对比以生成更多负向对是否能在不产生过高计算成本的情况下提升无监督句子嵌入?
  • RQ4将这些增强与基线 SimCSE 结合在标准 STS 数据集上的整体性能提升是多少?

主要发现

  • ESimCSE 在 BERT-base 上相较于 SimCSE 的平均 Spearman 相关提高了 2.02%。
  • 正向对的词语/子词重复可获得可观的 STS 增益(如 STS-B 开发集在单词重复下提升最高可达 1.64 点,动量为 1.53 点,完整的 ESimCSE 配置为 2.40 点)。
  • 动量对比通过队列和动量更新的编码器扩展了负向对,学习时的成本并不过高。
  • 在模型变体(BERT base/large、RoBERTa base/large)上,ESimCSE 在 STS 基准上持续优于 SimCSE。
  • 在迁移任务中,ESimCSE 相较于 SimCSE 的平均性能略有提升(例如在报告的迁移任务中为 86.06 对 85.81)。
  • 消融研究表明正向对增强和负向对扩展均有显著贡献,而句子长度分桶显示出有限或负向影响。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。