ReTokSync: Self-Synchronizing Tokenization Disambiguation for Generative Linguistic Steganography

Yaofei Wang, Rui Wang, Weilong Pang, JiaLiang Han, Yuan Qi, Donghui Hu, Kejiang ChenarXiv 2026

TL;DR

ReTokSync solves the critical issue of "tokenization ambiguity" in generative linguistic steganography, where minor differences in how a receiver parses text can completely corrupt a hidden message. By monitoring the receiver's tokenization view in real-time and executing targeted corrective resets, it prevents catastrophic message loss while maintaining perfect distributional security and negligible computational overhead.

What Problem Does This Paper Address?

Generative Linguistic Steganography (GLS) is a method for hiding secret messages inside natural text generated by Large Language Models (LLMs). Instead of modifying an existing piece of text, a GLS encoder embeds bits of a secret message directly into the step-by-step token selection process of the model.

To successfully extract the message, the receiver must perfectly reconstruct the exact token sequence chosen by the sender. However, modern tokenizers (like Byte-Pair Encoding) suffer from tokenization ambiguity: the exact same string of characters can be split into different token sequences depending on context. For example, a sender might generate the tokens ["any", "thing"], but the receiver's tokenizer groups them as a single token ["anything"].

As shown in Figure 1, a single local mismatch like this breaks the shared decoding state between the sender and receiver. This causes a catastrophic global desynchronization, completely ruining the extraction of all subsequent hidden data.

Figure 1: Impact of tokenization ambiguity in generative linguistic steganography. Although ambiguity is pervasive at the sample level, the tokens that trigger it are sparse. Once triggered, a single local mismatch can cause global extraction failure.

Existing solutions either prune risky tokens in advance—which distorts the model's natural text distribution and makes the steganography easy to detect—or use heavy receiver-side verification that causes massive computational delays.

Methods

The authors introduce ReTokSync (Re-Tokenization Synchronization), a framework that shifts from preventing ambiguity to managing it dynamically.

  1. Online Detection: During text generation, the sender maintains a parallel simulation of what the receiver will see. At each step, it checks if the newly sampled token alters the receiver's tokenization structure.
  2. Corrective Reset: If a mismatch (ambiguity) is detected, the sender decodes the receiver's actual token sequence and immediately resets its own internal embedding state (the message pointer and pseudorandom number generator state) to match the receiver's state. This confines the error to a sparse, local bit flip rather than a global crash (see Figure 2).
  3. Two-Channel Covert Communication: To achieve 100% reliability in continuous multi-turn conversations, the authors pair ReTokSync (acting as a high-capacity primary channel) with a low-rate, error-free auxiliary channel (using an existing method called Syncpool). The auxiliary channel is used periodically to transmit lightweight correction bits for the few local errors that slipped through the primary channel.
Figure 2: Illustration of ReTokSync. When tokenization ambiguity is detected, the sender performs corrective reset to prevent ambiguity-induced errors from propagating to subsequent positions; when no ambiguity occurs, no corrective reset is needed.

Datasets

The framework was evaluated using two main setups:

  • English: The IMDB English dataset, utilizing the Llama-3.1-8B model.
  • Chinese: A Chinese-translated version of the IMDB dataset, utilizing the Qwen3-8B model.

Key Insights and Ideas

  • Ambiguity is globally common but locally sparse: The authors discovered that while a long text sample is highly likely to contain at least one ambiguous tokenization point, the actual tokens causing the issue account for less than 1% of the total sequence.
  • Targeted intervention beats global constraints: Previous methods penalized every single generation step to avoid ambiguity. ReTokSync's "post-processing" philosophy leaves ambiguity-free positions completely untouched, preserving the original LLM distribution perfectly.
  • Asymmetric channel pairing: Combining a high-efficiency channel that accepts sparse errors (ReTokSync) with a low-efficiency, error-free channel (Syncpool) yields a system that is both highly efficient and 100% reliable.

Key Results

  • Perfect Security: ReTokSync achieved strictly zero KL divergence from the baseline steganographic distribution. This means it introduces no statistical anomalies, allowing it to successfully bypass neural steganalysis detectors (which performed at a chance level of ~50%).
  • High Accuracy: On its own, ReTokSync achieved over 99.7% extraction accuracy. When paired with the auxiliary channel in the two-channel setup, it achieved 100% end-to-end recovery across all tested configurations.
  • Negligible Overhead: ReTokSync incurred less than 2% relative time overhead (e.g., 1.74% for Llama-3.1-8B at $k=512$). In comparison, previous verification-based methods suffered from overheads exceeding 500%.
  • Preserved Capacity: It maintained significantly higher embedding capacity compared to pool-based methods (e.g., 3.50 bits/token vs 0.53 bits/token for Syncpool at $k=512$).

Limitations and Future Work

  • Model and Tokenizer Scope: The current evaluation focuses primarily on specific model families (Llama-3 and Qwen) and standard subword tokenization schemes. The authors note that future work should extend the framework to broader model architectures and alternative tokenization methods.
  • Side-Channel Vulnerabilities: While text-level security is mathematically perfect, the authors acknowledge that side-channel risks—such as timing variations, computational latency, or packetization artifacts—remain outside their current security definition and must be addressed separately in real-world deployments.

Summary updated

BibTeX
@misc{wang2026retoksync,
  author = {Yaofei Wang and Rui Wang and Weilong Pang and JiaLiang Han and Yuan Qi and Donghui Hu and Kejiang Chen},
  title = {{ReTokSync: Self-Synchronizing Tokenization Disambiguation for Generative Linguistic Steganography}},
  year = {2026},
  eprint = {2604.25486},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.25486},
}
Figure