Neural Linguistic Steganography

Zachary M. Ziegler, Yuntian Deng, Alexander M. Rush

Introduction

Traditional cryptography ensures message confidentiality by making content unreadable to unauthorized parties. However, the presence of encrypted data itself can signal a hidden communication channel to an adversary. Steganography addresses this by embedding secret messages within a "cover signal"—such as an image or natural language text—to hide the very existence of the communication.

Linguistic steganography faces a significant challenge: balancing "capacity" (how much data can be hidden) with "security" (how indistinguishable the text is from human writing). Older methods like synonym swapping offer low capacity. Modern AI-driven generation methods often fall into the "uncanny valley," producing text that is statistically or perceptually detectable as machine-generated. This paper proposes a method using large-scale neural language models and arithmetic coding to achieve high capacity with near-perfect stealth.

Methodology: Generative Steganography via Arithmetic Coding

The core of the proposed system is the integration of Arithmetic Coding (AC) with a pre-trained GPT-2 (345M) language model. While AC is traditionally a compression algorithm that maps symbols to a fractional value between 0 and 1, the authors reverse this process for steganography.

In this framework, the secret message (a bitstring) is treated as a fraction. The language model provides a probability distribution over the next possible words. The AC algorithm then uses this distribution to "decompress" the message fraction into a sequence of words. Because word selection is directly proportional to the model's predicted probabilities, the resulting "stego-text" follows the language model's distribution almost perfectly.

Visualization of the arithmetic coding process mapping a bitstring message to a sequence of words.

To refine the output, the authors utilize two parameters:

  1. Temperature ($\tau$): Adjusts the "sharpness" of the probability distribution.
  2. Top-$k$ Truncation: Limits word selection to the most likely candidates, preventing the inclusion of suspicious "long-tail" words that might look suspicious to a human reader.

Experimental Setup

The system was evaluated using the CNN/Dailymail (CNNDM) dataset. To ensure the generated text remained coherent and topical, the GPT-2 model was "primed" with the first three sentences of real news articles as context. The performance of the AC-based method was compared against two baselines: Block-based encoding (randomly binning words) and Huffman-based encoding (using variable-length bit strings).

Key Results

The researchers evaluated the system on two fronts: statistical divergence and human perception.

  • Statistical Performance: The primary metric for statistical security is the Kullback-Leibler (KL) divergence, which measures the difference between the stego-text distribution and the original language model distribution. The Arithmetic Coding method consistently achieved the lowest KL divergence across various bitrates (1–5 bits per word), significantly outperforming Huffman and Block methods.
KL divergence vs. bits per word for different encoding methods.
  • Human Indistinguishability: In studies involving human evaluators on Amazon Mechanical Turk, participants were asked to judge if a sentence was a plausible continuation of a news story. At a capacity of 1 bit per word, the AI-generated stego-text was statistically indistinguishable from genuine human-written sentences. Even at higher capacities, such as 3 bits per word, the text remained plausible to humans over 50% of the time, representing a significant improvement over previous state-of-the-art methods.

Discussion and Limitations

The security of this steganographic approach is intrinsically linked to the quality of the underlying language model. If the model produces repetitive phrasing or factual hallucinations, a vigilant human observer might detect the anomaly. Furthermore, the system requires a "shared state": both the sender (Alice) and the receiver (Bob) must use the exact same model weights and the same initial context to successfully decode the message.

As language models continue to evolve (e.g., GPT-3, GPT-4), the "stealthiness" of this method is expected to improve naturally. The fundamental contribution of this work is a provably secure framework that leverages the predictive power of modern AI to hide information in plain sight.

Summary updated

BibTeX
@inproceedings{ziegler2019neural,
  author = {Zachary M. Ziegler and Yuntian Deng and Alexander M. Rush},
  title = {{Neural Linguistic Steganography}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/d19-1115},
}
Figure