[论文解读] Universal Sentence Encoder
本文提出两种句子编码模型(Transformer 基于和 Deep Averaging Network,DAN)以产生可迁移到多种 NLP 任务的句子嵌入,分析数据、资源、偏差,并展示在低资源场景下的强大迁移表现。
We present models for encoding sentences into embedding vectors that specifically target transfer learning to other NLP tasks. The models are efficient and result in accurate performance on diverse transfer tasks. Two variants of the encoding models allow for trade-offs between accuracy and compute resources. For both variants, we investigate and report the relationship between model complexity, resource consumption, the availability of transfer task training data, and task performance. Comparisons are made with baselines that use word level transfer learning via pretrained word embeddings as well as baselines do not use any transfer learning. We find that transfer learning using sentence embeddings tends to outperform word level transfer. With transfer learning via sentence embeddings, we observe surprisingly good performance with minimal amounts of supervised training data for a transfer task. We obtain encouraging results on Word Embedding Association Tests (WEAT) targeted at detecting model bias. Our pre-trained sentence encoding models are made freely available for download and on TF Hub.
研究动机与目标
- 通过提供在下游任务具有良好迁移性的高质量句子嵌入,解决 NLP 中的数据稀缺。
- 在准确性、速度和资源使用方面比较两种编码架构(Transformer 与 DAN)。
- 在多个人工任务上评估迁移学习性能,任务特定标注数据量不同。
- 使用 WEAT 调查句子嵴入潜在偏差,并与词级基线进行比较。
提出的方法
- 提出两种句子编码器:基于 Transformer 的编码器和 Deep Averaging Network (DAN) 编码器。
- 两种模型均采用多任务目标进行训练,并通过 SNLI 的监督数据进行增强。
- 嵌入是512维向量,输入下游任务模型;评估包含语义文本相似性和迁移任务。
- 迁移任务的预测使用任务特定神经网络,或直接在句子嵌入之间的相似度。
- 句子嵌入之间的相似度使用本文定义的角距离(Angular distance)。
实验结果
研究问题
- RQ1Transformer 基于和 DAN 基于的通用句子编码器在迁移任务性能上如何比较?
- RQ2在实现强大迁移性能方面,模型复杂性、计算资源和数据需求之间存在哪些权衡?
- RQ3在各种 NLP 任务中,句子级迁移是否优于基于词的迁移基线?
- RQ4当任务数据稀缺时,添加句子级和词级迁移对性能有何影响?
- RQ5通过 WEAT 分析在通用句子编码器中可检测到哪些偏见,与词嵌入偏见相比如何?
主要发现
| 模型 | MR | CR | SUBJ | MPQA | TREC | SST | STS 基准 |
|---|---|---|---|---|---|---|---|
| 句子与词嵌入迁移学习 | 77.11 | 81.71 | 93.12 | 87.01 | 94.72 | 82.14 | – |
| USE_T+CNN (w2v w.e.) | 78.20 | 82.04 | 93.24 | 85.87 | 97.67 | 85.29 | – |
| USE_D+CNN (w2v w.e.) | 81.18 | 87.45 | 93.58 | 87.32 | 98.07 | 86.69 | – |
| USE_D+DAN (w2v w.e.) | 81.32 | 86.66 | 93.90 | 88.14 | 95.51 | 86.62 | – |
| Sentence Embedding Transfer Learning USE_D | 74.45 | 80.97 | 92.65 | 85.38 | 91.19 | 77.62 | 0.763 / 0.719 (r) |
| Sentence Embedding Transfer Learning USE_T | 81.44 | 87.43 | 93.87 | 86.98 | 92.51 | 85.38 | 0.814 / 0.782 (r) |
| USE_D+DAN (lrn w.e.) | 77.57 | 81.93 | 92.91 | 85.97 | 95.86 | 83.41 | – |
| USE_D+CNN (lrn w.e.) | 78.49 | 81.49 | 92.99 | 85.53 | 97.71 | 85.27 | – |
| USE_T+DAN (lrn w.e.) | 81.36 | 86.08 | 93.66 | 87.14 | 96.60 | 86.24 | – |
| USE_T+CNN (lrn w.e.) | 81.59 | 86.45 | 93.36 | 86.85 | 97.44 | 87.21 | – |
| DAN (w2v w.e.) | 74.75 | 75.24 | 90.80 | 81.25 | 85.69 | 80.24 | – |
| CNN (w2v w.e.) | 75.10 | 80.18 | 90.84 | 81.38 | 97.32 | 83.74 | – |
| DAN (lrn w.e.) | 66.87 | 71.23 | 73.70 | 77.85 | 78.07 | 80.15 | 81.52 |
| CNN (lrn w.e.) | 67.98 | 71.81 | 74.90 | 79.14 | 81.04 | 82.72 | 84.90 |
- Transformer 基于 USE 在迁移任务中通常匹配或优于 DAN 基于 USE,随着资源成本增加,精度更高。
- DAN 提供更快的推断和更低的内存使用,在若干任务上具有竞争力的表现。
- 句子级迁移学习通常在大多数任务上优于仅进行词级迁移,且两者结合可获得最佳综合结果。
- 在目标任务数据有限的情况下,USE_T(Transformer)实现强劲性能,接近或达到在更大数据上训练的模型。
- WEAT 分析显示 DAN 变体在若干指标上表现出与 GloVe 相似但通常较弱的偏见;结果取决于训练数据的组成。
- 预训练编码器已发布供 TF Hub 使用和研究。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。