ACL 2023 Matching Workshop

July 13, 2023

Editing Models
Updating Text with Up-to-date Information
Sameer Singhsameersingh.org

Facts in text should match the worldor

LLM

But it often does not!
2

Human Written Textor

LLM

Lying/mistake

World changed3

Language Model Generated Textor

LLM

Hallucination

World changed
Model is stale4Facts in text should match the worldor

LLM

Update text to match the information
5

Task: Make text match informationorText matches
the world!

LLM

EditingModel

6Applications for LLM generated text
Dune: House Atreides, by Frank
Herbert…

Dune: House Atreides, by Brian
Herbert…

Virtual assistantYour Google visit is at 1600
Amphitheater Drive.

Your Google visit is at 1600
Amphitheatre Pkwy.

Creative writing

The detective walked east towards
Hoover tower…

Digital avatar

My mother, Jane, got married inThornfield.

Editing Model

QA

The detective walked west towards
Hoover tower…
My mother, Jane, got married in
Ferndean.

…

Keep this small, efficient7

Outline

Relevant information
Editing
ModelPart 1

Part 2

LLM

Editing
Model

Need to seek
information
8

Outline

Relevant information
Editing
ModelPart 1FRUIT: Faithfully Reflecting Updated Information in Text
Robert L. Logan IV, Alexandre Passos, Sameer Singh, Ming-Wei Chang
NAACL 2022 BEST TASK PAPER AWARDPart 2

LLM

Editing
Model

Need to seek
information
9

Motivation
2020–21 Salford City F.C. season…

Transfers out
Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

1 July
2020

LB

ENG

Josh
Askew

BostonUnitedReleased10Motivation
2020–21 Salford City F.C. season…

Transfers out
Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

1 July
2020

LB

ENG

Josh
Askew

BostonUnitedReleased

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer

11

Motivation
2020–21 Salford City F.C. season

Martin Smith (footballer, born 1995)…

Martin Smith (born 2 October 1995) is an English
footballer who plays for club Salford City.

Transfers out
Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

1 July
2020

LB

ENG

Josh
Askew

BostonUnitedReleased

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer

12Motivation
2020–21 Salford City F.C. season

Martin Smith (footballer, born 1995)…

Martin Smith (born 2 October 1995) is an English
footballer who plays for club Salford City.

Transfers out
Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

1 July
2020

LB

ENG

Josh
Askew

BostonUnitedReleased

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer

13

Motivation
2020–21 Salford City F.C. season

Martin Smith (footballer, born 1995)…

Martin Smith (born 2 October 1995) is an English
footballer who plays for club Salford City.

Transfers out
Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

1 July
2020

LB

ENG

Josh
Askew

BostonUnitedReleased

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer

Martin Smith (footballer, born 1995)
Martin Smith (born 2 October 1995) is an English
footballer who plays as a midfielder for National League
club Chesterfield.

14

Motivation
2020–21 Salford City F.C. season

Martin Smith (footballer, born 1995)…

Martin Smith (born 2 October 1995) is an English
footballer who plays for club Salford City.

Transfers out

Can weautomate this?

Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

1 July
2020

LB

ENG

Josh
Askew

BostonUnitedReleased

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer…

Martin Smith (footballer, born 1995)
Martin Smith (born 2 October 1995) is an English
footballer who plays as a midfielder for National League
club Chesterfield.

15

FRUIT🍏
Faithfully reflecting updated information in text (FRUIT).
Mentions of the subject entity
written between time t and t’

FRUIT 🍏An existing article
written at time t

The edits to produce theupdated article at time t’17Why This is Challenging
Writing assistants focus on grammar/autocomplete capabilities
instead of making grounded edits.
Data-to-text and summarization do not focus on updating existing text.

Assistive
Writing🍏

SummarizationandData-to-text18

Why This is Challenging
Generated text needs to be faithful to original text and new evidence,
preferring evidence when there is conflict.
Requires contrastive fact verification!

✓

2020–21 Salford City F.C. season
Transfers out

Martin Smith (footballer, born 1995)

Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer[1] Get Your Vitamin C! Robust Fact Verification with Contrastive Evidence (Schuster et al., NAACL 2021)✕

Martin Smith (born 2 October 1995) is an English
footballer who plays for club Salford City.

19

Why This is Challenging
Editing requires using context instead of parametric knowledge.
Pretrained models find this difficult.

✓2020–21 Salford City F.C. season
Transfers out
Date

Position

Nationality

Name

To

Fee

