wikillm

Paper · 2026-01-08 · cs.CL, cs.CV

PEST: Parameter Efficient Steering of Blackbox VLMs via Agentic Few-shot Alignment for Hateful Meme Moderation

Small PaliGemma-3B agents (caption, label-aware explanation, intervention) fine-tuned on little data write extra text for retrieved example memes. A frozen VLM (GPT-4o, InternVL3.5-8B, Pixtral-12B) then classifies, explains and intervenes in an 8-shot prompt. Author-reported GPT-4o 8-shot accuracy: 80.26 on FHM, 89.10 on MAMI.

Few-shot example selectionIn-context learningMultimodal language modelToxicity detectionhateful-memescontent-moderationfew-shotvision-language-modelexplanationintervention

arXivPDFCodeMarkdown17 min read

AI-compiled by claude-haiku-5-5 on 2026-11-03, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Hateful memes are hard to moderate because their meaning comes from the picture and the text together. Most earlier work only decides whether a meme is hateful. Explaining why, or suggesting a response a user could accept, has mostly been studied on its own. This paper asks for all three at once: a label, a short explanation, and, for hateful memes, an intervention.

Labeled data for that combined task does not exist, and it is expensive to make. The authors therefore use small helper models. Each one, a 3-billion-parameter model, is trained for one job: captioning, explaining, or proposing an intervention. The helpers write extra text for a handful of example memes. A large closed vision-language model then sees those enriched examples in its prompt and does the classification, explanation and intervention itself. Its weights are never changed.

At test time only the captioning helper runs. The explanations and interventions for the examples are written in advance. The idea is to steer a large model with a small one, without training the large one.

TL;DR

  • Four PaliGemma-3B helpers are fine-tuned: caption (A_C), label-aware explanation (A_E), common-sense reasoning, and intervention (A_I) §5.1 tab. 2.
  • For a test meme, only A_C runs. The top 2, 4 or 8 support memes by SigLIP image similarity are added to a few-shot prompt with their precomputed text §5.2.
  • A frozen VLM answers with a label, an explanation, and an intervention if the label is hateful §5.2 app. Prompts and definitions.
  • Author-reported 8-shot GPT-4o: 80.26 accuracy and 80.25 macro-F1 on FHM; 89.10 and 89.07 on MAMI tab. 3.
  • The official code is MIT-licensed. It has the fine-tuning and open-model few-shot scripts. It has no GPT-4o inference code, and several settings differ from the paper (see Paper vs code).

Problem

  • Classification-only moderation leaves out explanation and intervention. Earlier work studies these pieces separately §1.
  • Earlier explanation and intervention work assumes the label is already known. Real moderation cannot assume that §1.
  • No dataset holds labels, explanations and interventions together. Annotating one is costly and subjective §1 §3.
  • Fine-tuning large VLMs needs data and compute. Few-shot prompting avoids fine-tuning, but it had not been used for classification, explanation and intervention together §1 §2.

Method

Overview

The method has an offline stage and an online stage.

  • Offline: fine-tune the task agents, then run them over the support memes to produce captions, explanations and interventions §5.1 §5.2 fig. 2.
  • Online: retrieve similar support memes for each test meme and prompt a frozen VLM with them §5.2.

Agents, all fine-tuned from google/paligemma-3b-pt-448 §5.1:

  • A_C, caption agent: writes a meme-oriented caption for an input meme §5.1.
  • A_E, label-aware explanation agent: writes an explanation given the meme's ground-truth label §5.1.
  • Common-sense step and A_I, intervention agent: a common-sense reasoning model is trained first. The intervention model then writes an intervention using that reasoning §5.1 §5.2.

Agent training data §4 tab. 1:

  • MemeCap train and validation, 5,828 memes, for captions §4.
  • HateRed-Aug, 8,370 memes, for explanations: 2,982 hateful and 5,388 non-hateful. The non-hateful explanations are new annotations by the authors §3 §4.
  • MemeSense, 299 training samples, for common sense and for interventions §4 tab. 1.

Support and evaluation sets §4 tab. 1:

  • FHM support: 8,370 memes, the FHM seed of HateRed-Aug. Their explanations come from HateRed-Aug §5.2.
  • MAMI support: 10,000 training memes, 5,000 misogynistic and 5,000 not §4.
  • Evaluation: FHM test_seen extended with explanations and interventions, 983 memes (485 hateful, 498 non-hateful). MAMI test extended, 945 memes (478 misogynistic, 467 non-misogynistic) §4 tab. 1.

Exemplar selection and enrichment §5.2: each exemplar is chosen by cosine similarity of SigLIP image embeddings to the test image. Exemplars are enriched with the caption (all), the explanation (all), and the intervention (hateful only). The paper does not state the order in which exemplars appear in the prompt.

Agent training, following §5.1 and §5.3:

Pseudocode
# Fine-tune one task agent from PaliGemma-3B  [§5.1] [§5.3]
# Input:  (image, prompt, target text) examples for one task
# Output: fine-tuned agent

def train_agent(examples):
    # Public 3B checkpoint, weights in bfloat16  [§5.3]
    model = load_pretrained("google/paligemma-3b-pt-448")
    # Paper: full fine-tuning. Code freezes the vision tower and projector.
    # [code: finetuning/paligemma_caption_generator_finetuning.py#L106-L109]
    freeze(model.vision_tower)
    freeze(model.multi_modal_projector)
    # Adam, lr 2e-5, weight decay 1e-6, batch size 2  [§5.3]
    for batch in batches(examples, size=2):
        loss = model.loss(batch.images, batch.prompts, batch.targets)
        update_weights(model, loss)
    return model

Enrichment of support memes, offline §5.2:

Pseudocode
# Enrich support memes once, offline  [§5.2] [fig. 2]
# Input:  support memes with labels; agents A_C, A_E, A_I
# Output: per meme: caption, explanation, optional intervention

def enrich_support(support_memes, agents):
    enriched = []
    for meme in support_memes:
        # Caption for every support meme, from A_C  [§5.2]
        caption = agents.caption(meme.image)
        # FHM: explanation from HateRed-Aug; MAMI: from A_E  [§5.2]
        explanation = explanation_source(meme, agents)
        intervention = None
        # Intervention only for hateful memes  [§5.2]
        if meme.label == HATEFUL:
            # Common sense first, then the intervention  [§5.1]
            reasoning = agents.common_sense(meme.image)
            intervention = agents.intervene(meme.image, reasoning)
        enriched.append((meme, caption, explanation, intervention))
    return enriched

Inference on one test meme §5.2 §5.3 app. Prompts and definitions:

Pseudocode
# Classify, explain and intervene on one test meme  [§5.2]
# Input:  test meme, enriched support set, shots n in {2, 4, 8}, VLM
# Output: label, explanation, intervention (only if hateful)

def pest_predict(test_meme, enriched_support, shots, vlm):
    # Only the caption agent runs at test time  [§5.2]
    caption = agents.caption(test_meme.image)
    # Most similar support memes by SigLIP image-embedding cosine  [§5.2]
    exemplars = top_k_by_cosine(test_meme.image, enriched_support, shots)
    # One user turn per exemplar (image, caption, OCR text), then the
    # assistant answer built from its enriched fields  [app. Prompts]
    messages = build_chat(exemplars, test_meme, caption)
    # Frozen VLM: temperature 0.001, at most 100 new tokens  [§5.3]
    reply = vlm.chat(messages, temperature=0.001, max_new_tokens=100)
    return parse_reply(reply)

No equation in the paper is numbered. The retrieval rule is stated in prose as cosine similarity between SigLIP embeddings §5.2.

Hyperparameters

