[Paper Review] TRYLOCK: Defense-in-Depth Against LLM Jailbreaks via Layered Preference and Representation Engineering
TRYLOCK implements a four-layer defense-in-depth architecture combining DPO weight safety, RepE activation steering, adaptive sidecar classification, and input canonicalization to defend against LLM jailbreaks, achieving an 88.0% reduction in attack success rate on Mistral-7B-Instruct.
Large language models remain vulnerable to jailbreak attacks, and single-layer defenses often trade security for usability. We present TRYLOCK, the first defense-in-depth architecture that combines four heterogeneous mechanisms across the inference stack: weight-level safety alignment via DPO, activation-level control via Representation Engineering (RepE) steering, adaptive steering strength selected by a lightweight sidecar classifier, and input canonicalization to neutralize encoding-based bypasses. On Mistral-7B-Instruct evaluated against a 249-prompt attack set spanning five attack families, TRYLOCK achieves 88.0% relative ASR reduction (46.5% to 5.6%), with each layer contributing unique coverage: RepE blocks 36% of attacks that bypass DPO alone, while canonicalization catches 14% of encoding attacks that evade both. We discover a non-monotonic steering phenomenon -- intermediate strength (alpha=1.0) degrades safety below baseline -- and provide mechanistic hypotheses explaining RepE-DPO interference. The adaptive sidecar reduces over-refusal from 60% to 48% while maintaining identical attack defense, demonstrating that security and usability need not be mutually exclusive. We release all components -- trained adapters, steering vectors, sidecar classifier, preference pairs, and complete evaluation methodology -- enabling full reproducibility.
Motivation & Objective
- Motivate robust LLM safety through defense-in-depth rather than single-layer defenses.
- Integrate four heterogeneous mechanisms across the inference stack to block diverse jailbreak vectors.
- Quantify the complementary, non-redundant protection provided by each layer.
- Demonstrate adaptive steering to balance security and usability.
- Provide complete open-release artifacts to enable reproducibility of layered safety research.
Proposed method
- Integrate four heterogeneous mechanisms into a unified defense stack: DPO-based weight safety, RepE activation-space steering, a sidecar threat classifier, and input canonicalization.
- Train a LoRA adapter with Direct Preference Optimization (DPO) to prefer safe responses over unsafe ones.
- Compute and apply activation-space steering vectors (RepE) derived from contrastive safe/unsafe prompts during inference.
- Use a lightweight sidecar classifier to assign threat levels and select steering strength (alpha) per input.
- Apply input canonicalization to neutralize encoding-based bypasses and improve robustness.
- Release all components and evaluation data to enable full reproducibility.
Experimental results
Research questions
- RQ1Can a multi-layer defense outperform single-layer defenses in preventing LLM jailbreaks?
- RQ2How do weight-level, activation-level, and input-level defenses interact, and are they complementary?
- RQ3What is the impact of adaptive steering on safety versus usability?
- RQ4Can open-release of datasets and adapters enable reproducible layered LLM safety research?
Key findings
- TRYLOCK achieves 88.0% relative ASR reduction (46.5% baseline to 5.6% with TRYLOCK) on Mistral-7B-Instruct-v0.3.
- RepE contributes 36% unique coverage of attacks that bypass DPO alone.
- Canonicalization catches 14% of encoding attacks that evade both RepE and DPO.
- An intermediate steering strength (alpha = 1.0) degrades safety below baseline, revealing non-monotonic steering dynamics.
- Adaptive sidecar classification reduces over-refusal from 60% to 48% while preserving identical attack defense (8.0% ASR).
- The authors release all components and evaluation methodology for reproducibility.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.