Skip to content
S

Sentinel

Finds the exact trigger behind a model backdoor.

Created on 8th August 2026

•

S

Sentinel

Finds the exact trigger behind a model backdoor.

What is the problem your project solves?

Machine learning models can be secretly backdoored during training. An attacker poisons a small slice of the training data — sometimes as little as a few hundred out of tens of thousands of examples — pairing a specific trigger phrase with a target output. The model learns a hidden shortcut: it behaves completely normally on every regular input, but the moment that trigger appears, it flips its output on command. Standard accuracy testing won't catch this, because the model performs perfectly on clean data. The backdoor only reveals itself if you happen to test with the exact trigger — and if you don't know what to look for, you never will.

Why it matters:

This is a real, growing supply-chain risk. Teams increasingly fine-tune and deploy models trained on scraped, crowdsourced, or third-party data, or download pretrained checkpoints from public hubs, without any way to verify what's actually baked into the weights. A backdoored fraud-detection model could be told to always approve a specific fraudulent transaction pattern. A backdoored content-moderation model could be told to always pass a specific phrase. No alert, no code change, no visible sign — the model just quietly does what the attacker wants when triggered.

The impact:

Sentinel is an audit pipeline that doesn't need to know the trigger in advance. Four independent detection methods examine the model's internal activations and behavior from different angles and flag suspicious samples and words without any prior knowledge of what the trigger is. That evidence gets synthesized by an AI reasoning layer into concrete trigger-phrase hypotheses, which are then statistically confirmed against the model's actual behavior — turning "something seems off" into "here is the exact phrase, and here is the proof." The result is a tool teams could run before trusting a model in production: a due-diligence check for the same reason you'd audit a dependency before shipping it, applied to the model itself.

How you are solving it?

Sentinel runs a 5-stage discover → hypothesize → confirm pipeline:

  1. Discovery — four independent detectors vote BACKDOORED/CLEAN with no prior knowledge of any trigger: Activation Clustering and Spectral Signatures inspect internal activations to flag anomalous rows; ONION and Gradient Inversion inspect text/tokens to flag anomalous words.
  2. Aggregation — the flagged evidence is pooled into a sample_pool (rows the row-level detectors agree on) and a word_pool (word/token evidence merged across ONION and Gradient Inversion, ranked by cross-detector agreement and score).
  3. Reasoning — the real Claude API reads the pooled sample and word evidence and proposes candidate trigger phrases, each with a confidence score and the specific rows it is citing.
  4. Confirmation — every candidate is scored as a z-score against a control distribution built from unrelated phrases, on two independent signals (entropy-collapse scanner + STRIP perturbation resistance). A candidate is only confirmed if it is measurably more anomalous than random text.
  5. Proof-of-exploit — the confirmed trigger is appended to real, correctly-classified rows from the audited dataset and shown flipping the model's prediction live, with confidence rising as entropy collapses.

On our reference run (DistilBERT fine-tuned for sentiment classification, poisoned vs. clean checkpoints, 500-row sample): 4/4 discovery detectors vote BACKDOORED, 153 word-pool entries from 85 flagged samples, Claude proposes "Approved under Board Directive 404" at 0.98 confidence citing 7 samples, confirmation clears both signals (scanner z=2.43, STRIP z=3.94 against a threshold of 2.0), and 5/5 held-out clean rows flip when the recovered phrase is appended. We also ran the identical pipeline against a clean control (same 500 rows, poisoning removed): discovery still votes 4/4 — it is a sensitive screen, not a verdict — but confirmation rejects every candidate near z≈0 and the verdict drops to SUSPICIOUS_UNCONFIRMED. That gap is the empirical case for the two-stage design.

Disclosure on prior work (per the submission rules): this repository's git history is fully dated and available. The first commit (the core detection pipeline) landed at 11:03 IST, 27 minutes before this hackathon's official 5-hour build window opened at 11:30 IST. Every other commit — the FastAPI backend, the React dashboard, the negative-control validation, the 67k-row scaling run, and all documentation — was written between 11:30 and 15:50 IST, inside the window. We are stating this plainly: the pipeline skeleton existed minutes before the window opened, and essentially the entire build (detectors wired end-to-end, backend, frontend, validation, docs) happened during the hackathon itself.

Honest scope: this is validated end-to-end on one real model — a DistilBERT checkpoint fine-tuned for binary sentiment classification, in matched clean and backdoored versions we poisoned ourselves so the ground-truth trigger is known for validation. Broader model-architecture compatibility is planned future work, not something already built and tested.

How Did You Use Claude?

Claude is not a chatbot bolted on top — it is the reasoning engine that makes trigger reconstruction possible at all. The four mechanical detectors are single-token by construction (ONION on whitespace words, Gradient Inversion on subword tokens), so a multi-word trigger fragments into several individually unremarkable tokens; in testing, the real trigger's tokens ranked 44th–89th by score alone, buried in noise. A multi-token conjunctive trigger also gives brute-force/greedy search no partial 'warmer/colder' signal to climb toward until the full phrase is present — a structural limitation of mechanical search, not a tuning problem.

We call the real Claude API (via the Anthropic SDK) with the pooled sample_pool and word_pool evidence as structured context. Claude reasons over the flagged sample text to spot the phrase repeating verbatim across otherwise-unrelated rows, and returns a candidate trigger with a confidence score and the specific rows it is citing. On our reference run it proposed "Approved under Board Directive 404" at 0.98 confidence, citing 7 samples — which then had to independently clear the statistical confirmation stage before being trusted. If the API is unavailable, Stage 3 falls back to a deterministic local generator, explicitly tagged is_mock: true, so a degraded run is never mistaken for a real Claude result.

What is the deployed URL for this project?

NA

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio