Near-imperceptible Neural Linguistic Steganography via Self-Adjusting Arithmetic Coding

Jiaming Shen, Heng Ji, Jiawei Han

Abstract

This paper introduces Self-Adjusting Arithmetic Coding (SAAC), a novel method for hiding secret messages within natural-looking text generated by neural language models. By dynamically adjusting the number of candidate words considered at each generation step, SAAC achieves a superior balance between information capacity and statistical imperceptibility. Our approach outperforms previous state-of-the-art methods by up to 38.9% in statistical metrics while maintaining high encoding efficiency.

Introduction

Steganography is the practice of concealing a secret message within a "cover" signal to avoid detection by an observer. In modern digital communication, natural language serves as an ideal cover signal due to its ubiquity. However, this approach faces the "Prisoner’s Problem": if the generated text appears unnatural—characterized by unusual phrasing, rare vocabulary, or grammatical inconsistencies—an eavesdropper (Eve) may become suspicious.

Overview of the linguistic steganography process involving Alice (sender), Bob (receiver), and Eve (eavesdropper).

Traditional generation-based methods often rely on static truncation, such as always selecting from the top $K$ most likely words. This approach is inherently inefficient. Language model distributions vary significantly; in some contexts, the model is highly certain (a "peaky" distribution), while in others, many words are equally probable (a "flat" distribution). A fixed $K$ either risks introducing suspicious, low-probability words or unnecessarily limits the amount of data that can be hidden.

Methodology: Self-Adjusting Arithmetic Coding (SAAC)

To address these limitations, we propose Self-Adjusting Arithmetic Coding (SAAC). Our method builds upon standard Arithmetic Coding (AC), which represents a bitstream as a fractional value in the interval [0, 1]. This interval is then partitioned into sub-intervals proportional to the probabilities of candidate words provided by a language model.

The core innovation of SAAC is dynamic truncation:

  1. Per-step adjustment: Instead of a fixed $K$, SAAC calculates an optimal $K$ at every word-generation step.
  2. Imperceptibility Guarantee: The value of $K$ is chosen such that the cumulative probability of the top-$K$ words meets a predefined threshold ($\delta$). This ensures the generated "stego-text" distribution remains statistically close to the original model's distribution.
  3. Efficiency: By shrinking $K$ when the model is certain and expanding it when it is uncertain, SAAC maintains high encoding speeds and avoids generating "weird" tokens that would alert an eavesdropper.
The SAAC mechanism: mapping a bit sequence to a sequence of words using dynamic interval division and truncation.

Experimental Setup

We evaluated SAAC using GPT-2 Medium (345M parameters) across four distinct domains to demonstrate its versatility:

  • Drug: Reddit comments regarding drug discussions.
  • News: Articles from the CNN/DailyMail dataset.
  • COVID-19: Research snippets from the CORD-19 dataset.
  • Random: Uniformly sampled bit sequences as a baseline.

Results and Discussion

SAAC demonstrates significant improvements over existing methods like Bin-LM and RNN-Stega:

  • Performance Gains: SAAC achieved a 15.3% increase in bits per word (capacity) and a 38.9% reduction in KL divergence (a measure of imperceptibility).
  • High Capacity: The method reached nearly 4.8 bits per word. For a standard 20-word sentence, this translates to approximately 12 bytes of hidden data—sufficient for a cryptographic key.
  • Human Evaluation: In a "Turing Test" for steganography, human evaluators accepted SAAC-generated text as likely continuations of news snippets 51% of the time. For context, they correctly identified real human-written news text only 67% of the time, suggesting SAAC is nearing the threshold of human detection.

A key insight from our work is the "Flat vs. Peaky" realization: language model distributions are highly variable. SAAC’s ability to adapt to these fluctuations is fundamental to its success. Furthermore, we provide a formal theoretical bound showing that controlling per-step KL divergence can guarantee the near-imperceptibility of the entire sequence.

Limitations and Future Work

Despite its success, SAAC faces challenges regarding factual consistency. While the generated text is grammatically sound, it may contain factual hallucinations (e.g., incorrect details about public figures), which remain a primary detection vector for human observers. Additionally, the current method assumes a passive eavesdropper; active modification of the text by Eve would likely corrupt the hidden message. Future research will focus on making neural steganography robust to such active attacks and addressing the requirement for perfect model synchronization between sender and receiver.

Summary updated

BibTeX
@inproceedings{shen2020near,
  author = {Jiaming Shen and Heng Ji and Jiawei Han},
  title = {{Near-imperceptible Neural Linguistic Steganography via Self-Adjusting Arithmetic Coding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.22},
}
Figure