delete retrieve generate
play

Delete, Retrieve, Generate: A Simple Approach to Sentiment and - PowerPoint PPT Presentation

Delete, Retrieve, Generate: A Simple Approach to Sentiment and Style Transfer (Me) Juncen Li 1 , Robin Jia 2 , He He 2 , and Percy Liang 2 1 Tencent 2 Stanford University Text Attribute Transfer Original Sentence: The gumbo was bland.


  1. Delete, Retrieve, Generate: A Simple Approach to Sentiment and Style Transfer (Me) Juncen Li 1 , Robin Jia 2 , He He 2 , and Percy Liang 2 1 Tencent 2 Stanford University

  2. Text Attribute Transfer Original Sentence: “The gumbo was bland.” Original Attribute: negative sentiment Target Attribute: positive sentiment New Sentence: “The gumbo was tasty.” Attribute Content Grammaticality Transfer Preservation 2

  3. No parallel data 3

  4. French English The blue house is old. La maison bleue est vieille. The music was loud. La musique était forte The boat left. Le bateau est parti … … 4

  5. Positive Negative The beignets were tasty The gumbo was bad I like their jambalaya Very rude staff Very affordable Poorly lit … … 5

  6. Delete, Retrieve, Generate love it I love the gumbo I hated the gumbo Delete Retrieve Generate 6

  7. Outline • Prior work with adversarial methods • Simple baselines • Simple neural methods 7

  8. Outline • Prior work with adversarial methods • Simple baselines • Simple neural methods 8

  9. Basic auto-encoder Target= negative Encoder Decoder The gumbo was bland. The gumbo was bland. Shen et al. (2017); Fu et al. (2018) 9

  10. Basic auto-encoder Target= positive Encoder Decoder The beignets were tasty. The beignets were tasty. Shen et al. (2017); Fu et al. (2018) 10

  11. Basic auto-encoder Target= positive Encoder Decoder ??? The gumbo was tasty. The gumbo was bland. Shen et al. (2017); Fu et al. (2018) 11

  12. Basic auto-encoder Target= positive Encoder Decoder The gumbo was bland. The gumbo was bland. Can copy input and ignore target attribute Shen et al. (2017); Fu et al. (2018) 12

  13. Adversarial content separation Adversarial Target= positive Discriminator Encoder Decoder The gumbo was tasty. The gumbo was bland. Make discriminator unable to predict attribute Shen et al. (2017); Fu et al. (2018) 13

  14. Error Cases No Attribute Transfer Input: “Think twice -- this place is a dump.” Output: “Think twice -- this place is a dump.” 14

  15. Error Cases Content changed Input: “The queen bed was horrible!” Output: “The seafood part was wonderful!” 15

  16. Error Cases Poor grammar Input: “Simply, there are far superior places to go for sushi.” Output: “Simply, there are far of vegan to go for sushi.” 16

  17. A balancing act Attribute Content Grammaticality Transfer Preservation 17

  18. Outline • Prior work with adversarial methods • Simple baselines • Simple neural methods 18

  19. Pick two out of three Attribute Content Grammaticality Transfer Preservation 19

  20. Content + Grammar Content Grammaticality Preservation Just return the original sentence… 20

  21. Attribute + Grammar Attribute Grammaticality Transfer • Any sentence in the target corpus works! • Retrieve one that has similar content as input 21

  22. Retrieval Baseline The beignets were tasty Great prices! The gumbo was bland The gumbo was delicious My wife loved the po’boy … 22

  23. Retrieval Baseline The beignets were tasty Great prices! The gumbo was bland The gumbo was delicious My wife loved the po’boy … 23

  24. Retrieval Baseline The beignets were tasty Great prices! I hated the shrimp The gumbo was delicious My wife loved the po’boy … 24

  25. Content + Attribute Attribute Content Transfer Preservation 25

  26. Content + Attribute My wife the shrimp hated • Delete markers of the source attribute • Replace them with markers of the target attribute 26

  27. Attribute Markers hated Negative very disappointed w on’t be back … Compare Frequency Positive great place for well worth delicious … 27

  28. Template Baseline My wife the shrimp hated 28

  29. Template Baseline loved tasty My wife the shrimp ______ polite … 29

  30. Template Baseline loved tasty My wife the shrimp ______ polite … 30

  31. Template Baseline loved tasty My wife the shrimp ______ polite … 31

  32. Template Baseline loved tasty My wife the shrimp ______ polite … 32

  33. Template Baseline The beignets were tasty Great prices! The gumbo was delicious My wife _____ the shrimp My wife loved the po’boy … Retrieve attribute markers from similar contexts 33

  34. Template Baseline The beignets were tasty Great prices! The gumbo was delicious My wife _____ the shrimp loved My wife loved the po’boy … Retrieve attribute markers from similar contexts 34

  35. Experiments • Average over 3 datasets • Sentiment for Yelp reviews (Shen et al., 2017) • Sentiment for Amazon reviews (He and McAuley, 2016; Fu et al., 2018) • Factual to Romantic/Humorous style for image captions (Gan et al., 2017) 35

  36. Experiments • Human Evaluation • Likert scale from 1-5 for • Attribute transfer • Content preservation • Grammaticality • Overall success: get ≥ 4 on each category 36

  37. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 12% MultiDecoder (Fu et al., 2018) 11% CrossAligned (Shen et al., 2017) 12% 37

  38. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 12% MultiDecoder (Fu et al., 2018) 11% CrossAligned (Shen et al., 2017) 12% Retrieval Baseline 23% Template Baseline 24% 38

  39. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 3.2 2.4 3.3 12% Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 24% 39

  40. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 3.2 2.4 3.3 12% Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 3.2 24% 40

  41. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 3.2 2.4 3.3 12% Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 3.2 24% Human 4.1 4.1 4.4 58% 41

  42. Outline • Prior work with adversarial methods • Simple baselines • Simple neural methods 42

  43. Content separation revisited Adversarial Target= positive Discriminator Encoder Decoder The gumbo was tasty. The gumbo was bland. Make discriminator unable to predict attribute Shen et al. (2017); Fu et al. (2018) 43

  44. Delete and Generate Adversarial Target= negative Discriminator Encoder Decoder The gumbo was bland. The gumbo was . The gumbo was bland. 44

  45. Delete and Generate Target= positive Encoder Decoder The gumbo was . The gumbo was tasty. The gumbo was bland. 45

  46. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 3.2 2.4 3.3 12% Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 3.2 24% Delete and Generate 3.6 3.6 3.4 27% Human 4.1 4.1 4.4 58% 46

  47. Context Cues • Can retrieved attribute markers help the model? 47

  48. Delete, Retrieve, Generate Marker= bland Encoder Decoder The gumbo was . The gumbo was bland. The gumbo was bland. 48

  49. Delete, Retrieve, Generate Marker= tasted bland Encoder Decoder The gumbo was . The gumbo was bland. The gumbo was bland. 49

  50. Delete, Retrieve, Generate The beignets were tasty Marker= is delicious Great prices! The shrimp is delicious My wife loved the po’boy … Encoder Decoder The gumbo was . The gumbo was delicious. The gumbo was bland. 50

  51. Results Model Attribute Content Grammar Success StyleEmbedding (Fu et al., 2018) 2.6 3.2 3.3 12% MultiDecoder (Fu et al., 2018) 3.0 2.8 3.1 11% CrossAligned (Shen et al., 2017) 3.2 2.4 3.3 12% Retrieval Baseline 3.7 2.7 4.1 23% Template Baseline 3.5 3.9 3.2 24% Delete and Generate 3.6 3.6 3.4 27% Delete, Retrieve, Generate 3.7 3.6 3.7 34% Human 4.1 4.1 4.4 58% 51

  52. Deleting too much… Input: “ Worst customer service I have ever had.” Output: “Possibly the best chicken I have ever had.” 52

  53. Deleting too little… Input: “I am actually afraid to open the remaining jars.” Output: “I am actually afraid to open the remaining jars this is great. ” 53

  54. Thank you! I don’t like NLP love it I love NLP Delete Retrieve Generate http://tiny.cc/naacl2018-drg https://github.com/lijuncen/ Sentiment-and-Style-Transfer 54

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend