qqp-paraphrase-generation-eval
Revisiting Paraphrase Question Generator using Pairwise Discriminator — Patro et al. (2019) (arXiv:1912.13149, 2019)
What this evaluates
Evaluates a model's ability to generate semantically equivalent paraphrase sentences from an input question, measuring lexical and semantic overlap with ground truth references. The benchmark probes sentence-level semantic understanding and generative fluency in a question-paraphrase setting.
Datasets
Metrics
BLEU (primary) — range: [0, 1]
- Standard n-gram precision metric with a brevity penalty to penalize overly short generations. Typically reported as BLEU-1 (unigram precision).
METEOR — range: [0, 1]
- Harmonic mean of unigram precision and recall, incorporating stemming and synonymy matching to better capture semantic similarity than exact n-gram overlap.
TER — range: [0, 1]
- Translation Error Rate; calculated as the number of edit operations (insertions, deletions, substitutions, shifts) required to match the reference, divided by the reference length.
ROUGE — range: [0, 1]
- Recall-Oriented Understudy for Gisting Evaluation; measures n-gram overlap between the generated and reference text, focusing on recall.
CIDEr — range: [0, 1]
- Consensus-based Image Description Evaluation; uses TF-IDF weighting to measure how well the generated text matches the consensus of multiple reference texts.
Input / output format
Input: Original question text (string)
Output: Generated paraphrase question text (string)
Scoring recipe
def compute_metrics(predictions, references):
bleu = nltk.translate.bleu_score.sentence_bleu(references, pred, weights=(1,0,0,0))
meteor = nltk.translate.meteor_score.single_meteor_score(ref, pred)
ter = ter_score(pred, ref) # edit distance ops / ref length
rouge = nltk.translate.rouge_score.rouge_l(ref, pred)['fmeasure']
cider = nltk.translate.cider_score.cider_score(ref, pred)[0]
return {'BLEU': bleu, 'METEOR': meteor, 'TER': ter, 'ROUGE': rouge, 'CIDEr': cider}
Common pitfalls
- The dataset split is non-standard: 50k/100k training pairs, 5k validation, and 30k test, following specific prior works rather than the official Quora split.
- Metrics are reported as absolute scores and percentage improvements over baselines, but exact tokenization/preprocessing details for BLEU/METEOR are not specified, which can cause score variance across implementations.
Evidence (verbatim from paper)
We observe that the score EDLPS method performs best across all scores (BLEU, ROUGE, METEOR, and CIDEr).
Citation
@misc{patro2019revisiting,
title={Revisiting Paraphrase Question Generator using Pairwise Discriminator},
author={Patro et al. (2019)},
year={2019},
note={arXiv:1912.13149}
}
1---2name: qqp-paraphrase-generation-eval3description: Evaluates a model's ability to generate semantically equivalent paraphrase sentences from an input question, measuring lexical and semantic overlap with ground truth references. The benchmark probes sentence-level semantic understanding and generative fluency in a question-paraphrase setting. Use when the user wants to benchmark on Quora Question Pairs (QQP), or asks about evaluating this task. Reports BLEU.4---56# qqp-paraphrase-generation-eval78> Revisiting Paraphrase Question Generator using Pairwise Discriminator — Patro et al. (2019) (arXiv:1912.13149, 2019)910## What this evaluates1112Evaluates a model's ability to generate semantically equivalent paraphrase sentences from an input question, measuring lexical and semantic overlap with ground truth references. The benchmark probes sentence-level semantic understanding and generative fluency in a question-paraphrase setting.1314## Datasets1516- **Quora Question Pairs (QQP)** — total 400000; splits: train (50000), train (100000), val (5000), test (30000); repo https://data.quora.com/First-Quora-Dataset-Release-Question-Pairs1718## Metrics1920- `BLEU` **(primary)** — range: [0, 1]21 - Standard n-gram precision metric with a brevity penalty to penalize overly short generations. Typically reported as BLEU-1 (unigram precision).22- `METEOR` — range: [0, 1]23 - Harmonic mean of unigram precision and recall, incorporating stemming and synonymy matching to better capture semantic similarity than exact n-gram overlap.24- `TER` — range: [0, 1]25 - Translation Error Rate; calculated as the number of edit operations (insertions, deletions, substitutions, shifts) required to match the reference, divided by the reference length.26- `ROUGE` — range: [0, 1]27 - Recall-Oriented Understudy for Gisting Evaluation; measures n-gram overlap between the generated and reference text, focusing on recall.28- `CIDEr` — range: [0, 1]29 - Consensus-based Image Description Evaluation; uses TF-IDF weighting to measure how well the generated text matches the consensus of multiple reference texts.3031## Input / output format3233**Input**: Original question text (string)3435**Output**: Generated paraphrase question text (string)3637## Scoring recipe3839```python40def compute_metrics(predictions, references):41 bleu = nltk.translate.bleu_score.sentence_bleu(references, pred, weights=(1,0,0,0))42 meteor = nltk.translate.meteor_score.single_meteor_score(ref, pred)43 ter = ter_score(pred, ref) # edit distance ops / ref length44 rouge = nltk.translate.rouge_score.rouge_l(ref, pred)['fmeasure']45 cider = nltk.translate.cider_score.cider_score(ref, pred)[0]46 return {'BLEU': bleu, 'METEOR': meteor, 'TER': ter, 'ROUGE': rouge, 'CIDEr': cider}47```4849## Common pitfalls5051- The dataset split is non-standard: 50k/100k training pairs, 5k validation, and 30k test, following specific prior works rather than the official Quora split.52- Metrics are reported as absolute scores and percentage improvements over baselines, but exact tokenization/preprocessing details for BLEU/METEOR are not specified, which can cause score variance across implementations.5354## Evidence (verbatim from paper)5556> We observe that the score EDLPS method performs best across all scores (BLEU, ROUGE, METEOR, and CIDEr).5758## Citation5960```bibtex61@misc{patro2019revisiting,62 title={Revisiting Paraphrase Question Generator using Pairwise Discriminator},63 author={Patro et al. (2019)},64 year={2019},65 note={arXiv:1912.13149}66}67```6869- arXiv: 1912.13149