[论文解读] Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Models
本文研究如何从预训练的 T5 模型中提取高质量的句子嵌入,比较仅编码器与编码器-解码器策略,使用对比微调,并扩展到 11B 参数以实现强的迁移和 STS 性能,提出 SentGLUE 以用于更广泛的迁移评估。
We provide the first exploration of sentence embeddings from text-to-text transformers (T5). Sentence embeddings are broadly useful for language processing tasks. While T5 achieves impressive performance on language tasks cast as sequence-to-sequence mapping problems, it is unclear how to produce sentence embeddings from encoder-decoder models. We investigate three methods for extracting T5 sentence embeddings: two utilize only the T5 encoder and one uses the full T5 encoder-decoder model. To support our investigation, we establish a new sentence representation transfer benchmark, SentGLUE, which extends the SentEval toolkit to nine tasks from the GLUE benchmark. Our encoder-only models outperforms Sentence-BERT and SimCSE sentence embeddings on both SentEval and SentGLUE transfer tasks, including semantic textual similarity (STS). Scaling up T5 from millions to billions of parameters is found to produce consistent further improvements. Finally, our encoder-decoder method achieves a new state-of-the-art on STS when using sentence embeddings. Our models are released at https://tfhub.dev/google/collections/sentence-t5/1.
研究动机与目标
- 研究如何从预训练的 T5 模型获取句子嵌入(encoder-only vs encoder-decoder)。
- 评估原始 vs 微调的 T5 嵌入在迁移和语义相似性任务上的表现。
- 评估对比学习对微调 ST5 表征的影响。
- 考察扩大模型规模对句子嵌入质量的影响。
- 引入 SentGLUE 作为句子表示的迁移基准。
提出的方法
- 从 T5(ST5)提取句子表示的三种策略:编码器第一令牌、编码器均值池化,以及编码器-解码器第一令牌。
- 共享 T5 模块的双编码器架构,参数从预训练检查点初始化,并使用投影 + L2 归一化得到定长嵌入。
- 对比学习损失:批内 softmax,正/负对,分母可选增加额外负样本。
- 两阶段训练:先在 mined Community QA 数据上训练,然后在 NLI 上使用对比损失进行微调。
- 在 SentEval(迁移+ STS)上进行评估,并引入 SentGLUE(九个 GLUE 任务)来评估句子表示。
实验结果
研究问题
- RQ1从 T5 中提取句子表示的最佳方式是什么?
- RQ2原始的 T5 句子嵌入在下游迁移和 STS 任务上表现如何?
- RQ3对比学习如何提升 T5 句子嵌入?
- RQ4提高模型容量是否提升句子嵌入质量,提升幅度是多少?
主要发现
- Encoder-only mean pooling for T5 outperforms encoder-decoder start token on transfer tasks, and scales well with model size.
- Encoder-decoder variants excel on STS tasks, achieving strong correlation scores nearing state-of-the-art.
- Two-stage contrastive fine-tuning (QA mining followed by NLI) yields large gains on both transfer and STS benchmarks.
- Scaling ST5 to 11B parameters provides consistent improvements in transfer, and encoder-decoder 11B achieves top STS performance.
- SentGLUE provides nine GLUE-derived tasks for sentence representation transfer evaluation, with ST5-Enc Base outperforming SBERT-RoBERTa Base and SimCSE-RoBERTa Base on most tasks.
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。