[论文解读] S-SimCSE: Sampled Sub-networks for Contrastive Learning of Sentence Embedding
该论文提出 S-SimCSE,一种用于句子嵌入的对比学习方法,通过在训练过程中从分布中采样丢弃率,以促使具有不同期望规模的子网络为同一句子学习相似的表示。通过在每次前向传播中动态改变丢弃率,并使用句子级别的掩码采样,S-SimCSE 在 BERT-base 上的多个 STS 基准测试中性能优于 SimCSE 超过 1%。
Contrastive learning has been studied for improving the performance of learning sentence embeddings. The current state-of-the-art method is the SimCSE, which takes dropout as the data augmentation method and feeds a pre-trained transformer encoder the same input sentence twice. The corresponding outputs, two sentence embeddings derived from the same sentence with different dropout masks, can be used to build a positive pair. A network being applied with a dropout mask can be regarded as a sub-network of itsef, whose expected scale is determined by the dropout rate. In this paper, we push sub-networks with different expected scales learn similar embedding for the same sentence. SimCSE failed to do so because they fixed the dropout rate to a tuned hyperparameter. We achieve this by sampling dropout rate from a distribution eatch forward process. As this method may make optimization harder, we also propose a simple sentence-wise mask strategy to sample more sub-networks. We evaluated the proposed S-SimCSE on several popular semantic text similarity datasets. Experimental results show that S-SimCSE outperforms the state-of-the-art SimCSE more than $1\%$ on BERT$_{base}$
研究动机与目标
- 通过使具有不同期望规模的子网络为同一输入句子学习相似表示,提升句子嵌入质量。
- 解决 SimCSE 的局限性,后者使用固定丢弃率,从而限制了子网络采样的多样性。
- 通过引入句子级别的丢弃率采样,提升优化稳定性与表示多样性。
- 仅使用无监督预训练,在语义文本相似性(STS)任务上实现最先进性能。
提出的方法
- 在每次前向传播中,从预定义分布(如均匀分布)中动态采样两个丢弃率,而非像 SimCSE 那样使用固定率。
- 将这些采样得到的丢弃率分别应用于同一输入句子两次,生成具有不同期望规模的两个独立子网络。
- 将这两个子网络生成的嵌入作为对比学习中的正样本对,鼓励它们在语义上相似。
- 引入句子级别的掩码策略,为小批量中的每个句子采样一个新的丢弃率,从而增加子网络数量并提升优化效果。
- 使用对比损失进行训练,通过温度缩放的余弦相似度计算正样本对与同一批次中负样本对之间的相似度。
- 利用预训练的 Transformer 编码器(如 BERT、RoBERTa),并在标准 Transformer 架构中仅在全连接层之前应用丢弃。
实验结果
研究问题
- RQ1在训练过程中从分布中采样丢弃率,是否能提升句子嵌入的鲁棒性与泛化能力?
- RQ2通过动态丢弃率改变子网络的期望规模,是否能带来比固定率丢弃更好的语义表示学习效果?
- RQ3句子级别的丢弃率采样是否能提升对比学习中的优化稳定性与表示多样性?
- RQ4在标准 STS 基准测试中,所提出方法与 SimCSE 相比性能如何?
主要发现
- 在使用 BERT-base 时,S-SimCSE 在 7 个 STS 任务上的平均表现优于 SimCSE 1.03%,平均斯皮尔曼等级相关系数达到 76.92%。
- 在 BERT-large 上,S-SimCSE 相较于 SimCSE 提升 1.12%,达到平均斯皮尔曼等级相关系数 79.27%。
- 句子级别的丢弃率掩码策略(w/ sd)进一步提升性能,BERT-base 上最高斯皮尔曼得分达 77.35,BERT-large 上达 79.42。
- S-SimCSE 在多种架构上均保持优异性能,包括 RoBERTa-base,在该模型上实现平均斯皮尔曼相关系数 77.08%,优于 SimCSE 的 76.87%。
- 该方法在全部 7 个 STS 基准数据集上均持续提升性能,展现出良好的鲁棒性与泛化能力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。