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
Editing Factual Knowledge in Language Models (E...
Search
Koji Matsuda
September 20, 2022
Research
0
390
Editing Factual Knowledge in Language Models (EMNLP 2021)
Koji Matsuda
September 20, 2022
Tweet
Share
More Decks by Koji Matsuda
See All by Koji Matsuda
SHINRA2020-JP リーダーボードのご案内
conditional
0
220
AI王 〜クイズAI日本一決定戦〜
conditional
0
11k
論文紹介: Neural Relation Extraction for Knowledge Base Enrichment (ACL2019)
conditional
0
480
Training Classifiers with Natural Language Explanations
conditional
0
370
Other Decks in Research
See All in Research
20年前に50代だった人たちの今
hysmrk
0
160
データサイエンティストをめぐる環境の違い2025年版〈一般ビジネスパーソン調査の国際比較〉
datascientistsociety
PRO
0
910
AIスーパーコンピュータにおけるLLM学習処理性能の計測と可観測性 / AI Supercomputer LLM Benchmarking and Observability
yuukit
1
730
Aurora Serverless からAurora Serverless v2への課題と知見を論文から読み解く/Understanding the challenges and insights of moving from Aurora Serverless to Aurora Serverless v2 from a paper
bootjp
6
1.5k
Tiaccoon: Unified Access Control with Multiple Transports in Container Networks
hiroyaonoe
0
1k
COFFEE-Japan PROJECT Impact Report(海ノ向こうコーヒー)
ontheslope
0
920
台湾モデルに学ぶ詐欺広告対策:市民参加の必要性
dd2030
0
150
2026 東京科学大 情報通信系 研究室紹介 (すずかけ台)
icttitech
0
660
競合や要望に流されない─B2B SaaSでミニマム要件を決めるリアルな取り組み / Don't be swayed by competitors or requests - A real effort to determine minimum requirements for B2B SaaS
kaminashi
0
980
SREのためのテレメトリー技術の探究 / Telemetry for SRE
yuukit
13
3.3k
ForestCast: Forecasting Deforestation Risk at Scale with Deep Learning
satai
3
510
Dwangoでの漫画データ活用〜漫画理解と動画作成〜@コミック工学シンポジウム2025
kzmssk
0
150
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Navigating Team Friction
lara
192
16k
Chasing Engaging Ingredients in Design
codingconduct
0
140
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
100
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
89
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Transcript
Editing Factual Knowledge in Language Models EMNLP 2021 Nicola De
Cao, Wilker Aziz, Ivan Titov 第14回最先端NLP勉強会 2022/09/27 読み⼿: 松⽥耕史 (理研/東北⼤) 図表は元論⽂からの引⽤です。 1
どんな論⽂︖ • Language Model に内在している Factual Knowledge を編集する • どうやって︖
– パラメータ θ‘ を予測する hyper network g (KnowledgeEditor)を学習する 2
貢献 • Knowledge Editing というタスクを定義、 評価指標も提案 • KnowledgeEditor という⼿法を提案 –
パラメータを予測する NN モデル • KnowledgeEditor の有効性を2つのタス クで確認 – Fact Checking – Question Answering • KnowledgeEditor の書き換え具合を分析 3
モチベーション • LM as KB – Factual Knowledge が パラメータとして暗
にうめこまれている • しかし、間違っていたり obsolete になっ ていたりすることもあるので修正したい こともある • でも、、、コストのかかる再学習はした くない 4
実現したい3要件 • Generality: – いろんなモデルに使える • 本論⽂では BERT, BART に適⽤
• Reliability: – 余計な副作⽤をうまない、編集したい Fact 以外 に影響を与えない • Consistency: – 同じ Fact を問う質問に対して、⼀貫した答えを 返す – ⾔い換えにたいする強さ 5
6
タスク設定 • モデル f(x, θ) があって、 <x,y,a> ∈ D という
書き換えデータがある – y: model の prediction – a: alternative prediction • モデル f のアーキテクチャをたもったまま、 y ではなく a を予測するような f(x, θ‘)を⾒ つけたい – かつ、ほかの x に対する予測は変えない • x の⾔い換えに対しては a を予測するように したい 7
3要件を踏まえた評価指標 • success rate: ↑ – g がどれくらい y から
a に書き換えることがで きたか • retain accuracy: ↑ – その他の(書き換え対象外の)知識をどれくらい残 せたか • equivalence accuracy: ↑ – ⾔い換えに対してロバストに書き換えができたか • performance deterioration: ↓ – 書き換え後のモデルのパフォーマンス低下 8
Method: ハイパーネットワーク • 元のパラメータ θ を 新しいパラメータ θ‘ に書き換えるような NN
g を考える – パラメータ φ 9 x ͔Β a Λ༧ଌ͢Δ Loss Λ࠷খԽ͢Δ φ θ ͔ΒͰ͖Δ͚ͩΕͳ͍ θ’ Λ ༧ଌ͍ͨ͠ɺͱ͍͏੍ Ϛʔδϯ
制約 C について • 素朴には: Lp ノルム: • 提案⼿法: KLダイバージェンス:
10 ύϥϝʔλͷ͕ۙ ͚Εۙ͘ͳΔΑ͏ ੍ Ϟσϧͷग़ྗ͕ ۙ͘ͳΔΑ͏੍
中⾝ • θ‘を直接求めるのではなく、θ‘ = θ + Λθ とおいて Λθを求める •
<x, y, a> を連結して bi-LSTMに⼊れて得 た h を 5層のFFNN に⼊⼒、その勾配を⽤ いてパラメータ差分を計算 – 勾配のゲーティングされた和を⽤いる 11
実験 • Fact Checking – FEVER データセット [Throne et al.
2018] – BERTを⽤いたの2値分類 • Closed-book QA – zsRE データセット [Levy et al. 2017] • ⼈⼿で作った Question Paraphrase が付いてい るのが採⽤ポイント – BARTを⽤いた seq2seq 12
Alternative prediction の⽣成 • Fact Checking: – ラベルを反転させるだけ • Question
Answering: – ビームサーチの Top-1 以外の候補を使って作 る • ⾔い換えの⽣成 – 折返し翻訳を⽤いる 13 ݱ࣮ੈքͰਖ਼͍͔ࣝ͠Ͳ͏͔ؾʹͤͣ࡞͍ͬͯΔ͜ͱʹҙʂ
実験結果 - Fact Checking 14
実験結果 – Question Answering 15
結局どのモデルが総合的に 良いのか︖ • 各指標にランダムな重みを付けて線形和 にして1000回繰り返し総合点を求める – 重み: Dirichlet 分布からのサンプル •
Simplex中の1点 16
Logitの動き 17
モデルのどの部分を書き換えたか 18 εύʔεͳ Update ͕ߦΘΕ͍ͯΔ
まとめ • LMの内部に暗黙的に保存されている factual knowledge を編集するタスクを 提案 • いくつかの評価指標を定義 •
KnowledgeEditorというハイパーネット ワークを提案 19