SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.18034 · 2026

Semantic Chameleon: Corpus-Dependent Poisoning Attacks and Defenses in RAG Systems

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2603.18034.json · badge: /api/ran/2603.18034.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
scthornton/semantic-chameleon canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_payload_leakage Ran
ran; our contract draft was wrong, not the code
scthornton/semantic-chameleon/experiments/exp2_multimodel_e2e.py
pointer only (licence: NOASSERTION) · get_code("695a132c02848d46")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, scthornton/semantic-chameleon (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cosine_sim Ran
ran; our contract draft was wrong, not the code
scthornton/semantic-chameleon/experiments/exp1_fever_large_scale.py
pointer only (licence: NOASSERTION) · get_code("35888a241a6e7334")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, scthornton/semantic-chameleon (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cosine_sim Ran
ran; our contract draft was wrong, not the code
scthornton/semantic-chameleon/experiments/exp3_joint_hybrid_attack.py
pointer only (licence: NOASSERTION) · get_code("2651ba6348e96208")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, scthornton/semantic-chameleon (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_rag_context Ran
ran; our contract draft was wrong, not the code
scthornton/semantic-chameleon/experiments/exp2_multimodel_e2e.py
pointer only (licence: NOASSERTION) · get_code("2ac3b0adc05e489d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, scthornton/semantic-chameleon (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Retrieval-Augmented Generation (RAG) systems enhance LLMs with external knowledge but introduce poisoning attack surfaces through the retrieval mechanism. We show that a simple hybrid BM25 + vector retriever provides an effective architectural defense against gradient-guided RAG poisoning, and present exploratory evidence that corpus composition affects both attack feasibility and detection difficulty. Using dual-document (sleeper-trigger) poisoning optimized via Greedy Coordinate Gradient (GCG), our large-scale evaluation (n = 50 attacks on Security Stack Exchange, 67,941 docs) shows that gradient-guided poisoning achieves 38.0 % co-retrieval on pure vector retrieval. Across all 50 attacks, hybrid BM25 + vector retrieval reduced gradient-guided attack success from 38 % to 0 %, demonstrating that a simple architectural change at the retrieval layer can eliminate this attack class without modifying the LLM. When attackers jointly optimize for both sparse and dense retrieval channels, hybrid retrieval is partially circumvented (20-44 % success), but still significantly raises the attack bar compared to pure vector retrieval. Across five LLM families (GPT-5.3, GPT-4o, Claude Sonnet 4.6, Llama 4, GPT-4o-mini), attack success varies dramatically from 46.7 % (GPT-5.3) to 93.3 % (Llama 4), demonstrating that modellevel safety training significantly affects resilience to RAG poisoning but does not eliminate the threat. Cross-corpus evaluation at n = 25 on FEVER Wikipedia confirms corpus-dependent effects (0 % attack success across all retrieval configurations). For practitioners, we recommend hybrid retrieval with 𝛼 ≤ 0.5 as an immediately deployable first-line defense, supplemented by model-level safety evaluation and QPD monitoring. • Security and privacy → Intrusion/anomaly detection and malware mitigation; • Information systems → Retrieval models and ranking.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2603.18034")
get_code_for_paper("2603.18034")
have("2603.18034")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2603.18034.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2603.18034.svg)](https://syntology.ai/paper/2603.18034)

Connect an agent — have() is free.