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

Yu-Shin Huang, Peter Just, Krishna Narayanan, Chao Tian · DOI

Abstract

OD-Stega is a novel framework that optimizes Large Language Model (LLM) probability distributions to maximize the capacity of secret data hidden within generated text. By framing steganography as a constrained entropy maximization problem, the authors provide a principled approach to navigate the "Steganographic Triangle"—the trade-off between data capacity, security (indistinguishability), and robustness. The method provides closed-form solutions for optimizing distributions under various divergence constraints, proving that common techniques like temperature scaling are mathematically optimal for specific security goals.

Introduction

Steganography aims to hide secret messages within a "carrier" such that an adversary remains unaware of the message's existence. Modern "coverless" steganography leverages the generative power of LLMs to create carrier text from scratch using techniques like Arithmetic Coding (AC). However, existing methods often struggle to balance the conflicting goals of the Steganographic Triangle: maximizing capacity (bits per token) while ensuring the text remains indistinguishable from natural language and robust to decoding errors like tokenization mismatches.

Methodology: Optimized Distribution Steganography

The core of OD-Stega is treating the next-token probability distribution as an optimization problem. Instead of using the LLM's raw output distribution ($P$), the framework calculates a new distribution ($Q$) that maximizes entropy—and thus data capacity—while remaining within a predefined "divergence budget" ($\delta$) from the original distribution.

Security Constraints and Optimal Solutions

The authors derive exact mathematical solutions for two primary security constraints:

  1. KL Divergence: Under a Kullback-Leibler (KL) divergence constraint, the optimal distribution $Q$ is achieved through temperature scaling. This provides a rigorous theoretical justification for a widely used heuristic in LLM sampling.
  2. Total Variation (TV): Under a TV constraint, the optimal solution follows a water-filling procedure. This method boosts the probability of unlikely tokens (the "long tail") while capping the most likely ones to increase entropy without exceeding the divergence limit.
The water-filling procedure for optimizing distributions under a Total Variation (TV) constraint, boosting low-probability tokens to increase entropy.

Adaptive Budgeting and Robustness

To maintain text naturalness, OD-Stega uses an adaptive parameter $C$ to scale the divergence budget based on local entropy. This prevents drastic changes in highly predictable contexts where deviations would be easily detected. Additionally, the framework addresses "tokenization mismatch" by iterating through "prefix bits" to ensure the sender and receiver's tokenizers process the text identically.

Experimental Evaluation

The researchers evaluated OD-Stega using Llama2-7B and GPT2-XL models. Detection performance was tested against state-of-the-art detectors, including a custom "GS-Llama" model based on Llama-3.1-8B-Instruct, as well as traditional benchmarks like FCN and SESY.

Key Results

OD-Stega demonstrates a significant improvement in data embedding utilization. By adjusting the $C$ parameter, the framework can increase capacity by 20% while remaining difficult for strong classifiers to detect. Against weaker detectors, capacity gains can reach up to 55%.

Average bits embedded per 25 tokens as a function of the divergence budget parameter C for both KL and TV constraints.

When the divergence budget is set to zero, the generated stego-text is computationally indistinguishable from normal LLM output, resulting in a detection rate of approximately 49.8% (near-random chance) even for advanced transformer-based detectors.

Conclusion and Future Work

OD-Stega provides a mathematically grounded framework for LLM-based steganography. By proving the optimality of temperature scaling and introducing the water-filling approach for TV constraints, it offers a robust way to tune the balance between capacity and security. Future research may explore global optimization strategies that account for the long-term impact of token selection on future embedding capacity, as well as a deeper understanding of the "Just Noticeable Difference" in text naturalness for human and AI observers.

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