SlideShare une entreprise Scribd logo
1  sur  24
Style Transfer Through
Back-Transhlation
Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan
Salakhutdinov, Alan W Black
ACL2018読み会 紹介者: 吉村
Introduction
● スタイル変換とは
○ テキストの意味を変えることなく、特定の文体特性を含むようにテキス
トを言い換えるタスク
● 機械翻訳や対話などの言語生成タスクで出力を制御することは重要
○ 例
■ “Shut up! the video is starting!” 友達とのパーティーにて
■ “Please be quiet, please.” 職場にて
● 最近研究されているスタイル変換の手法はヒューリスティックな手法と比べ
て優れているが、文の意味を効果的に保つことは示されていない
Main Contribution
● Non-parallelコーパスでの新しいスタイル変換手法を提案
○ 逆翻訳を使用
● SOTAのベースライン手法を上回る
○ 流暢性、意味の保持、スタイル変換の精度
● 新しいスタイル変換のタスクを提案
○ political slant (政治的な傾向)
Method: Overview
1. スタイル変換したい文を翻訳
2. 1の出力を逆方向の翻訳機に入れる
3. Encoderの出力を 潜在表現 Z として使用
4. ZをそれぞれのスタイルのDecoderに入れてスタイル変換する
republication(共和党)
democratic(民主党)
Method: Back Translation
● 大量のデータでseq2seqモデルをPretrainする
● 逆翻訳を使う気持ち
○ 逆翻訳は文体特性をわかりにくくする Rabinovich et al., 2016
○ 文の意味を保持しスタイル特性を排除した潜在表現 Z を得たい
Method: Latent code Z
● 逆翻訳モデルのEncoderの出力を潜在変数 Z として使用
● 入力文の意味を保ち、スタイルの特性は消されている
Method: Generator Learning
● 生成したいスタイルに合わせて複数の Decoder を学習
● Decoder の出力を分類器に入れて Loss をフィードバックして学習
● decoder は global attention 付きの bidirectionla LSTM
Method: Style Classifiers
● ラベル付きデータを使ってCNN分類器を pretrain する
● 分類器の性能を上げるために、入力単語の Embedding に binary style
indicators を concat する
○ 単語がスタイル特有の語彙なら1にセット、そうでなければ0
Related Work
● Toward controlled generation of text. Hu et al., ICML2017
○ VAEとdiscriminatorを用いたスタイル変換の手法を提案
○ sentiment と tense にフォーカス
○ 意味の保持性は評価していない
● Style transfer from non-parallel text by cross-alignment. Shen et al., NIPS2017
○ cross-alignment auto-encodersとdiscriminatorを用いた手法を提案
○ sentiment と 単語置換による暗号の解読にフォーカス
Style Transfer Task 1
● Gender
○ 文の書き手の性別を変えるような文に変換するタスク
○ Reddy and Knight(2016)がヒューリスティックな手法を提案
■ 性別に関連するような単語を、別の性別の類義語に置換する
■ 高い流暢性と意味の保持
■ ただの単語の置き換えで、それ以上の変化はできない
○ Reddy and Knight(2016)と同じデータセットを使用
■ 性別ラベル付きのYelpのレビュー
■ ナチュラルな文と、特定の性別っぽさが 0.7 未満の文をフィルター
Style Transfer Task 2
● Political slant
○ 文の政治的傾きを変えるように文を変換するタスク
○ 412 人の米国議員がFacebookに投稿したコメントのデータセットを使用
○ democratic (民主党)か republican(共和党)のラベルが付いている
■ democraticの例
● on behalf of the hard-working nh public school teachers- thank you !
● we need more strong voices like yours fighting for gun control .
■ republicanの例
● defund them all, especially when it comes to the illegal immigrants .
● thank u james, praying for all the work u do .
Style Transfer Task 3
● Sentiment
○ 文の感情を変えるように文を変換するタスク
○ Yelpのレビューのデータセット
■ 評価4以上がポジティブ、評価2以下がネガティブ
■ レビューを文に分割、その文がレビューと同じ Sentiment と仮定
Dataset Statistics
※ 最大文長は50
Experimental Setup
● Baseline
○ “cross-aligned” auto-encoder (Shen et al., 2017)
● Translation data
○ Europarl v7, v10などのWMT15にあるEn-Fr, Fr-ENのデータでMTを学習
○ 学習データは 5.4M で vocab sizeは100K
● Hyperparameter settings
○ generator と Encoderは 2層のbidirectional LSTM
■ embedding size 300, hidden size 500
○ CNN分類器
■ filter num 100, filter size 5
■ input embedding size 300 + 2(binary style indicators)
Experimental Setup
● Translation quality
○ BLEU En-Fr : 32.52, Fr-En : 31.11
○ 膨大なデータが利用できてスコアが高くなるような言語を故意に選択
○ モデルの性能や言語選択がどう影響するかは調べていない
● 評価方法
○ スタイル変換の精度
■ 分類器で評価
○ 意味の保持性(A/Bテスト)
■ 元の文と比べて意味が同じ方を選んでもらう
■ base line と提案手法が同じくらい悪いか良い場合は “No pref”
○ 流暢性(人手)
■ ランダムな60文に対して1(unreadable)~ 4(perfect)
Results
● 分類器の精度
○ Gender 82 %
○ Political slant 92%
○ Sentiment 93.23%
● スタイル変換の精度
○ Gender以外は提案手法の方が良い
CAE: Cross-aligned Auto-Encoder
BST: Back-Translation for Style Transfer
Results
● 意味の保持性
○ Sentiment ではCAEよりもBSTが低い
○ 長くて難しい文のスタイル変換はBSTが大幅に上回る
Results
● 流暢性
○ BSTはCAEよりも流暢な長文を生成している
Examples: Gender
Examples: Political slant
Examples: Sentiment
Discussion
● sentimentタスクでは意味の保持でベースラインよりも提案手法が悪かった
○ sentiment タスクはスタイル変換の評価にあまり適していないタスク
■ 文の意味を保ったまま sentiment を変えるのは特に難しい
● gender タスクではスタイル変換の精度でベースラインよりも提案手法の方が
悪かったが、意味の保持では提案手法の方が良かった
○ 提案手法は、精度は少し低くてもいいが意味の保持を大切にしたいとき
に有効である
まとめ
● 逆翻訳を用いた新しいスタイル変換の手法を提案
● 意味の保持性も評価
● 3つのタスクで評価し、SOTAを上回る
● political slant というスタイル変換の新しいタスクを提案
議論
● 逆翻訳を使う意味がよくわからない?
● Table1のデータの分け方が不自然?
● まだまだ改善の余地あり
● 思っていたスタイル変換と違う
● “No pref”が4割
● 意味とは?

Contenu connexe

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Style transfer through back transhlation

  • 1. Style Transfer Through Back-Transhlation Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan Salakhutdinov, Alan W Black ACL2018読み会 紹介者: 吉村
  • 2. Introduction ● スタイル変換とは ○ テキストの意味を変えることなく、特定の文体特性を含むようにテキス トを言い換えるタスク ● 機械翻訳や対話などの言語生成タスクで出力を制御することは重要 ○ 例 ■ “Shut up! the video is starting!” 友達とのパーティーにて ■ “Please be quiet, please.” 職場にて ● 最近研究されているスタイル変換の手法はヒューリスティックな手法と比べ て優れているが、文の意味を効果的に保つことは示されていない
  • 3. Main Contribution ● Non-parallelコーパスでの新しいスタイル変換手法を提案 ○ 逆翻訳を使用 ● SOTAのベースライン手法を上回る ○ 流暢性、意味の保持、スタイル変換の精度 ● 新しいスタイル変換のタスクを提案 ○ political slant (政治的な傾向)
  • 4. Method: Overview 1. スタイル変換したい文を翻訳 2. 1の出力を逆方向の翻訳機に入れる 3. Encoderの出力を 潜在表現 Z として使用 4. ZをそれぞれのスタイルのDecoderに入れてスタイル変換する republication(共和党) democratic(民主党)
  • 5. Method: Back Translation ● 大量のデータでseq2seqモデルをPretrainする ● 逆翻訳を使う気持ち ○ 逆翻訳は文体特性をわかりにくくする Rabinovich et al., 2016 ○ 文の意味を保持しスタイル特性を排除した潜在表現 Z を得たい
  • 6. Method: Latent code Z ● 逆翻訳モデルのEncoderの出力を潜在変数 Z として使用 ● 入力文の意味を保ち、スタイルの特性は消されている
  • 7. Method: Generator Learning ● 生成したいスタイルに合わせて複数の Decoder を学習 ● Decoder の出力を分類器に入れて Loss をフィードバックして学習 ● decoder は global attention 付きの bidirectionla LSTM
  • 8. Method: Style Classifiers ● ラベル付きデータを使ってCNN分類器を pretrain する ● 分類器の性能を上げるために、入力単語の Embedding に binary style indicators を concat する ○ 単語がスタイル特有の語彙なら1にセット、そうでなければ0
  • 9. Related Work ● Toward controlled generation of text. Hu et al., ICML2017 ○ VAEとdiscriminatorを用いたスタイル変換の手法を提案 ○ sentiment と tense にフォーカス ○ 意味の保持性は評価していない ● Style transfer from non-parallel text by cross-alignment. Shen et al., NIPS2017 ○ cross-alignment auto-encodersとdiscriminatorを用いた手法を提案 ○ sentiment と 単語置換による暗号の解読にフォーカス
  • 10. Style Transfer Task 1 ● Gender ○ 文の書き手の性別を変えるような文に変換するタスク ○ Reddy and Knight(2016)がヒューリスティックな手法を提案 ■ 性別に関連するような単語を、別の性別の類義語に置換する ■ 高い流暢性と意味の保持 ■ ただの単語の置き換えで、それ以上の変化はできない ○ Reddy and Knight(2016)と同じデータセットを使用 ■ 性別ラベル付きのYelpのレビュー ■ ナチュラルな文と、特定の性別っぽさが 0.7 未満の文をフィルター
  • 11. Style Transfer Task 2 ● Political slant ○ 文の政治的傾きを変えるように文を変換するタスク ○ 412 人の米国議員がFacebookに投稿したコメントのデータセットを使用 ○ democratic (民主党)か republican(共和党)のラベルが付いている ■ democraticの例 ● on behalf of the hard-working nh public school teachers- thank you ! ● we need more strong voices like yours fighting for gun control . ■ republicanの例 ● defund them all, especially when it comes to the illegal immigrants . ● thank u james, praying for all the work u do .
  • 12. Style Transfer Task 3 ● Sentiment ○ 文の感情を変えるように文を変換するタスク ○ Yelpのレビューのデータセット ■ 評価4以上がポジティブ、評価2以下がネガティブ ■ レビューを文に分割、その文がレビューと同じ Sentiment と仮定
  • 14. Experimental Setup ● Baseline ○ “cross-aligned” auto-encoder (Shen et al., 2017) ● Translation data ○ Europarl v7, v10などのWMT15にあるEn-Fr, Fr-ENのデータでMTを学習 ○ 学習データは 5.4M で vocab sizeは100K ● Hyperparameter settings ○ generator と Encoderは 2層のbidirectional LSTM ■ embedding size 300, hidden size 500 ○ CNN分類器 ■ filter num 100, filter size 5 ■ input embedding size 300 + 2(binary style indicators)
  • 15. Experimental Setup ● Translation quality ○ BLEU En-Fr : 32.52, Fr-En : 31.11 ○ 膨大なデータが利用できてスコアが高くなるような言語を故意に選択 ○ モデルの性能や言語選択がどう影響するかは調べていない ● 評価方法 ○ スタイル変換の精度 ■ 分類器で評価 ○ 意味の保持性(A/Bテスト) ■ 元の文と比べて意味が同じ方を選んでもらう ■ base line と提案手法が同じくらい悪いか良い場合は “No pref” ○ 流暢性(人手) ■ ランダムな60文に対して1(unreadable)~ 4(perfect)
  • 16. Results ● 分類器の精度 ○ Gender 82 % ○ Political slant 92% ○ Sentiment 93.23% ● スタイル変換の精度 ○ Gender以外は提案手法の方が良い CAE: Cross-aligned Auto-Encoder BST: Back-Translation for Style Transfer
  • 17. Results ● 意味の保持性 ○ Sentiment ではCAEよりもBSTが低い ○ 長くて難しい文のスタイル変換はBSTが大幅に上回る
  • 22. Discussion ● sentimentタスクでは意味の保持でベースラインよりも提案手法が悪かった ○ sentiment タスクはスタイル変換の評価にあまり適していないタスク ■ 文の意味を保ったまま sentiment を変えるのは特に難しい ● gender タスクではスタイル変換の精度でベースラインよりも提案手法の方が 悪かったが、意味の保持では提案手法の方が良かった ○ 提案手法は、精度は少し低くてもいいが意味の保持を大切にしたいとき に有効である
  • 23. まとめ ● 逆翻訳を用いた新しいスタイル変換の手法を提案 ● 意味の保持性も評価 ● 3つのタスクで評価し、SOTAを上回る ● political slant というスタイル変換の新しいタスクを提案
  • 24. 議論 ● 逆翻訳を使う意味がよくわからない? ● Table1のデータの分け方が不自然? ● まだまだ改善の余地あり ● 思っていたスタイル変換と違う ● “No pref”が4割 ● 意味とは?