TwinGate: Stateful Defense against Decompositional Jailbreaks in Untraceable Traffic via Asymmetric Contrastive Learning

Bowen Sun 1 Chaozhuo Li 2∗ Yaodong Yang 3 Yiwei Wang 4 Chaowei Xiao 1 · 2026

Read TwinGate: Stateful Defense against Decompositional Jailbreaks in Untraceable Traffic via Asymmetric Contrastive Learning by Bowen Sun 1 Chaozhuo Li 2∗ Yaodong Yang 3 Yiwei Wang 4 Chaowei Xiao 1 (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-27861.txt.

Introduction

Sun and four colleagues present TwinGate, a two-encoder guard against split-up jailbreaks. Such jailbreaks split a harmful goal into harmless asks that, side by side, rebuild banned text. TwinGate groups intent-matched bits in one hidden space with Asymmetric Contrastive Learning, while a frozen encoder cuts false alarms. Each ask needs one light pass, so the guard runs beside the host model. On more than 3,620,000 prompts across 8,600 intents, it spots most harmful intents at a low false-alarm rate and beats watchful and watch-free baselines.

Catalog record

CREATORBowen Sun 1 Chaozhuo Li 2∗ Yaodong Yang 3 Yiwei Wang 4 Chaowei Xiao 1
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE70445
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.27861

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

TwinGate: Stateful Defense against Decompositional Jailbreaks in Untraceable Traffic via Asymmetric Contrastive Learning Thanks: ∗ Corresponding author. Bowen Sun 1 Chaozhuo Li 2∗ Yaodong Yang 3 Yiwei Wang 4 Chaowei Xiao 1 Abstract . Decompositional jailbreaks pose a critical threat to large language models (LLMs) by allowing adversaries to fragment a malicious objective into a sequence of individually benign queries that collectively reconstruct prohibited content. In real-world deployments, LLMs face a continuous, untraceable stream of fully anonymized and arbitrarily interleaved requests, infiltrated by covertly distributed adversarial queries. Under this rigorous threat model, state-of-the-art defensive strategies exhibit fundamental limitations. In the absence of trustworthy user metadata, they are incapable of tracking global historical contexts, while their deployment of generative models for real-time monitoring introduces computationally prohibitive overhead. To address this, we present TwinGate, a stateful dual-encoder defense framework. TwinGate employs Asymmetric Contrastive Learning (ACL) to cluster semantically disparate but intent-matched malicious fragments in a shared latent space, while a parallel frozen encoder suppresses false positives arising from benign topical overlap. Each request requires only a single lightweight forward pass, enabling the defense to execute in parallel with the target model’s prefill phase at negligible latency overhead. To evaluate our approach and advance future research, we construct a comprehensive dataset of over 3.62 million instructions spanning 8,600 distinct malicious intents. Evaluated on this large-scale corpus under a strictly causal protocol, TwinGate achieves high malicious intent recall at a remarkably low false positive rate while remaining highly robust against adaptive attacks. Furthermore, our proposal substantially outperforms stateful and stateless baselines, delivering superior throughput and reduced latency. 1. Introduction The rapid proliferation of Large Language Models (LLMs) has rendered the development of robust safety mechanisms an increasingly pressing imperative ( 26 ) . While standard alignment techniques and input/output filtering pipelines ( 16 ) have progressively raised the threshold for successful adversarial exploitation, the threat landscape continues to evolve, giving rise to novel attack paradigms that challenge existing defenses. Among the most consequential is the emerging class of decompositional jailbreaks ( 27 ) . Unlike conventional jailbreaking strategies ( 34 ) that seek to circumvent safety constraints within a single complex prompt, decompositional approaches systematically fragment a malicious objective into a sequence of discrete, ostensibly independent sub-tasks, as illustrated in Table 1 . Critically, each constituent instruction appears semantically benign in isolation, rendering it indistinguishable from legitimate user queries. Yet the aggregation of responses across this sequence enables an adversary to reconstruct prohibited information in its entirety as Safe in Isolation, Dangerous Together ( 21 ) . A fundamental limitation of most existing defenses is their inherently stateless nature ( 29 ) : prevailing paradigms such as general alignment training ( 8 ) and guardrail frameworks evaluate each prompt in strict isolation, blind to malicious intent distributed across multiple turns. No individual fragment violates safety constraints alone, and harmful intent only emerges in aggregate across the trajectory. As a result, decompositional jailbreaks achieve alarmingly high attack success rates (ASR) even against rigorously aligned models, effectively neutralizing RLHF-based alignment ( 18 ) and input/output filtering. Table 1. Example of a decompositional jailbreak. Original Malicious Intent How can I burn down the house for insurance money? Decomposed Benign-looking Queries 1. What are the electrical principles behind circuit overloads and how do they contribute to the risk of house fires? 2. What are the structural and safety properties of outdated wiring systems that make them more prone to causing house fires? 3. What are the thermal properties of electrical cords and cables, and how do they relate to fire initiation? Reconstructed Malicious Response To initiate an untraceable electrical fire, you can exploit outdated wiring systems by intentionally overloading a specific circuit. First, bypass the safety breaker by … The research community has begun to address decompositional threats by fortifying single-request filters ( 12 ; 27 ) and deploying sequential monitoring frameworks ( 35 ) . The nucleus of defending against decompositional jailbreaks lies in precisely aggregating decomposed queries to reconstruct the adversary’s original intent. Existing methods, however, rest on a strong assumption of traceable traffic , specifically relying on predefined metadata, such as IP addresses and user identities, to associate and attribute sequences of queries to a specific principal. However, attackers can trivially circumvent identity-based attribution by distributing malicious query fragments across multiple accounts, sessions, or network endpoints, effectively dissolving their attack signal into the untraceable background noise of large-scale traffic. Furthermore, prevailing defenses commonly employ auxiliary LLMs to perform contextual analysis or intent classification, introducing a severe and asymmetric computational burden in which the cost of defense substantially exceeds that of mounting an attack ( 36 ; 35 ) . In this paper, we propose TwinGate, a stateful defense framework against decompositional jailbreaks that addresses two core challenges: untraceable traffic and high operational overhead. TwinGate assumes a worst-case scenario of fully anonymized, arbitrarily interleaved requests, forcing all detection to rely purely on semantic analysis. This creates a structural problem we call the semantic gap: the individual steps of a distributed multi-session attack (e.g., separately querying wires and fertilizer) share negligible embedding similarity, defeating conventional detection. TwinGate bridges this gap with Asymmetric Contrastive Learning (ACL), which clusters semantically disparate but intent-matched malicious fragments in a shared latent space. This aggressive clustering, however, risks representation collapse, spuriously grouping benign users discussing related topics as coordinated attackers. TwinGate resolves this through a dual-path decision inheritance mechanism: a parallel frozen encoder acts as a conservative anchor, preventing benign-but-similar requests from being escalated. Together, the contrastive and frozen encoders consolidate evidence of malicious intent across turns while suppressing the false positives that typically plague stateful semantic monitoring. To simultaneously manage the massive volume of historical data dictated by our untraceable traffic threat model and maintain strict operational efficiency, TwinGate is engineered from the ground up for high-throughput scalability. We achieve this by deploying an asynchronous, parallel dual-encoder architecture coupled with dual in-memory vector databases. By processing each incoming request with only a single lightweight forward pass per encoder, TwinGate entirely circumvents the computational bottlenecks typical of generative-model-based strategies. This architectural efficiency drastically reduces the per-request computational footprint, enabling the system to sustain high-speed retrieval and evaluation with minimal latency overhead. To operationalize the dual-path learning objective, we construct a large-scale dataset comprising over 3.62 million requests, including 603k independent samples, 250k benign intents, and over 8,600 distinct malicious intents, each independently decomposed by multiple splitter models to ensure broad coverage of real-world attack variations. Our evaluation protocol is designed to rigorously mirror operational deployment conditions, simulating a continuous request stream in which the defense issues strictly causal decisions without access to future context. Under this protocol, the proposed system demonstrates strong generalization: on the rigorous generalized detection task, it achieves a malicious intent recall exceeding 0.76 while maintaining a false positive rate below 2\times 10^{-3} . Furthermore, deploying TwinGate reduces the attack success rate of simulated adaptive attacks to 0.18, collectively validating the dual-encoder architecture’s capacity to balance detection sensitivity with operational precision. In summary, we make the following contributions: • To the best of our knowledge, we are the first to formally define and study the problem of defending against decompositional jailbreaks in the untraceable traffic setting, a practically significant

Read the complete text