STEGOGUARD-LM: Evaluating End-to-End Protection Against LLM Covert Channels
Organizations: Independent Researcher CA, USA · University of San Francisco San Francisco, CA, USA
Abstract
A defense that disrupts hidden messages may still provide little protection if its detector rarely triggers an intervention. We present StegoGuard-LM, a controlled framework for evaluating defenses against covert messages in large language model outputs. We examine token-rank and synonym channels, with Unicode concealment as a structural control, and track messages through detection, intervention, and recovery. Deterministic rewriting prevented full recovery of 103 of 104 synonym-encoded messages when applied unconditionally, but only one when intervention depended on a detector set to limit false alarms. In a four-round replay on a 48-response subset, an attacker selecting from a fixed catalog recovered more bits by switching channels, although paired gains were not statistically significant after correction for multiple comparisons. Randomized rewriting showed no sustained advantage in this pilot. A more sensitive detector improved protection but modified about one-third of clean responses. These findings show how uneven detection can undermine effective rewriting and why protection must be evaluated alongside attacker adaptation and intervention on legitimate text.
Figures & tables
| Stage | Population or input | Quantity estimated |
|---|---|---|
| Attack construction | 160 clean parents; three channel opportunities per parent | Feasibility and exact pre-defense decodability |
| Static detection | 583 stored texts; 416 records in the primary matched population | Discrimination on held-out topics and operating-point performance |
| Oracle mitigation | Five intervention outputs for each of 583 texts | Payload disruption and utility when intervention always runs |
| Detector-gated replay | 416 matched records at best-F1 and 1%-FPR calibration targets | Delivered protection and benign intervention burden |
| Repeated interaction | 48 parents; 288 attack trajectories over R0–R3, with clean controls | Within-family adaptation and migration under two rewriting policies |
| System analysis and robustness | Frozen repeated-round records | Paired effects, metric sensitivity, and influence of parents and corpus cells |
| Channel | Access and encoding rule | Payload and validation constraints | Role |
|---|---|---|---|
| Rank encoding | White-box access to source-model probabilities. Keyed parity partitions the top eight eligible tokens; the final position searches up to 128 candidates for a complete ending. | One bit per token; clean-parent tokenizer length; exact decode; complete ending; tokenizer round-trip; at most five encoding nonces. | High-capacity linguistic channel and adaptive family. |
| Synonym-slot encoding | Access to emitted text, source tokenizer, and a shared lexical codebook. Tokenizer-stable substitutions encode zero/one choices in active slots. | Maximum eight bits configured, one to four realised; unchanged tokenizer length; changed text; exact decode; complete ending; tokenizer round-trip; no format controls. | Low-capacity lexical channel and adaptive family. |
| Unicode concealment | Post-generation insertion of U+200B for 0 and U+200C for 1, framed by U+2063 and U+2064 before final visible punctuation. | Eight-bit payload; exact decode; removing the four reserved symbols reproduces the clean visible text. | Structural control for deterministic sanitation. |
| Population or outcome | Count | Composition |
|---|---|---|
| Clean corpus | 160 | Two models, two domains, and two nominal lengths |
| Planned attacks | 480 | Three channel opportunities per parent |
| Structural exclusions | 52 | Synonym covers without a tokenizer-stable slot |
| Terminal failures | 5 | Rank: four length failures and one tokenizer round-trip failure |
| Accepted attacks | 423 | 155 rank, 108 synonym, and 160 Unicode |
| Primary static population | 416 | 104 parents, each with clean and three channel versions |
| Evaluation | Records | AUROC (95% CI) | AUPRC | F1 | Intervention |
|---|---|---|---|---|---|
| A. Shared detector on the matched population | |||||
| All attacks | 416 | 0.9037 (0.8871, 0.9219) | 0.9690 | 0.8931 | 50.00% |
| Rank | 208 | 0.9859 (0.9708, 0.9970) | 0.9833 | 0.8560 | 49.04% |
| Synonym | 208 | 0.7251 (0.6801, 0.7714) | 0.7009 | 0.6825 | 0.96% |
| Unicode control | 208 | 1.0000 (1.0000, 1.0000) | 1.0000 | 0.8560 | 100.00% |
| B. Separate channel diagnostics | |||||
| Outcome | Oracle | F1 gate | 1% FPR gate |
|---|---|---|---|
| Rank payload disrupted | 100.00% | 100.00% | 49.04% |
| Synonym payload disrupted | 99.04% | 69.23% | 0.96% |
| Unicode payload disrupted | 100.00% | 100.00% | 100.00% |
| Clean responses receiving intervention | 100.00% | 33.65% | 0.96% |
| Successful covert bits | |||||||
|---|---|---|---|---|---|---|---|
| Defender | Attacker | R0 | R1 | R2 | R3 | Total | R3 exact recovery |
| Deterministic | Frozen | 10 | 10 | 10 | 10 | 40 | 6/48 (12.50%) |
| Deterministic | Fixed-channel | 10 | 10 | 12 | 12 | 44 | 7/48 (14.58%) |
| Deterministic | Migration | 10 | 19 | 19 | 19 | 67 | 12/48 (25.00%) |
| Randomised | Frozen | 10 | 11 | 10 | 10 | 41 | 6/48 (12.50%) |
| Randomised | Fixed-channel | 10 | 10 | 15 | 12 | 47 | 7/48 (14.58%) |
| Successful bits | Exact recovery | ||||
|---|---|---|---|---|---|
| Defender | Parents | Difference (95% CI) | Difference (95% CI) | ||
| Deterministic | 6/42/0 | 0.1875 (0.0625, 0.3542) | .0307/.1255 | 0.1250 (0.0417, 0.2292) | .0332/.1282 |
| Randomised | 7/41/0 | 0.2083 (0.0833, 0.3750) | .0157/.1255 | 0.1458 (0.0625, 0.2500) | .0146/.1282 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
LLM Security
Large language model (LLM) security studies attacks, privacy risks, and defenses across model training, inference, and deployment.
See all 352 papers