NameValueWhereNotes
agent base modelgoogle/paligemma-3b-pt-448 (3B)§5.1 paligemma_caption_generator_finetuning.pysame base for all four agents
agent training modefull fine-tuning§5.1 §5.3code freezes vision tower and projector: paligemma_caption_generator_finetuning.py, paligemma_target_aware_interpretability_generator_finetuning.py, paligemma_common_sense_analysis.py, paligemma_intervention_generation.py
precisionbfloat16 for weights and biases, in training and inference§5.3 app. Experimental setupcode: paligemma_caption_generator_finetuning.py, bf16 training at paligemma_caption_generator_finetuning.py
optimizer"Adam"§5.3code sets no optimizer. It sets adam_beta2=0.999 in all four scripts (caption #L160, explanation #L191, common sense #L174, intervention #L174). Which optimizer the Trainer used is not stated in the repo
learning rate2e-5§5.3code: caption #L158, explanation #L189, common sense #L172, intervention #L172
weight decay1e-6§5.3code: caption #L159, explanation #L190, common sense #L173, intervention #L173
epochs2 for the small agents§5.3code: caption 1 paligemma_caption_generator_finetuning.py, explanation 1 paligemma_target_aware_interpretability_generator_finetuning.py, common sense 2 paligemma_common_sense_analysis.py, intervention 2 paligemma_intervention_generation.py. See Paper vs code
warmupnot stated—code: 2 steps in all four scripts (caption #L157, explanation #L188, common sense #L171, intervention #L171)
per-device batch sizenot stated—code: 2 in all four scripts; no gradient accumulation set
train / validation splitnot stated—code: first 80% train, rest validation (caption paligemma_caption_generator_finetuning.py; explanation paligemma_target_aware_interpretability_generator_finetuning.py)
support set size n2, 4, 8§5.2 §6code loops over [2, 4, 8] for FHM fhm.py; MAMI InternVL uses [8, 4, 2] mami.py
retrieverSigLIP image encoder (google/siglip-large-patch16-256)§5.2code: fhm.py. CLIP and BLIP in app. Other embedding retrievers
similaritycosine on L2-normalised embeddings§5.2code: rices.py, rices.py
generation temperature0.001§5.3code samples at 0.001 rather than decoding greedily: InternVL fhm.py and fhm.py; Pixtral fhm.py
max new tokens, few-shot VLM100§5.3code: fhm.py, fhm.py
max new tokens, agent inference100 for "all inference experiments"§5.3code uses 50 for agent inference paligemma_caption_generator_finetuning.py
few-shot VLMsGPT-4o (Azure); InternVL3.5-8B (OpenGVLab/InternVL3_5-8B-HF); Pixtral-12B (mistralai/Pixtral-12B-2409)§5.3code: InternVL fhm.py, Pixtral fhm.py. No GPT-4o code (see Paper vs code)
metricsaccuracy, macro-F1; ROUGE-L, semantic similarity (all-MiniLM-L6-v2), BERTScore-F1§5.3toxicity via PerspectiveAPI TOXICITY score, toxic at ≥ 0.7, non-toxic at ≤ 0.3 §6

Datasets

Copied from tab. 1 in the paper, condensed:

DatasetTask focusSplit / label distributionTotal
MemeCapcaptiontrain + val5,828
HateRed-AugexplanationH: 2,982, NH: 5,3888,370
MemeSensecommon sensetrain only299
MemeSenseinterventiontrain only299
FHM (support)few-shot examplessame as HateRed-Aug8,370
MAMI (support)few-shot examplesH: 5,000, NH: 5,00010,000
FHM-extended (test)caption + explanation + interventionH: 485, NH: 498983
MAMI-extended (test)caption + explanation + interventionH: 478, NH: 467945

H is hateful or misogynistic, NH is non-hateful or non-misogynistic.

Results

Author-reported. Setup: FHM and MAMI test splits (extended with explanation and intervention annotations) §4; baselines as cited in §5.4; few-shot VLMs with 8, 4 or 2 shots §6. Hardware for inference is not stated beyond the deployment note in §8.2.

Agent quality tab. 2

Held-out test splits, using the four fine-tuned PaliGemma-3B agents. rgL = ROUGE-L, ss = semantic similarity, bsf1 = BERTScore-F1.

AgentDatasetnrgLssbsf1
caption (A_C)MemeCap5590.35710.66730.9042
explanation (A_E)HateRed2460.37770.63260.9079
common senseMemeSense1340.25010.72120.8999
intervention (A_I)MemeSense1340.34380.78570.9114

Classification tab. 3

Accuracy (acc) and macro-F1 (mF1), in percent. Baseline rows are as the paper lists them. The paper does not say whether they were re-run or copied.

MethodFHM accFHM mF1MAMI accMAMI mF1
PromptHate72.9872.2470.3170.18
ProCap75.1074.8573.6373.42
ModHate57.6053.8869.0568.78
Few-Shot66.0065.8070.5070.10
U-CoT+74.0674.0576.7276.34
M2KE75.7675.6275.8575.71
Vlm-Lim (GPT-4o)73.4073.1083.6083.54
LoReHM (GPT-4o)70.2070.1483.0082.98
InternVL3.5-8B, 0-shot65.2165.1069.4267.53
InternVL3.5-8B, 2-shot71.4171.4171.9671.69
InternVL3.5-8B, 4-shot73.5573.4374.3974.24
InternVL3.5-8B, 8-shot71.4170.3375.3475.25
Pixtral-12B, 0-shot67.8567.8374.0773.31
Pixtral-12B, 2-shot69.7969.7867.9465.88
Pixtral-12B, 4-shot70.3070.2673.6572.89
Pixtral-12B, 8-shot72.5372.4575.4274.99
GPT-4o (PEST), 0-shot75.8975.8986.3586.33
GPT-4o (PEST), 2-shot79.3579.3488.2588.23
GPT-4o (PEST), 4-shot79.4579.4488.7888.75
GPT-4o (PEST), 8-shot80.2680.2589.1089.07

The paper's own summary: 8-shot GPT-4o is best on classification accuracy among the listed methods on both datasets §6. The margins over fine-tuned baselines it reports on FHM mF1 are about 8% (PromptHate), 5.4% (ProCap) and 4.6% (M2KE) §6.

Explanation and intervention tab. 3

ROUGE-L (rgL), semantic similarity (ss) and BERTScore-F1 (bsf1). The paper's column "sprt" is undefined in the table caption beyond the word "support". Its unit is not stated.

MethodFHM-E rgLFHM-E ssFHM-E bsf1FHM-I rgLFHM-I ssFHM-I bsf1FHM-I sprtMAMI-E rgLMAMI-E ssMAMI-E bsf1MAMI-I rgLMAMI-I ssMAMI-I bsf1MAMI-I sprt
HateRed (baseline, explanation)0.1260.4170.862––––0.1050.3610.859––––
MemeSense (baseline, intervention)–––0.2040.6890.880––––0.2250.7300.886–
InternVL3.5-8B, 0-shot0.1830.5080.8780.1030.3230.8603480.1930.5130.8830.1040.2980.857442
InternVL3.5-8B, 2-shot0.2090.5990.8800.2150.5800.8883410.2070.5810.8850.3320.7920.915386
InternVL3.5-8B, 4-shot0.2150.6250.8830.2630.7010.9013240.1860.5690.8820.3730.8300.918388
InternVL3.5-8B, 8-shot0.2270.6350.8870.2900.7770.9072520.1630.5570.8790.3950.8430.919385
Pixtral-12B, 0-shot0.1580.4870.8680.1360.4940.8703450.1700.4620.8720.1380.5300.869429
Pixtral-12B, 2-shot0.1970.5600.8800.2130.6110.8873380.1910.5130.8820.3260.8020.912437
Pixtral-12B, 4-shot0.2110.6060.8840.2490.6990.8973290.1900.5360.8810.3580.8330.918427
Pixtral-12B, 8-shot0.2240.6350.8870.2720.7740.9033300.1700.5500.8790.3910.8490.921418
GPT-4o (PEST), 0-shot0.1950.5490.8790.1260.4180.8663760.2240.5390.8820.1270.4700.865424
GPT-4o (PEST), 2-shot0.2210.6480.8860.1440.4650.8714000.2240.6150.8860.1390.5080.869438
GPT-4o (PEST), 4-shot0.2330.6740.8900.1550.4910.8754010.2310.6410.8880.1720.5650.877444
GPT-4o (PEST), 8-shot0.2420.6790.8910.1950.5630.8834090.2380.6540.8910.2390.6930.894446

Author-reported observations §6: GPT-4o gives the best explanations. The open models (InternVL, Pixtral) give the best interventions. Zero-shot VLMs are much worse than their 8-shot versions.

Toxicity tab. 4

Mean (standard deviation) PerspectiveAPI TOXICITY score, 8-shot setup §6.

TypeModelFHMMAMI
explanationGPT-4o0.17 (0.15)0.18 (0.14)
explanationInternVL3.5-8B0.15 (0.17)0.27 (0.22)
explanationPixtral-12B0.20 (0.20)0.29 (0.21)
interventionGPT-4o0.07 (0.05)0.09 (0.06)
interventionInternVL3.5-8B0.11 (0.06)0.15 (0.07)
interventionPixtral-12B0.14 (0.07)0.16 (0.07)

Author-reported: no mean exceeds 0.3. Interventions are the least toxic.

Human evaluation §6

300 memes: 200 for explanations, 100 for interventions. Two experts rated semantic similarity on a 10-point scale, which the paper says is normalised to [0, 1] (the normalisation is not described). Mean scores per expert (expert 1, expert 2) in the paper's text §6:

  • Explanations, GPT-4o: FHM (0.708, 0.72), MAMI (0.736, 0.756).
  • Explanations, InternVL3.5-8B: FHM (0.654, 0.654), MAMI (0.672, 0.688).
  • Interventions, GPT-4o: FHM (0.568, 0.592), MAMI (0.624, 0.608).
  • Interventions, InternVL3.5-8B: FHM (0.672, 0.644), MAMI (0.748, 0.736).

Human evaluation covered GPT-4o and InternVL only. The paper says Pixtral followed almost the same pattern as InternVL §6.

Analysis §7 fig. 3 fig. 4

Author-reported textual analysis, by subgroup (correct or wrong, hateful or not):

  • Token count: explanations are shorter than interventions in all groups. GPT-4o's lengths are the most consistent across groups fig. 3.
  • Type-token ratio: explanations are more lexically varied than interventions. Interventions are longer but more repetitive fig. 3.
  • Unigram perplexity: interventions have higher perplexity than explanations fig. 3.
  • Sentiment (VADER): explanations for hateful predictions are more negative; GPT-4o interventions are more positive than the open models' fig. 4 §7.

Ablation §8.1

8-shot, FHM, GPT-4o. Variants: no agent (Vn), each single agent, chain-of-thought (CoT) and zero-shot (ZS) prompting. Classification mF1 drops are −4.36 for zero-shot and −3.55 for CoT. Relative drops in semantic similarity against the full three-agent setup (explanation, intervention): only A_C (29%, 28%); only A_E (0%, 28%); only A_I (42%, 3%); Vn (34%, 29%); CoT (19%, 25%); ZS (19%, 26%) §8.1.

Deployment cost §8.2

Fine-tuning each 3B agent on commodity hardware: 30 GB VRAM, batch size 1, bfloat16. Each agent needs about 10 GB at inference. Only A_C is deployed next to the black-box VLM. With 8-shot GPT-4o, one sample takes about 6–7 seconds, using about 1,350 input and 50 output tokens. The author estimate is about USD 0.0041 per sample §8.2.

Other embedding retrievers app. Other embedding retrievers

Table 5 in the paper gives 2-, 4- and 8-shot results with BLIP and CLIP retrievers. Only the 8-shot rows are reproduced here. The paper's conclusion: all three retrievers perform similarly, and SigLIP is the most consistent.

Model, retrieverFHM accFHM mF1FHM-E rgLFHM-E ssFHM-E bsf1FHM-I rgLFHM-I ssFHM-I bsf1MAMI accMAMI mF1MAMI-E rgLMAMI-E ssMAMI-E bsf1MAMI-I rgLMAMI-I ssMAMI-I bsf1
GPT-4o, BLIP79.9679.950.2450.6840.8920.2070.5760.88688.4788.420.2410.6220.8850.1410.4870.869
GPT-4o, CLIP78.6478.630.2460.6830.8920.2010.5650.88489.6389.600.2370.6110.8830.2440.7010.894
InternVL3.5-8B, BLIP71.2170.070.2250.6300.8820.2850.7880.90777.2577.180.1650.5240.8720.3840.8440.919
InternVL3.5-8B, CLIP70.6069.510.2330.6410.8890.2900.7780.90777.6777.640.1610.5220.8710.3810.8460.919
Pixtral-12B, BLIP73.0472.950.2180.6250.8850.2750.7710.90576.3876.130.1700.5220.8730.3890.8470.920
Pixtral-12B, CLIP71.3171.310.2220.6310.8860.2680.7590.90374.2973.810.1690.5230.8730.3680.8470.918

The 8-shot SigLIP rows are in tab. 3. The rows for 2 and 4 shots are not reproduced here, so read tab. 5 for them.

Significance app. Significance test tab. 6

Exact two-sided McNemar test on classification, p-values:

Setup 1Setup 2FHMMAMI
GPT-4o (8)U-CoT+2.7e-54.4e-15
GPT-4o (8)InternVL (8)6.1e-81.1e-20
GPT-4o (8)Pixtral (8)2.9e-73.8e-21
GPT-4o (8)GPT-4o (0)4.5e-40.01
InternVL (8)InternVL (0)0.0517.7e-5
Pixtral (8)Pixtral (0)0.0030.404

Only Pixtral's 8-shot versus its zero-shot version on MAMI is not significant at the paper's level app. Significance test.

Paper vs code

Compared against the official repository at c8c529994988b072ea575b75eef91a7f265281ba, MIT, copyright naquee-rizwan. The paper's introduction links it §1. Its README cites this paper and lists its authors.

  1. Number of agents. The text describes three agents §5.1. Table 2 lists four fine-tuned agents, with common sense separate from intervention tab. 2. The code trains four models: caption, explanation, common sense and intervention paligemma_caption_generator_finetuning.py, paligemma_target_aware_interpretability_generator_finetuning.py, paligemma_common_sense_analysis.py, paligemma_intervention_generation.py. Implement four.
  2. Full fine-tuning vs frozen parts. The paper says full fine-tuning §5.1 §5.3. All four scripts set requires_grad = False on the vision tower and the multi-modal projector: paligemma_caption_generator_finetuning.py, paligemma_target_aware_interpretability_generator_finetuning.py, paligemma_common_sense_analysis.py, paligemma_intervention_generation.py.
  3. Epochs. The paper says 2 epochs for the small agents §5.3. The code uses 1 for captions paligemma_caption_generator_finetuning.py and explanations paligemma_target_aware_interpretability_generator_finetuning.py, and 2 for common sense paligemma_common_sense_analysis.py and intervention paligemma_intervention_generation.py.
  4. Optimizer. The paper says Adam §5.3. The code sets no optimizer, but sets adam_beta2=0.999 in all four scripts paligemma_caption_generator_finetuning.py. Which optimizer that gives is not stated in the repo.
  5. Warmup and batch size. Not in the paper. The code uses 2 warmup steps and per-device batch 2 in all four scripts paligemma_caption_generator_finetuning.py, paligemma_caption_generator_finetuning.py.
  6. Inference temperature. The paper calls 0.001 "very low" to ensure reproducibility §5.3. The code samples: do_sample=True with temperature 0.001 fhm.py, fhm.py. Pixtral uses vLLM sampling at temperature 0.001 fhm.py. Repeat runs can differ.
  7. Agent max new tokens. The paper says 100 for all inference §5.3. Agent inference in code uses 50 paligemma_caption_generator_finetuning.py, paligemma_target_aware_interpretability_generator_finetuning.py, paligemma_common_sense_analysis.py, paligemma_intervention_generation.py. The few-shot VLMs use 100, as the paper says fhm.py.
  8. Explanation exemplars for FHM. The paper says FHM exemplars use HateRed-Aug explanations and that A_E is used only for MAMI §5.2. The code's FHM script builds its explanation lookup from one CSV named for non-hateful FHM training memes fhm.py. A missing key returns an empty string fhm.py. The CSV is not in the repository, so whether hateful exemplars are covered cannot be checked. The MAMI script loads explanations from the explanation agent's JSON output mami.py, which matches the paper.
  9. Intervention for exemplars. The code attaches an intervention only when the exemplar's label is hateful and an intervention exists fhm.py. This matches the paper §5.2.
  10. Explanation prompt in the intervention and common-sense inference scripts. Their test loops build the explanation prompt ("Explain why this meme is harmful"), not an intervention prompt paligemma_intervention_generation.py, paligemma_common_sense_analysis.py. The training prompt for intervention is different paligemma_intervention_generation.py. Use the training prompts when reproducing.
  11. Explanation prompt words. Training uses "hateful" and "not-hateful" paligemma_target_aware_interpretability_generator_finetuning.py. Inference in the same script uses "harmful" and "not-harmful" paligemma_target_aware_interpretability_generator_finetuning.py.
  12. Verification filter. The explanation dataset drops non-hateful rows marked -1 in a verification column paligemma_target_aware_interpretability_generator_finetuning.py. The paper does not mention this filter. Its counts (5,388 non-hateful) may therefore differ from what the code trains on.
  13. Evaluation sets for agents. The paper evaluates agents on held-out splits of MemeCap, HateRed and MemeSense with n = 559, 246 and 134 §6. The explanation and intervention scripts read HARM_P_test_explanations.csv paligemma_target_aware_interpretability_generator_finetuning.py. That file name is not used in the paper, so whether it is the same split cannot be verified.
  14. GPT-4o. The paper's main GPT-4o results were run through Azure §5.3. The repository has no GPT-4o inference code. Its only mention is commented-out calls with the checkpoint name gpt-4o-hate-alert fhm.py. The GPT-4o numbers cannot be reproduced from the repository.
  15. Retriever for the Pixtral FHM run. The paper reports SigLIP results for the main table §5.2. The Pixtral FHM script's main loop runs the CLIP encoder fhm.py. The Pixtral MAMI script runs SigLIP with 8 shots only mami.py, mami.py. Which retriever produced the reported Pixtral FHM numbers is not verifiable.
  16. Few-shot prompt wording. The paper's appendix prompt uses "non-hateful" app. Prompts and definitions. The code's system message uses "not-hateful" and inlines the definitions fhm.py. Labels in the answer are the same.
  17. Exemplar order. The code returns exemplars with the most similar last rices.py. The paper does not state an order.
  18. Shot order in MAMI. The MAMI InternVL run loops over 8, 4, 2 shots mami.py. The paper reports 2, 4 and 8. This affects only run order.

No discrepancies were found for the cosine retrieval itself rices.py or for the top-n selection rices.py.

Pitfalls

  • Four agents, one captioner at test time. Implement four fine-tuned models. At inference, only the caption agent runs §5.2. Explanations and interventions for support memes must be computed offline first.
  • Label leakage risk in A_E. A_E conditions on the ground-truth label §5.1. It is used only to build silver data for support memes. Running it on test memes would leak the label.
  • Intervention is conditional. It is written only for hateful exemplars §5.2. At test time it is asked for only when the model predicts hateful §5.2.
  • Sampling at 0.001. Generation is sampled, not greedy, in both code paths fhm.py, fhm.py. Expect small run-to-run differences. Fix seeds if exact reproduction matters.
  • GPT-4o version unknown. The paper names GPT-4o via Azure §5.3 but does not state a model snapshot or date. Results may not transfer to later GPT-4o versions.
  • Metric backbones. Semantic similarity uses all-MiniLM-L6-v2 §5.3. BERTScore-F1 cites Zhang et al. (2020) but does not name the backbone model. PerspectiveAPI's version is not stated §6.
  • Human-rating scale. The paper describes a 10-point scale, then says the scores are normalised to [0, 1] without describing how §6.
  • Annotation quality. Pilot accuracy above 95% (judged by the first author). Two-annotator re-check on all samples: over 94% agreement, Cohen's κ = 0.932, about 2% of samples rewritten §3.2. Annotators were six researchers aged 21–30 §3.1.
  • Undefined column. "sprt" appears in tab. 3 and its unit is not defined in the paper. Do not treat it as a score.
  • Baseline provenance. The paper does not say whether its baseline numbers were re-run on its splits or copied from the cited works §5.4 tab. 3. Compare with care.
  • Dataset licence not stated. The paper and repository point to new annotations and a dataset on Hugging Face (linked from the repository README). Neither states a licence for the new annotations. This card uses no dataset content. The paper says the dataset will be released after acceptance [Ethics statement].
  • Language. The dataset is primarily English [Limitations]. The authors say helper agents would need checking in other languages.
  • Cost depends on the prompt. The per-sample cost estimate assumes about 1,350 input tokens with 8 shots §8.2. It changes with shot count and image size.
  • Statistical margin. Pixtral's 8-shot gain over zero-shot on MAMI is not significant (p = 0.404) tab. 6.

Lineage

  • Builds on: MemeCap (captions), HateRed (explanations; its dataset is extended to HateRed-Aug), and MemeSense (common sense and interventions) §2 §4. No arXiv ids are given in this card; the paper names them only by author and year.
  • Compared against: PromptHate, ProCap, ModHate, Few-Shot, U-CoT+, M2KE, Vlm-Lim and LoReHM for classification §5.4; HateRed for explanations and MemeSense for interventions §5.4.
  • Superseded by: not known from content in this wiki.

Source and license

Adapted from “PEST: Parameter Efficient Steering of Blackbox VLMs via Agentic Few-shot Alignment for Hateful Meme Moderation” by Naquee Rizwan, Subhankar Swain, Paramananda Bhaskar, Shehryaar Shah Khan, Gagan Aryan, Animesh Mukherjee (arXiv:2601.04692), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/hate-alert/PEST at commit c8c529994988 (MIT). Any quoted code is shown under that license.