OD-Stega: LLM-Based Near-Imperceptible Steganography via Optimized Distributions

Yu-Shin Huang, Peter Just, Krishna Narayanan, Chao Tian · Submission to ICLR 2025 · Rejected

TL;DR

OD-Stega maximizes the information density of LLM-based coverless steganography by mathematically optimizing next-token probability distributions under a bounded Kullback–Leibler (KL) divergence constraint. By flattening token probabilities via an exact closed-form solution, the method embeds 1.25× to 1.5× more secret bits into generated text than truncation-based baselines while preserving natural fluency. The authors also solve practical hurdles such as sub-word tokenization mismatches and computational overhead.

What Problem Does This Paper Address?

In generative text steganography, a sender (Alice) transmits an encrypted secret message to a receiver (Bob) through innocent-looking text. The standard approach pairs an autoregressive Large Language Model (LLM) with an arithmetic coding (AC) decoder: secret bits act as pseudo-random seeds that sample next tokens from the LLM’s predicted conditional distribution $P$.

However, LLM generation is frequently low-entropy or nearly deterministic at specific positions (e.g., common phrases or syntax structures), severely limiting the number of bits embeddable per token without producing extremely long texts. While relaxing the carrier distribution to a flatter distribution $Q$ increases entropy (and thus embedding capacity), naive adjustments lead to bizarre, detectable token choices. Furthermore, modern sub-word tokenizers (like SentencePiece) are non-bijective: detokenizing tokens into text and re-tokenizing them can alter token boundaries, causing Bob to decode gibberish.

Methods

OD-Stega formalizes the capacity–detectability tradeoff as a constrained convex optimization problem at each token step $i$: $$\max_{Q^i} H(Q^i) \quad \text{subject to} \quad D_{\mathrm{KL}}(Q^i \parallel P^i) \le \delta$$

Key technical components include:

  • Closed-Form Optimal Distribution: By analyzing the Karush–Kuhn–Tucker (KKT) conditions, the authors derive the optimal distribution: $$Q_j^i \propto (P_j^i)^{\frac{u}{1+u}}$$ where $u \ge 0$ is a scalar controlling distribution flatness. Because $D_{\mathrm{KL}}(Q^i \parallel P^i)$ is monotonically decreasing with $u$, the exact parameter $u$ matching the divergence budget $\delta$ is determined instantaneously via 1D bisection search.

  • Two-Stage Truncation with Additive KL: To handle vocabularies with tens of thousands of tokens, Alice first removes low-probability tail tokens below an $\epsilon$ cutoff, re-normalizing the distribution to $\hat{P}^i(\epsilon)$. The authors prove that KL divergence decomposes additively: $$D_{\mathrm{KL}}(Q^i \parallel P^i) = -\log(1 - \epsilon) + D_{\mathrm{KL}}(Q^i \parallel \hat{P}^i(\epsilon))$$ allowing exact budget management across truncation and distribution reshaping.

  • Adaptive Sequence-Level Budgeting: Setting a constant $\delta$ distorts positions where natural language is deterministic. OD-Stega sets $\delta_i = C \cdot H(P^i)$ only when $H(P^i) \ge \alpha$, avoiding perturbation of low-entropy positions.

  • Resolving Tokenization Mismatch: Alice prepends $B$ search bits to message $S$ and tests local detokenization/re-tokenization. If a tokenizer merge occurs, she increments $B$ until Bob’s tokenizer is guaranteed to reproduce the exact token sequence.

Datasets

The authors evaluated the method using prompts spanning multiple topics (news, technology, the Olympics, and personal blogs) with prompt lengths between 10 and 20 words. Stego-texts were generated using LLaMA2-7B (vocabulary size 32,000) with the SentencePiece tokenizer. The texts were evaluated against human-likeness criteria using GPT-4 as an automated perception surrogate. No new benchmark dataset was released.

Key Insights and Ideas

  • Tempering Emerges Naturally from KL-Constrained Entropy: The mathematically optimal distribution for maximal capacity under a KL divergence constraint is an exponential tempering (power scaling) of the base probabilities.
  • Optimization Beats Aggressive Truncation: Previous methods relied solely on top-$K$ or threshold truncation to manage statistical divergence. The authors show that keeping a smaller cutoff $\epsilon$ (e.g., 0.01–0.03) and spending the remaining KL divergence budget on continuously optimizing/flattening probabilities embeds far more data per unit of detectability.
  • Sub-Word Tokenization Is Steganography’s Silent Failure Mode: While widely ignored in literature, sub-word merging causes silent decoding failures proportional to message length ($O(n)$). A lightweight prepend-and-verify retry mechanism completely resolves it without protocol-level changes.

Key Results

  • Embedding Utilization: Generating 25-token stego-texts, OD-Stega achieves 1.25× to 1.5× higher bit-embedding capacity than standard truncation-based methods at identical KL divergence levels (e.g., $D_{\mathrm{KL}} \approx 0.02\text{--}0.06$).
  • Imperceptibility & GPT-4 Score: OD-Stega successfully embeds over 20 bytes in 25 tokens while maintaining an average KL divergence $<0.25$. At equivalent GPT-4 "human-written" acceptance rates (scores between 0.77 and 0.85), OD-Stega achieves 1.4× to 1.5× higher embedding rates than truncation-based baselines.
  • At conservative settings (low $\epsilon$, small $C$), the stego-text achieved GPT-4 human-likeness ratings above 0.9, outperforming raw generation without distribution tuning.

Limitations and Future Work

  • Weak-Detector Assumption: The framework targets "near-imperceptibility" under resource- or delay-constrained eavesdroppers. It trades off cryptographic, information-theoretic security ($D_{\mathrm{KL}} = 0$) for capacity.
  • Symmetric Architecture Requirement: Both Alice and Bob must execute identical copies of the LLM weights and tokenization logic, making the scheme vulnerable to minor floating-point non-determinism across different inference backends.
  • Short-Sequence Focus: Experiments primarily focused on short spans (25 tokens). The long-term impact of cumulative KL divergence shifts across long-form multi-paragraph texts requires further investigation.

Summary updated

BibTeX
@inproceedings{huang2026od,
  author = {Yu-Shin Huang and Peter Just and Krishna Narayanan and Chao Tian},
  title = {{OD-Stega: LLM-Based Near-Imperceptible Steganography via Optimized Distributions}},
  booktitle = {EACL (Volume 1: Long Papers)},
  year = {2026},
  doi = {10.18653/v1/2026.eacl-long.36},
}
Figure