Is My NLP Model Working?
The Answer is Harder Than You Think
Graham Neubig

Language Models
 Vermont isastateinthe northeast US


Simple idea!
But train 500 billion parameters on terabytes of data and…

A New Paradigm in NLP:
Text Generation through LMs+Prompting
Q: What is the capital of Pennsylvania?
A:

Harrisburg

It’s for real this time. After months of legal drama, bad memes and will-they-or-won’t-they-chaos to put yourfavorite rom-com to shame, Elon Musk has closed his $44 billion acquisition of Twitter. Musk sealed the deal
Thursday night, taking Twitter private and ousting a handful of top executives — CEO Parag Agrawal included —in the process.

TL;DR:

Elon Musk has bought Twitter.

How Good is Generated Text?
How do the muscles in your arm work?
The muscles in your arm work by contracting and pulling on the bones inyour arm. This movement is possible because the muscles are attachedto the bones by tendons.
Why do we sleep? Why do we dream?
We sleep to give our bodies and brains a chance to rest and repair
themselves. Dreams may help us process and store memories, or they
may be a way for our brains to work through problems or anxiety.
From GPT-3 versus Google Search by David E. Weekly

https://twitter.com/dweekly/status/1580676295444217857

How Bad is Generated Text? - Factuality
Q: What are the largest states in the US by population and surface area?

A:

Alaska and Texas

Q: What is the net worth of the CEO of Twitter?
Jack Dorsey is the CEO of Twitter.
A:

He is worth $2.5 billion.

How Bad is Generated Text? - Coherence / Plausibility
This is a story about a programmer on her first day of work.
She was given a task to write a program that would print the numbers
from 1 to 100.
But for multiples of three print “Fizz” instead of the number and for themultiples of five print “Buzz”.
For numbers which are multiples of both three and five print “FizzBuzz”.
She was given a week to complete the task.
She was given a week to complete the task.
She was given a week to complete the task.

Evaluating generated text is
now about as hard asgenerating it.

The NLP Development Pipeline
Training DataSystemIdeas

Testing Data

Evaluation Result

The Gold-standard?: Manual Evaluation??

0.8
Hypothesis 1
Source??

0.5
Hypothesis 2

An Alternative: Automatic Evaluation??

0.8
Hypothesis 1
SourceReference??

0.5
Hypothesis 2

The Old Reliables: BLEU/ROUGE Score
Reference: I am giving a talk at a data science conference
Hyp 1: I am giving a talk at a conference about data sciencelots of overlap → high score
Hyp 2: This talk is about recent advances in medical imaging
little overlap → low score

Why is Evaluation Hard?
Reference: I am giving a talk at a data science conference
Hyp 1: I am giving a talk at a political science conference
lots of overlap but bad output
Hyp 2: My lecture will be given to the meeting on data analytics
little overlap but good output(particularly difficult for open-ended problems)Embedding-based Evaluation

https://github.com/Tiiiger/bert_score

BERTScoreLearning to Evaluate
0.5
SourceUpdate0.4
Difference

Reference??

Hypothesis 10.1

https://unbabel.github.io/COMET/Generative Text Evaluation
Use the probability of a generative model to evaluate text??

P(??

)
SourceHypothesis

P(Hypothesis??

P(Hypothesis

Source??

)Reference)

P(Hypothesis

https://github.com/neulab/BARTScore)
Reference

How Do We Evaluate Evaluation?

??

??

Human

Automatic

0.8

0.7

0.5

0.1

Correlation
Pearson = 0.23
Kendall = 0.33??

0.1

0.5

0.6

0.4??

Meta-Evaluation Results

What’s Next?
Training Data

System

Ideas

Testing Data

Evaluation Result

NLP Debugging: Understanding the Flaws in Our Systems●We have a number, but where do we go next?

●Fine-grained aggregate analysis“Your model is under-performing on short sentences.”●Case studies“Caution, potentially incorrect sentence:”
Source:Voda byla skvělá.
Reference: The water was great.
Hypothesis: The water was.

A Case Study: Russian-English Translation

Overall performance: Similar by lexical metrics,
but green system better in COMET.

Example-based Aggregate Analysis

Green system better at short sentences:-> Green system might be better at resolving
cross-sentence ambiguity.

Token-based Aggregate Analysis

Green system better at short words, blue systembetter at long words.
-> Green system needs work on technical terms?Looking Through Examples#Source

Reference

Hyp1

Hyp2335

Также в зонеThe ban on photography Also in the exclusionотчуждения снят запрет in the exclusion zone has zone, a ban onна съемку.
also been lifted.
shooting was lifted.

A ban on filming has
also been lifted in theexclusion zone.

358Кто же мог оказатьсялучше Гуфа?

Who could be better than Who could be betterGuf?
than Guf?

Who could havebeen better thanGoof?

364

У него пушечныеудары.

His strikes are likecannon blows.

He has cannon strikes. He has cannonballs.

https://explainaboard.inspiredco.ai

Using SOTA
Metrics andAggregate
Analysis

import os
import explainaboard_client# Set up your environment
explainaboard_client.username = os.environ['EB_USERNAME']
explainaboard_client.api_key = os.environ['EB_API_KEY']
client = explainaboard_client.ExplainaboardClient()# Do the evaluation
evaluation_result = client.evaluate_system_file(task='machine-translation',
system_name='machine-translation-test',
system_output_file='my-system.txt',
system_output_file_type='text',
dataset='wmt20',
sub_dataset='ruen'
split='test',
source_language='rus',target_language='eng',
metric_names=['bleu', 'chrf', 'comet'],)Web Client: https://github.com/neulab/explainaboard_client
Open-source SDK: https://github.com/neulab/explainaboard

Still Challenges!
●Evaluation: “arms race” of evaluation, generation, and human standard

Generation●Evaluation

Automating Fine-grained Analysis: how to discover interesting behaviors
automatically?

“Your model is under-performing on sentenceswith numerals greater than 5000.”A Recipe for Modern NLP Evaluation
State-of-the-art Metrics

Fine-grained Analysis

BERTScoreEager to hear about your NLP problems!
gneubig@cs.cmu.edu gneubig@inspiredco.ai
https://explainaboard.inspiredco.ai