Targeted Pooled Latent-Space Steganalysis Applied to Generative Steganography, with a Fix

Etienne Levecque, Aurélien Noirault, Tomás Pevný, Jan Butora, Patrick Bas, Rémi CogrannearXiv 2025 · DOI · arXiv

Introduction

Steganography aims to conceal the existence of a secret message within a cover medium. While traditional methods modify pixels in existing images, generative steganography hides information within the latent vectors (seeds) used by generative AI models, such as Stable Diffusion, to synthesize new images. Because these images are generated from scratch, they often evade detection by standard pixel-based steganalysis. However, this research reveals that the "battlefield" has shifted to the latent space. We identify a statistical "tell" in the distribution of latent vector norms that allows for the detection of hidden messages, particularly when multiple images are analyzed together.

The Latent-to-Latent (L2L) Channel

The security of generative steganography depends on the indistinguishability of "Stego" latent vectors from "Cover" latent vectors. In a typical workflow, a message is embedded into a latent vector $\mathbf{X}$, which is then used to generate an image. This image may undergo compression before being transmitted. At the receiver, the image is "inverted" back into a latent vector $\mathbf{Y}$ to retrieve the message. This entire process defines the latent-to-latent (L2L) channel, denoted as $\mathbf{Y} = f(\mathbf{X}, \alpha)$.

Visual comparison of latent space distributions and vector norms for cover data, existing steganographic encoding, and the proposed fix.

Vulnerability in Latent Space Geometry

The primary vulnerability lies in the geometric distribution of the latent vectors. In many existing schemes, such as the one proposed by Hu et al. [5], message-bearing vectors are placed on a fixed-radius hypersphere. While natural "Cover" latent vectors follow a multivariate Gaussian distribution—where the vector norms follow a specific $\chi_n$ distribution—the fixed-norm "Stego" vectors create a distinct statistical signature.

Even after the noisy process of generation and inversion, the variance of these norms remains significantly different from the cover distribution. An adversary (Eve) can exploit this by performing a Likelihood Ratio Test (LRT) on the norms of the inverted vectors.

Proposed Fix: Scaled Spread Spectrum (SS)

To address this vulnerability, we propose Scaled Spread Spectrum (SS) encoding. Instead of using a fixed radius, the norm of the steganographic latent vector is randomly sampled from a $\chi_n$ distribution. This ensures that the "Stego" data perfectly mimics the statistical "shape" of natural Gaussian noise in the latent space. By re-shaping the data to match the cover distribution, the steganographic signal becomes mathematically indistinguishable from natural variations.

Experimental Results and the Power of Pooling

We evaluated the detection method using 20,000 prompts from the DiffusionDB dataset and the Stable Diffusion 1.5 model. A key finding is the effectiveness of pooled steganalysis. While detecting a hidden message in a single image is challenging (with a probability of error $P_E$ near 50%), the accuracy of the detector improves significantly as the batch size of intercepted images increases.

Probability of error ($P_E$) as a function of batch size, demonstrating the vulnerability of standard SS and the security of Scaled SS.

As shown in the results, for the original fixed-norm scheme, $P_E$ drops from approximately 48% to as low as 30% when the batch size reaches 100 images. In contrast, our proposed Scaled SS fix maintains a $P_E$ of nearly 50% regardless of the batch size, effectively restoring undetectability. Importantly, this security enhancement does not compromise the Bit Error Rate (BER), with message recovery accuracy remaining high at approximately 97%.

Conclusion

This work highlights that as generative models become more sophisticated, steganalysis must move "upstream" from pixels to the latent space. By understanding the high-dimensional geometry of these models, we can both develop more powerful detection tools and design more robust, secure communication methods. Future research will explore more complex latent distributions and the impact of different inversion techniques on detection accuracy.

Summary updated

Abstract

Steganographic schemes dedicated to generated images modify the seed vector in the latent space to embed a message. Whereas most steganalysis methods attempt to detect the embedding in the image space, this paper proposes to perform steganalysis in the latent space by modeling the statistical distribution of the norm of the latent vector. Specifically, we analyze the practical security of a scheme proposed by Hu et al. for latent diffusion models, which is both robust and practically undetectable when steganalysis is performed on generated images. We show that after embedding, the Stego (latent) vector is distributed on a hypersphere while the Cover vector is i.i.d. Gaussian. By going from the image space to the latent space, we show that it is possible to model the norm of the vector in the latent space under the Cover or Stego hypothesis as Gaussian distributions with different variances. A Likelihood Ratio Test is then derived to perform pooled steganalysis. The impact of the potential knowledge of the prompt and the number of diffusion steps is also studied. Additionally, we show how, by randomly sampling the norm of the latent vector before generation, the initial Stego scheme becomes undetectable in the latent space.
BibTeX
@misc{levecque2025targeted,
  author = {Etienne Levecque and Aurélien Noirault and Tomás Pevný and Jan Butora and Patrick Bas and Rémi Cogranne},
  title = {{Targeted Pooled Latent-Space Steganalysis Applied to Generative Steganography, with a Fix}},
  year = {2025},
  eprint = {2510.12414},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.12414},
}
Figure