…

…

…

…

…

…

14
January
2021

CM

ENG

MartinSmith

ChesterfieldFree
transfer[1] Hurdles to Progress in Long-form Question Answering (Krishna et al., NAACL 2021)[2]Entity-Based Knowledge Conflicts in Question Answering (Longpre et al., EMNLP 2021)

Martin Smith plays
for Salford City.

✕

20

Contributions• “Silver” Training Data: Weak supervision from Wikipedia.
• Gold Evaluation Data: Human annotated evaluation dataset.
• Models: Strong T5-based baselines• Analysis: Error analysis.

21

Data Collection
2020

Updated Article Intros& Mentions

2019

-

=

Joe Biden (2019)
Joseph Robinette Biden Jr. (; born
November 20, 1942) is an American
politician who served as the 47th
vice president of the United Statesfrom 2009 to 2017.
Joe Biden (2020)
Joseph Robinette Biden Jr. (; born
November 20, 1942) is an American
politician who is the 46th andcurrent president of the UnitedStates.

22

Filtering Heuristic
Substance vs. Style
Substantive edits can be identified by the addition of new entity mentions

23

Filtering Heuristic
Substance vs. Style
Substantive edits can be identified by the addition of new entity mentions

Martin Smith (born 2 October 1995) is an
English footballer who plays for club Salford
City.

Martin Smith (born 2 October 1995) is an
English footballer. He currently plays for club
Salford City.

No Added Entities = Stylistic Edit

24

Filtering Heuristic
Substance vs. Style
Substantive edits can be identified by the addition of new entity mentions

Martin Smith (born 2 October 1995) is an
English footballer who plays for club Salford
City.

Martin Smith (born 2 October 1995) is an
English footballer who plays as a midfielder for
National League club Chesterfield.

Added Entities = Substantive Edit

25

Filtering Heuristic
SupportA piece of evidence provides support for an update to an article if theevidence mentions both the article subject, and one of the added entities.

26

Filtering Heuristic
SupportA piece of evidence provides support for an update to an article if theevidence mentions both the article subject, and one of the added entities.
Achaean War
Roman reorganization of Greece+ Politically, the Greek states weregrouped into the Roman province ofMacedonia, though Achaea would
become a separate province under
Augustus.

Evidence

Achaea (Roman province)
Achaea or Achaia (, ‘’Akhaia’’) was a provinceof the Roman Empire…
+ Initially part of the Roman province ofMacedonia, it was made into a separate
province by Augustus.

Update27

Gold Data Collection
Eliminate Unsupported Edits
Not all edits in the target will be supported. We hire annotators to remove them.

Achaean War
Roman reorganization of Greece+ Politically, the Greek states weregrouped into the Roman province ofMacedonia, though Achaea would
become a separate province under
Augustus.

Achaea (Roman province)
Achaea or Achaia (, ‘’Akhaia’’) was a provinceof the Roman Empire…
+ Initially part of the Roman province ofMacedonia, it was made into a separate
province by Augustus in 27 BC.

28

FRUIT-Wiki Dataset>100 thousand training article pairs
from 2019-2020.
~900 annotated evaluation pairs from2020-2021.
High agreement between automaticand human annotations.

29Model - T5 Baseline
Input: Concatenate source article and evidence, delimited by sentinel tokens.

[0] Martin Smith (born 2 October 1995) is an English footballer who plays for club Salford City.
[CONTEXT](0) 2020–21 Salford City F.C. season - Transfers out[HEADER] Date [COL] Position [COL] Nationality [COL] Name [COL] To [COL] Fee [COL][ROW]

14 January 2021 [COL] CM [COL] ENG [COL] Martin Smith [COL] Chesterfield [COL] Free transfer(1) List of Christian Brothers school alumni - Sport - Football (soccer)* Martin Smith - current Kilmarnock footballer - St Aidan’s Catholic Academy, Sunderland

30

Model - T5 Baseline
Input: Concatenate source article and evidence, delimited by sentinel tokens.

[0] Martin Smith (born 2 October 1995) is an English footballer who plays for club Salford City.
[CONTEXT](0) 2020–21 Salford City F.C. season - Transfers out[HEADER] Date [COL] Position [COL] Nationality [COL] Name [COL] To [COL] Fee [COL][ROW]

14 January 2021 [COL] CM [COL] ENG [COL] Martin Smith [COL] Chesterfield [COL] Free transfer(1) List of Christian Brothers school alumni - Sport - Football (soccer)* Martin Smith - current Kilmarnock footballer - St Aidan’s Catholic Academy, Sunderland

