Retrofitting Contextualized Word Embeddings with Paraphrases
Weijia Shi1*, Muhao Chen1*, Pei Zhou2, Kai-Wei Chang1
1University of California, Los Angeles 2University of Southern California
Retrofitting Contextualized Word Embeddings with Paraphrases Weijia - - PowerPoint PPT Presentation
Retrofitting Contextualized Word Embeddings with Paraphrases Weijia Shi 1* , Muhao Chen 1 * , Pei Zhou 2 , Kai-Wei Chang 1 1 University of California, Los Angeles 2 University of Southern California Contextualized Word Embeddings Representations
1University of California, Los Angeles 2University of Southern California
Embedding space Apple Apple
0% 10% 20% 30% 40% 50%
>d(good, bad) >d(big, small)
Loss Function: Input: Paraphrase 1: What is prison life like? Paraphrase 2: How is life in prison? Negative sample: I have life insurance. π = ΰ·
(π1,π2)βπ
ΰ·
π₯βπ1β©π2
ππ‘1,π‘2 ππ± + πΏ β πΰ·’
π1,ΰ·’ π2 ππ± + + πππ
PAR improves ELMo on sentence representation tasks.
0.6 0.8 1 SST-2 (acc) SST-Benchmark (Ο) SICK-E (acc)
ELMo ELMo-PAR
PAR improves the robustness of a downstream QA model against adversarial examples.
53.7 41.7 57.9 47.1 40 45 50 55 60
AddOneSent AddvSent
ELMo-BiDAF ELMo-PAR-BiDAF
1.25 2.5 3.75 5 Paraphrase Non-paraphrase
ELMo (all layers) ELMo-PAR
14