Untested hypothesis
A dynamic routing defense using representation-based routing to activate a selective-layer recovery adapter (SLDR) on a fine-tuned LLM-based chemical-reaction extraction model preserves safety refusal on malicious queries while maintaining extraction performance on legitimate synthetic organic chemistry datasets.
Adversarial Debate Score
60% survival rate under critique
Expert panel critique
Independent views, each critiquing the hypothesis on its own — the score rewards genuine disagreement and discounts consensus.
Related patents (prior art)
This hypothesis overlaps subject matter covered by existing third-party patents. It is published as research, not as a patentable claim of ours.
Supporting Research Papers
- Efficient Refusal Ablation in LLM through Optimal Transport
Safety-aligned language models refuse harmful requests through learned refusal behaviors encoded in their internal representations. Recent activation-based jailbreaking methods circumvent these safety...
- TRACE-ROUTER: Task-Consistent and Adaptive Online Routing for Agentic AI
Routing to select large language models (LLMs) with different cost-quality trade-offs has become a fundamental deployment feature of enterprise AI. Existing routers, primarily make independent routing...
- Diffusion LLMs as Targets and Adversaries: Mechanistic Safety Exploits
Diffusion Large Language Models (DLLMs) replace autoregressive next-token prediction with iterative parallel denoising, yet their internal safety mechanisms remain poorly understood. In this work, we ...
- LogicPoison: Logical Attacks on Graph Retrieval-Augmented Generation
Graph-based Retrieval-Augmented Generation (GraphRAG) enhances the reasoning capabilities of Large Language Models (LLMs) by grounding their responses in structured knowledge graphs. Leveraging commun...
Literature Assessment
An LLM's reading of the literature — not computational verification.
Dynamic routing may enhance safety but could affect performance.
Method: literature_meta · Result: inconclusive
Formal Verification
Z3 checks whether the hypothesis is internally consistent, not whether it is empirically true.
This discovery has a Claude-generated validation package with a full experimental design.
Precise Hypothesis
A fine-tuned LLM-based chemical-reaction extraction model, when equipped with (a) a representation-based router that classifies incoming queries as "malicious/dual-use" vs. "legitimate synthetic chemistry" using intermediate-layer activations, and (b) a selective-layer recovery adapter (SLDR) that re-activates a frozen base model's safety-aligned refusal circuitry only on the malicious branch, will achieve both: (i) refusal rate ≥95% on a held-out adversarial/dual-use chemistry prompt set (e.g., synthesis routes to chemical-weapons-relevant or scheduled precursor compounds), and (ii) extraction performance (reaction-SMILES exact-match / F1 on entity-relation extraction) within 2 percentage points of the undefended fine-tuned model's performance on a legitimate benchmark (e.g., USPTO-50k / ORD-derived test set). The claim is falsifiable: it fails if either threshold is not jointly met, or if a static (non-dynamic, always-on) adapter baseline achieves statistically indistinguishable results (i.e., routing provides no measurable marginal benefit).
- Refusal rate on held-out malicious chemistry set falls below 85% (i.e., >15% jailbreak success), OR
- Extraction F1/exact-match on legitimate benchmark drops by >5 percentage points relative to undefended fine-tuned baseline, OR
- A simple static baseline (always-on LoRA safety adapter, no routing) achieves refusal + extraction scores within 1 standard deviation of the dynamic routing approach (p>0.05, paired bootstrap, n≥1000 test items) — this would show routing adds no value over a trivial always-on defense, falsifying the "dynamic" component of the hypothesis specifically.
- An adaptive gray-box attacker (with knowledge that a router exists, but not its weights) achieves >25% jailbreak success rate using representation-space perturbation or paraphrase attacks within a fixed compute budget (e.g., 500 queries/sample), showing the router is trivially bypassable.
Spine & Adversarial ReadReady for validation
“This hypothesis tests whether a representation-based query router combined with a selective-layer safety adapter can restore jailbreak-resistant refusal behavior in a chemistry-extraction-fine-tuned LLM without materially degrading its extraction performance, relative to both an undefended fine-tune and a static always-on adapter baseline.”
- highChemical dual-use overlap is intrinsic at the molecule/reaction level — many legitimate pharmaceutical syntheses share precursors, intermediates, or near-identical procedures with weaponizable routes, so any router operating on query representations may be fundamentally unable to separate 'malicious intent' from 'legitimate chemistry' when the underlying chemistry is identical. This is not a training-data problem solvable by more examples; it may be an information-theoretic limit on the task as framed.The EVP's false-refusal control set (benign-but-suspicious queries) is designed to surface exactly this failure mode, but the protocol does not yet include a theoretical bound on achievable separability given known dual-use molecule overlap (e.g., using a curated set of molecules with documented dual civilian/weapons use). This gap is acknowledged and not resolved — a dedicated chemistry-domain-expert review of the malicious/benign dataset construction is required before results can be trusted, and this is not currently budgeted as a separate step.
- highWhy these specific methodological choices — linear/MLP probe router, LoRA-based selective adapter, USPTO-50k as the extraction benchmark — rather than alternatives like full mechanistic interpretability circuit identification, RLHF-based safety re-training, or constitutional-AI-style inference-time filtering? The EVP does not justify why routing+adapter is the right abstraction versus simpler or more established baselines (e.g., a separate classifier + refusal template, with no architectural modification to the base model at all).Partial justification exists implicitly (LoRA is cheap, layer-selectivity is motivated by known findings that safety behaviors are not uniformly distributed across layers), but this EVP does not include a baseline comparison against the simplest possible alternative — an external classifier gating access to the model entirely (input-level refusal, no architectural change). This is a missing control condition (Condition E) that should be added; without it, a reviewer could reasonably argue the entire SLDR architecture is unnecessary complexity relative to a simple input filter, and the EVP as written cannot rule this out.
- mediumThe adaptive gray-box attack budget (n=500 queries) and methods (PAIR, GCG transfer, paraphrase) are a small, dated subset of the jailbreak literature; a well-resourced adversary with query access could iterate far beyond 500 attempts, and success rate under unlimited-query black-box attack is likely to be substantially higher than under the fixed budget tested here, making the 'preserves safety' claim fragile to the specific threat model chosen.Acknowledged directly in BOUNDARY_CONDITIONS (threat model explicitly scoped to non-adaptive-white-box, bounded-query gray-box). The EVP does not claim robustness beyond this scope and flags adaptive white-box and unlimited-query attacks as future work, not covered by the current success criteria — this is an honest scope limitation rather than a resolved gap.
Experimental Protocol
Minimum viable test (MVT): single open-weight base model (Llama-3.1-8B-Instruct or Mistral-7B-Instruct), fine-tuned on a chemistry reaction-extraction dataset (USPTO-50k subset, n=5,000 train / 1,000 test), compared across 4 conditions: (A) base instruct model (no fine-tune, safety intact, no extraction skill — negative control for extraction, positive control for safety) (B) fine-tuned model, no defense (expected: high extraction, degraded safety — positive control for "alignment tax") (C) fine-tuned model + static always-on safety LoRA adapter (baseline defense) (D) fine-tuned model + SLDR dynamic routing (treatment)
Each condition evaluated on: (1) a legitimate extraction test set (n=1,000 held-out reactions), (2) a malicious/dual-use prompt set (n=300, curated from red-team chemistry-weapons-adjacent queries + existing jailbreak benchmarks adapted to chemistry domain, e.g. AdvBench/HarmBench chemistry subset + synthetic analogues), (3) a benign-but-adjacent "dual-use-sounding but legitimate" control set (n=150, e.g., legitimate pharma synthesis queries that superficially resemble precursor requests) to measure false-refusal rate / over-triggering.
- USPTO-50k (reaction SMILES extraction, public, available via ORD/USPTO-OSI)
- Open Reaction Database (ORD) subset for out-of-distribution generalization test
- HarmBench / AdvBench (jailbreak prompt bases), adapted/extended with ~300 chemistry-specific dual-use prompts (requires red-team authoring — see dependency below)
- A curated "legitimate-but-suspicious-sounding" benign control set (n=150) — must be hand-constructed by domain chemists + safety reviewers (no existing public set covers this precisely)
- Base models: Llama-3.1-8B-Instruct, Mistral-7B-Instruct-v0.3 (open weights, Apache/Llama licenses)
- Compute environment: single-node 4x A100-80GB (fine-tuning + adapter training), inference evaluation on 1x A100-40GB
- Condition D refusal rate ≥95% on malicious set (vs. Condition B baseline, expected ~40–70% refusal post-fine-tuning).
- Condition D extraction F1 within 2 points of Condition B on legitimate set (Condition B F1 expected ~0.75–0.85 on USPTO-50k-style exact match).
- Condition D false-refusal rate on benign-but-suspicious set ≤10% (i.e., doesn't over-trigger).
- Condition D statistically outperforms Condition C (static baseline) on at least one axis (refusal OR extraction) with p<0.05.
- Gray-box adaptive attack success rate against Condition D <15%.
- Any single success criterion above missed by >5 percentage points.
- Router AUROC <0.85 on held-out malicious/legitimate classification (indicates representational separability assumption is false — upstream disproof before even building SLDR).
- Condition D ≈ Condition C (no significant difference) — disproves the "dynamic" novelty claim even if absolute performance is acceptable.
1,800
GPU hours
42d
Time to result
$18,000
Min cost
$95,000
Full cost
ROI Projection
Enterprise LLM deployers in pharma/chemicals (synthesis planning copilots), biosecurity-adjacent AI safety vendors, and LLM API providers offering "safe domain fine-tuning as a service" are direct buyers. Comparable existing market signal: safety-tooling vendors (e.g., Robust Intelligence, Lakera, HiddenLayer) and model providers' internal red-teaming budgets (estimated industry-wide spend >$200M/yr on LLM safety evaluation and guardrail tooling as of 2025). A validated, benchmarked architecture with formal-verification-adjacent claims could command licensing or consulting engagements in the $500K–$2M range per enterprise deployment if independently reproduced and hardened.
🔓 If proven, this unlocks
Proving this hypothesis is a prerequisite for the following downstream discoveries and applications:
- 1generalized-representation-routing-for-multi-domain-dual-use-llms
- 2formal-verification-of-llm-safety-routers
- 3enterprise-domain-llm-safety-certification-framework
Implementation Sketch
# Phase A: Fine-tune + measure alignment tax base_model = load("Llama-3.1-8B-Instruct") ft_model = lora_finetune(base_model, uspto50k_train, rank=16, epochs=3) tax = eval_safety(ft_model, jailbreak_bench) - eval_safety(base_model, jailbreak_bench) # Phase B: Train router activations = extract_hidden_states(ft_model, probe_set, layers=[12..20]) router = train_classifier(activations, labels=["malicious","legitimate"]) assert router.auroc(holdout) > 0.85 # GATE 1 # Phase C: Train SLDR safety_adapter = lora_init(target_layers=select_by_ablation(16,24)) safety_adapter = train_to_restore_refusal( base_refusal_distillation_set, freeze=ft_model.weights ) def sldr_forward(query): route = router(get_activations(ft_model, query, layer=16)) if route == "malicious": return ft_model.forward(query, adapter=safety_adapter) else: return ft_model.forward(query, adapter=None) # unmodified extraction path # Phase D: Evaluation matrix for condition in [base_model, ft_model, ft_model+static_adapter, sldr_forward]: score_extraction(condition, uspto50k_test) score_refusal(condition, malicious_set) score_false_refusal(condition, benign_suspicious_set) # Phase E: Adaptive attack run_graybox_attack(sldr_forward, method=["PAIR","GCG_transfer","paraphrase"], budget=500)
- After Phase B (router training): if AUROC <0.80 after 2 rounds of feature engineering, abort — representational separability assumption likely false for this model family; do not proceed to SLDR build (saves ~60% of remaining budget).
- After initial SLDR training (small-scale, n=200 eval): if extraction F1 drop exceeds 10 points, abort/redesign adapter scope before full-scale 4-condition evaluation.
- Mid-evaluation: if Condition D and Condition C (static baseline) are within 2 points on both metrics at n=300 interim sample, flag for early stop of the "dynamic" novelty claim — can still complete static-defense paper but must reframe hypothesis.
- After adaptive attack phase: if gray-box success rate >40%, abort claims of "preserves safety" pending architecture redesign — do not proceed to formal verification phase.