Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CoCon
Search
Zhang Yixiao
December 16, 2020
Science
0
340
CoCon
Zhang Yixiao
December 16, 2020
Tweet
Share
More Decks by Zhang Yixiao
See All by Zhang Yixiao
vq-cpc
ldzhangyx
0
340
MixPoet
ldzhangyx
4
370
diora
ldzhangyx
0
250
drummernet
ldzhangyx
0
200
ON-LSTM
ldzhangyx
0
160
Other Decks in Science
See All in Science
オンプレミス環境にKubernetesを構築する
koukimiura
0
110
(論文読み)贈り物の交換による地位の競争と社会構造の変化 - 文化人類学への統計物理学的アプローチ -
__ymgc__
1
170
05_山中真也_室蘭工業大学大学院工学研究科教授_だてプロの挑戦.pdf
sip3ristex
0
130
マテリアルズ・インフォマティクスの先端で起きていること / What's Happening at the Cutting Edge of Materials Informatics
snhryt
1
180
地表面抽出の方法であるSMRFについて紹介
kentaitakura
1
300
局所保存性・相似変換対称性を満たす機械学習モデルによる数値流体力学
yellowshippo
1
170
メール送信サーバの集約における透過型SMTP プロキシの定量評価 / Quantitative Evaluation of Transparent SMTP Proxy in Email Sending Server Aggregation
linyows
0
650
重複排除・高速バックアップ・ランサムウェア対策 三拍子そろったExaGrid × Veeam連携セミナー
climbteam
0
190
構造設計のための3D生成AI-最新の取り組みと今後の展開-
kojinishiguchi
0
860
学術講演会中央大学学員会八王子支部
tagtag
0
270
最適化超入門
tkm2261
14
3.5k
論文紹介: PEFA: Parameter-Free Adapters for Large-scale Embedding-based Retrieval Models (WSDM 2024)
ynakano
0
210
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Side Projects
sachag
452
42k
Speed Design
sergeychernyshev
27
790
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Optimizing for Happiness
mojombo
376
70k
Faster Mobile Websites
deanohume
306
31k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Transcript
CoCon: A Self-Supervised Approach for Controlled Text Generation Presenter: Yixiao
Zhang
TL;DR • 任务:用文本指导文本,进行可控生成 • 亮点: • 让文本成为控制变量:更加灵活 • 漂亮的损失函数 •
模型是自监督训练的 • 结果表明显著加强了语言模型的可控性
Introduction • 基于Transformer的预训练LM成为了新的浪潮,但是从头训练LM 的成本巨大 • 问题:不改变预训练LM的情况下,LM如何进行控制? • 解决办法1:PPLM,通过属性模型控制生成文本 • 缺点:不够精细,可能造成巨大差异
Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. Plug and play language models: a simple approach to controlled text generation. arXiv preprint arXiv:1912.02164, 2019.
Related Work • 生成包含所需属性的文本 • 早期工作 • 条件生成模型,可通过RL或GAN训练 • 缺陷:对预定属性的要求限制了生成文本的可能类型
• CTRL • 使用control code(预置的metadata)生成文本 • 缺陷:control code也是预先设定的 • PPLM(最相似) • 在LM上插拔一个模块,不重新训练实现生成 • 区别: • 本文旨在在更局部的内容上控制 • CoCon自监督学习,免去了标签数据
Related Work • 文本风格迁移 • 少数研究采用AE以分离表示 • 另外一些模型能识别attribute markers •
一些特定风格相关的n-grams • 通过替换的方式编辑文本风格
CoCon • 模型目标: • 给定引导文本1:−1 和控制文本,模型 生成: • 过程: •
分别编码c和x • 自注意力交互,得 到新的特征 • 进行下一个词预测
CoCon • CoCon是一个单层 Transformer Block • 首先得到x和c的QKV • 将KV拼起来过self-attn
Loss Function • 自重构损失(Self Reconstruction Loss) • 令c = ,使得模型能够学习结合控制文本的内容
• 无文本损失(Null Content Loss) • 令 = ∅,使得模型退化成LM,以生成流畅的文本
Loss Function • 循环重构损失(Cycle Reconstruction Loss) • 在inference中,生成文本不太可能与引导文本共存 • 给定两个不同的文本(,
′)
Loss Function • 对抗损失(Adversarial Loss) • 总优化目标
实验 • 文本引导的文本生成评估指标有BLEU、NIST、METEOR、PPL和 Dist-1/2/3
实验 • 文本引导的文本生成评估指标有BLEU、NIST、METEOR、PPL和 Dist-1/2/3
例子
多个控制