English
Safety
Defense
Jailbreak
Multi-turn
Harmful
Benign
TurnGate-0.1 / README.md
Frinkleko's picture
init commit
5f989e3 verified
---
license: apache-2.0
language:
- en
tags:
- Safety
- Defense
- Jailbreak
- Multi-turn
- Harmful
- Benign
pretty_name: MTID
size_categories:
- 10K<n<100K
base_model:
- Qwen/Qwen3-4B-Instruct-2507
datasets:
- Graph-COM/MTID
---
# TurnGate: Response-Aware Defense Against Hidden Malicious Intent in Multi-Turn Dialogue
<a href="https://arxiv.org/abs/2605.05630" target="_blank">
<img alt="arXiv" src="https://img.shields.io/badge/arXiv-TurnGate-red?logo=arxiv&style=for-the-badge" />
</a>
<a href="https://turn-gate.github.io" target="_blank">
<img alt="Website" src="https://img.shields.io/badge/🌎_Homepage-blue.svg?style=for-the-badge" />
</a>
<a href="https://github.com/Graph-COM/TurnGate" target="_blank">
<img alt="GitHub code" src="https://img.shields.io/badge/πŸ’»_Code_GitHub-black.svg?style=for-the-badge" />
</a>
<a href="#cite" target="_blank">
<img alt="Cite" src="https://img.shields.io/badge/πŸ“–_Cite!-lightgrey?style=for-the-badge" />
</a>
<a href="https://www.python.org/" target="_blank">
<img alt="Python" src="https://img.shields.io/badge/Python-3.12-blue?style=for-the-badge" />
</a>
## Overview
TurnGate is a response-aware defense mechanism designed to detect and mitigate hidden malicious intent in multi-turn dialogue systems. Defending state-of-the-art multi-turn malicious attacks like [CKA-Agent](https://cka-agent.github.io/).
![TurnGate Pipeline](https://github.com/Graph-COM/TurnGate/blob/main/assets/pipeline.png?raw=true)
## TurnGate-0.1
TurnGate is a specialized monitor designed to detect hidden malicious intent in multi-turn dialogues. Unlike traditional filters that look at queries in isolation, TurnGate is response-aware: it inspects the assistant's candidate response in the context of the full dialogue history to identify the precise "closure turn" where a harmful objective becomes actionable.
This repository contains the weights for TurnGate-0.1, a model trained on the Multi-Turn Intent Dataset (MTID) and optimized via reinforcement learning with turn-level process rewards.
## Cite
If you find this repository useful for your research, please consider citing the following paper:
```bibtex
@misc{shen2026turnlateresponseawaredefense,
title={One Turn Too Late: Response-Aware Defense Against Hidden Malicious Intent in Multi-Turn Dialogue},
author={Xinjie Shen and Rongzhe Wei and Peizhi Niu and Haoyu Wang and Ruihan Wu and Eli Chien and Bo Li and Pin-Yu Chen and Pan Li},
year={2026},
eprint={2605.05630},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2605.05630},
}
```