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 variant
  • SeeYangZhi/BART-Base-Sarcasm-Rewriter β€” supervised baseline
  • SeeYangZhi/BART-Base-CE-Sarcasm-Rewriter β€” context-enhanced SFT
  • SeeYangZhi/BART-Base-RL-Sarcasm-Rewriter β€” REINFORCE on top of baseline
  • SeeYangZhi/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
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for SeeYangZhi/BART-Base-CE-Sarcasm-Rewriter

Finetuned
(504)
this model