31

Model - T5 Baseline
Input: Concatenate source article and evidence, delimited by sentinel tokens.

[0] Martin Smith (born 2 October 1995) is an English footballer who plays for club Salford City.
[CONTEXT](0) 2020–21 Salford City F.C. season - Transfers out[HEADER] Date [COL] Position [COL] Nationality [COL] Name [COL] To [COL] Fee [COL][ROW]

14 January 2021 [COL] CM [COL] ENG [COL] Martin Smith [COL] Chesterfield [COL] Free transfer(1) List of Christian Brothers school alumni - Sport - Football (soccer)* Martin Smith - current Kilmarnock footballer - St Aidan’s Catholic Academy, Sunderland

32

Model - T5 Baseline
Input: Concatenate source article and evidence, delimited by sentinel tokens.

[0] Martin Smith (born 2 October 1995) is an English footballer who plays for club Salford City.
[CONTEXT](0) 2020–21 Salford City F.C. season - Transfers out[HEADER] Date [COL] Position [COL] Nationality [COL] Name [COL] To [COL] Fee [COL][ROW]

14 January 2021 [COL] CM [COL] ENG [COL] Martin Smith [COL] Chesterfield [COL] Free transfer(1) List of Christian Brothers school alumni - Sport - Football (soccer)* Martin Smith - current Kilmarnock footballer - St Aidan’s Catholic Academy, Sunderland

33

Model - T5 Baseline
Output: Generate full text of article.

Tom Krister Kristensson (born 30 April 1991) is a Swedish rally driver, who drives in the ADAC Opel
Rallye Cup. He Is originally from Lund, but now lives in Hörby In 2016 and 2017, Kristensson Competedin the ADAC Opel Rallye Cup, finishing second in 2016 and winning the 2017 championship. In the 2019season of JWRC, Tom finished second behind Jan Solans. The next season he went on to become the 2020
Junior World Rally Champion.

34

Model - EdiT5
Output: Generate Diff + References(2) Tom Krister Kristensson (born 30 April 1991) is a Swedish rally driver, who drives in the JuniorWorld Championship. [1] [2] (1) In the 2019 season of JWRC, Tom finished second behind Jan Solans.
(2) The next season he went on to become the 2020 Junior World Rally champion.

35

Model - EdiT5
Output: Generate Diff + References(2) Tom Krister Kristensson (born 30 April 1991) is a Swedish rally driver, who drives in the JuniorWorld Championship. [1] [2] (1) In the 2019 season of JWRC, Tom finished second behind Jan Solans.
(2) The next season he went on to become the 2020 Junior World Rally champion.

Copy
Sentences36Model - EdiT5
Output: Generate Diff + References(2) Tom Krister Kristensson (born 30 April 1991) is a Swedish rally driver, who drives in the JuniorWorld Championship. [1] [2] (1) In the 2019 season of JWRC, Tom finished second behind Jan Solans.
(2) The next season he went on to become the 2020 Junior World Rally champion.

Reference
Tokens37

Quantitative Evaluation
UpdateROUGE• ROUGE score measured only on updated sentences.
• Prevents high scores from being assigned to no-ops.

Entity Precision/Recall w.r.t. Target• Uses NER to detect entities in target vs. generated updates.
• Affected by content selection.

Unsupported Entity Tokens w.r.t. Evidence• Average number of tokens that the model is “hallucinating”.

38Quantitative Evaluation

39

Quantitative Evaluation
Evidence is needed
to obtain good
performance!

40Quantitative Evaluation
EdiT5 further
improves
performance!

41

Error Analysis
Three Common Types of Error:
1. Incorrect numbers and datese.g., the model outputs 2020 instead of 2021.
2. Distorted evidencee.g., model conflates columns in a table and makes an incorrect claim.
3. Hallucinations
e.g., model output includes new text completely unrelated to the evidence.

48

Error Analysis

49

Conclusion--

Introduce a new task and dataset to explore collaborative methods for
improving consistency in knowledge bases.
Results show that you can use small language models for this task.

- Limitations- Need to provide relevant information- Limited to Wikipedia- Training signal is noisy50Outline

Relevant information
Editing
ModelPart 1FRUIT: Faithfully Reflecting Updated Information in Text
Robert L. Logan IV, Alexandre Passos, Sameer Singh, Ming-Wei Chang
NAACL 2022 BEST TASK PAPER AWARDPart 2

