ツール利用言語モデルエージェントに対する2つの入力レベル攻撃を研究したコードと記録済み測定値。第1の攻撃は、モデル自身のチャネル制御トークンの短い文字列を信頼できない入力に追加する。トークナイザはそれを既に閉じられた推論チャネルとして読み取るため、モデルは連鎖的思考を出力せず、直接ツール呼び出しへ進む。これによりモニタが依存する推論トレースが削除され、モデルが本来拒否するリクエストでは拒否が完了済みアクションに変換される。第2の結果は、同一のツール呼び出し生成が実際に発火するかどうかはモデルではなくハーネスパーサによって決定されるため、エージェントの堅牢性はモデルとそのデコーディングおよびパースハーネスの共同特性であるということである。
すべての実験は、リリースされたツールサンドボックスを通じて完全精度(bfloat16)かつ貪欲デコーディングで実行され、results/ 以下の記録済みJSONはすべてここにあるスクリプトによって生成される。
論文:「Control-Token Injection Suppresses Chain-of-Thought and Defeats Reasoning-Based Oversight in Tool-Using Agents」。
requirements.txt に固定されたパッケージ(aicomp-sdk 3.1.2、transformers 5.16.1、gymnasium 0.29、openai、openai-harmony)。openai/gpt-oss-20b、google/gemma-4-26B-A4B-it、、。deepseek-ai/DeepSeek-R1-Distill-Qwen-7BQwen/Qwen3-4B-Thinking-2507セットアップ:
python3 -m venv --system-site-packages .venv
source .venv/bin/activate
pip install -r requirements.txt
# download the target models (needs an authenticated Hugging Face CLI)
hf download openai/gpt-oss-20b
hf download google/gemma-4-26B-A4B-it
hf download deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
hf download Qwen/Qwen3-4B-Thinking-2507
gpt-oss-20b は transformers 4.57 または 5.16 で動作する。gemma-4-26B-A4B-it は transformers 5.16 を必要とするマルチモーダルモデルである。gpt-oss の推論抑制測定は両バージョンで同一である。
すべての実験スクリプトは共有ハーネスをインポートするため、experiments をパスに含めて実行すること。各スクリプトは出力を results/ に書き込む。
export PYTHONPATH=experiments
# reproduction gate: the forge empties the gpt-oss analysis channel while the call still fires
python scripts/h200_gate.py
# E1: chain-of-thought suppression at scale
python experiments/e1_cot_suppression.py
# E2: monitor evasion and refusal bypass (generate traces, then score three monitors)
python experiments/e2b_generate.py
JUDGE=gemma python experiments/e2b_judge.py
# E3: parser leniency
python experiments/e3a_parser_leniency.py # deterministic, no model
MODEL=gpt_oss python experiments/e3b_end2end.py
MODEL=gemma python experiments/e3b_end2end.py
python experiments/e3c_gemma_parser_ab.py # same model, two parsers
# E4: generality across reasoning models
MODEL=deepseek-ai/DeepSeek-R1-Distill-Qwen-7B TAG=deepseek python experiments/e4_generality.py
MODEL=Qwen/Qwen3-4B-Thinking-2507 TAG=qwen3 python experiments/e4_generality.py
# E5: defenses
python experiments/e5_defenses.py # input sanitization
python experiments/e5_d2_parser_hardening.py # parser hardening, deterministic
# W1 to W3: ablation, token-level grounding, indirect delivery, cross-stack parser
python experiments/w1_forge_variants.py
python experiments/w1_tokenlevel.py
python experiments/w2_indirect.py
python experiments/w3_truncation_sweep.py
# adaptive empty-reasoning evasion (raw traces, effort sweep, decoy attack, monitor matrix)
python experiments/ad_traces_effort.py
python experiments/ad_decoy.py
python experiments/ad_decoy_judge.py
# regenerate the results figure from the logged JSON
python scripts/make_results_fig.py
experiments/harness.py shared harness: build an agent, run a message through the
sandbox gym env, and read back the reasoning channel, the
fired tool events, and the predicates
experiments/e1_*.py chain-of-thought suppression at scale
experiments/e2*_*.py monitor evasion and refusal bypass (generate, then judge)
experiments/e3*_*.py parser leniency: deterministic, end-to-end, and A/B
experiments/e4_*.py generality across reasoning models
experiments/e5_*.py defenses: sanitization and parser hardening
experiments/w1_*.py ablation of the injected string and token-level grounding
experiments/w2_*.py indirect delivery and broader action types
experiments/w3_*.py truncation robustness of the attack
experiments/ad_*.py adaptive empty-reasoning evasion and raw traces
experiments/*_probe.py, *_debug.py supporting probes used while building the study
scripts/h200_gate.py the reproduction gate
scripts/make_results_fig.py the results figure
results/*.json logged measurements produced by the scripts above
| 実験 | 測定値 |
|---|---|
| E1 (gpt-oss-20b) | 推論チャネルが52.5から0トークン(55タスク中55で空)、安全でないアクションが100パーセント発火 |
| E2 モニタ回避 | ルールベースおよび言語モデルモニタは注入なしで100パーセント検出、注入ありで0パーセント検出。拒否の39.6パーセントが完了済みの持ち出しに変換 |
| E3c パーサA/B (Gemma) | 同一モデルおよび貪欲デコーディング:regexパーサは24中24発火、ネイティブプロセッサパーサは24中0発火 |
| E4 一般性 | gpt-ossは入力注入に対して脆弱。Qwen3-Thinkingのコンプライアンスは閉チャネルプリミティブ下で0.08から1.00へ。DeepSeekは堅牢 |
| E5 防御 | スペース置換サニタイザは攻撃を無効化。単純削除は無害な入力で失敗。パーサ強化は切り捨てられた呼び出しを破棄 |
| 適応型 | 空推論トリップワイヤは空のforgeを捕捉するが、100パーセント発火する1行の無害なデコイによって回避される |
デコーディングは貪欲であるため、各レートは入力ごとに決定論的であり、報告された区間は有限のタスクサンプルを反映している。シード123および8ホップの対話ループはリリースされたサンドボックスと一致する。ターゲットモデルのリビジョンとtransformersのバージョンは requirements.txt に固定され、各スクリプトに記載されている。
MIT License。LICENSE を参照。