BART-Base-CE (Context Enhanced)
BART-base fine-tuned with Context Enhancement: the non-sarcastic targets were re-generated with the full article body as additional context for the LLM annotator, producing deeper rewrites.
Part of the Project LLMao sarcasm style transfer suite (CS4248 Team 14, NUS AY2025/26 S2). This model rewrites sarcastic news headlines as neutral, factual equivalents while preserving the underlying meaning.
Task
Input: A sarcastic news headline Output: A non-sarcastic rewrite
Example:
- In: "Area Man Passionate Defender Of What He Imagines Constitution To Be"
- Out: "Man defends his interpretation of the Constitution."
Training
- Base model:
facebook/bart-base(139M params) - Method: Standard cross-entropy on (sarcastic_headline, non_sarcastic_target) pairs where the targets were authored by an LLM with access to the article body. The model itself takes only the sarcastic headline as input at inference time.
- Dataset: 8,258 sarcastic->non-sarcastic headline pairs derived from NHDSD
(News Headlines Dataset for Sarcasm Detection). Non-sarcastic targets were generated
by an LLM annotator (StepFun Step-3.5 Flash) with cross-validation by Nemotron.
Split:
sar_to_non_context_enhanced. - Input format: Raw sarcastic headline (no task prefix β BART is not pretrained with prefixes).
- Generation: beam search with
num_beams=4,max_length=128.
Usage
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "SeeYangZhi/BART-Base-CE-Sarcasm-Rewriter"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
headline = "Area Man Passionate Defender Of What He Imagines Constitution To Be"
inputs = tokenizer(headline, return_tensors="pt", truncation=True, max_length=128)
outputs = model.generate(**inputs, max_length=128, num_beams=4)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Evaluation
Evaluated on a 2,857-sample held-out test split alongside 13 other model variants (BART, T5 baselines, LLaMA 3.2, ablation studies). Metrics include:
| Metric | Direction |
|---|---|
| Hard Flip Rate (% of samples where sarcasm was removed) | higher β |
| Semantic Similarity (all-MiniLM-L6-v2 cosine) | higher β |
| BLEU vs input (lower = more genuine rewriting) | lower β |
| Perplexity (GPT-2) | lower β |
| Normalized edit distance | higher β |
| Paraphrase score (low = real rewriting) | lower β |
Full per-variant numbers are published alongside the Project LLMao webapp.
Related models
SeeYangZhi/Llama-3.2-1B-Sarcasm-Rewriterβ instruction-tuned LLaMA variantSeeYangZhi/BART-Base-Sarcasm-Rewriterβ supervised baselineSeeYangZhi/BART-Base-CE-Sarcasm-Rewriterβ context-enhanced SFTSeeYangZhi/BART-Base-RL-Sarcasm-Rewriterβ REINFORCE on top of baselineSeeYangZhi/BART-Base-CE-RL-Sarcasm-Rewriterβ CE + RL (best)
License
MIT, inheriting from facebook/bart-base. The NHDSD dataset is used under its
original research-use terms.
- Downloads last month
- 3
Model tree for SeeYangZhi/BART-Base-CE-Sarcasm-Rewriter
Base model
facebook/bart-base