LLM

Editing
Model

Need to seek
information
51

Outline

Relevant information
Editing
ModelPart 1

Part 2

LLM

Editing
Model

Need to seek
information
52

Outline

Relevant information
Editing
ModelPart 1

PURR: Efficiently Editing Language Model Hallucinations by Denoising Language Model Corruptions
Anthony Chen, Panupong Pasupat, Sameer Singh, Hongrae Lee, Kelvin Guu
ArXiv 2023

Part 2

LLM

Editing
Model

Need to seek
information
53

Task: Get Information and Revise
LLM

Editing
Model

Need to seek information

54

PURR Overview
SearchEvidence

What is the world record for the…

At 2:01:09, the current
marathon time held by Eliud

Who holds the marathon world…

In 2022, Kipchoge set thefastest marathon…

QGen Model

The marathon world record is
2:01:39, set by Eliud Kipchogeof Kenya in 2017.

PURR

🐱

The marathon world record is
2:01:09, set by Eliud Kipchogeof Kenya in 2022.
55

Automated Training Pipeline
Where did the California
gold rush take place?”

SearchNews of the discovery of gold,
made by James W. Marshall,
John Sutter's carpenter, spread.
This sparked the Gold Rush from1848 to 1855…

LLM
Summarize

LLM Distort

Evidence
The discovery by JamesMarshall sparked theGold rush…
John Sutter ‘s carpenter,
James W. Marshall, foundgold flakes in a stream…
The Gold Rush took place from1848 to 1855 when gold was
discovered in California…

Train

PURR

🐱

News of the discovery of gold,
made by John Sutter, James W.
Marshall’s carpenter, spread.
This sparked the Gold Rushfrom 1846 to 1858…
56

Evaluation
Given any LM output, revise it so that all claims arefactually consistent to trusted sources…
… while preserving the original text as much as possible.

57

Kipchoge holds the record. He set it in 2017.
100%
A triangle has three sides.

Kipchoge holds the record.
He set it in 2022.

Attribution

Kipchoge holds the record.
He set it in 2017.

Bolt holds the record. He set
it in 2017.

Preservation

100%
58

Measuring Attribution
Percentage of sentences that are fully entailed by at least one evidence.
Eliud Kipchoge set a marathon world record in 2022.
entailed

He trains in Eldoret.

attribution = 50%
since 1 out of 2
sentences are entailed.

https://en.wikipedia.org/wiki/Marathon_world_record_progression

NOTE: your system needs to be good at retrieving evidence.
You only get credit if you can find support for each sentence (edited or not).
59Evaluation Set: LLM Outputs on Variety of Tasks
Natural Questions (NQ)
Long-form question answering"When did Millie Inbetween premiere?"
StrategyQA
Multi-step reasoning"Would it be hard for Edmund Hillary to
climb Mount Wycheproof?"
QReCC
Knowledge-intensive dialog"When was Robert Owen born? …
What was his job? … "

PaLM
PaLM

LaMDA

63

Results

PURR is more than
100x faster than RARR
65

Examples66

Examples67

Examples68Conclusion--

Introduce training data creation pipeline- Automated, combination of real and generated data
- Find real text, but use summarization and corruptions as instancesTrain extremely efficient editors to denoise the text

- Limitations- Tries to find justification for everything- Assumes corpus is trusted and doesn’t contradict itself- Cannot guarantee factuality or consistency69

Outline

Relevant information
Editing
ModelPart 1

PURR: Efficiently Editing Language Model Hallucinations by Denoising Language Model Corruptions
Anthony Chen, Panupong Pasupat, Sameer Singh, Hongrae Lee, Kelvin Guu
ArXiv 2023

Part 2

LLM

Editing
Model

Need to seek
information70

Outline

Relevant information
Editing
ModelPart 1

Part 2

LLM

Editing
Model

Need to seek
information
71

Task: Make text match information

or

LLM

Editing
Model

72

Application: Misgendering/Deadnaming
New name
and/or pronouns

Editing
Model

Deadname
And misgendering

Correct nameand pronouns
73Application: Misgendering/Deadnaming
Caitlyn Jenner(she/her)

Bruce Jenner is part ofthe problem I don't carewhat he thinks
Deadname
And misgendering

Editing
Model

Caitlyn Jenner is part ofthe problem I don't carewhat she thinks
Correct nameand pronouns
74Thank you!
@sameer_sameer@uci.edu
sameersingh.org