Hiding Images in Diffusion Models by Editing Learned Score Functions

Haoyu Chen, Yunqiao Yang, Nan Zhong, Kede Ma

Abstract

Recent advancements in neural steganography have shifted the focus from embedding secrets within media files to embedding them directly within the parameters of neural networks. While effective for classifiers and Generative Adversarial Networks (GANs), diffusion models have remained a challenge due to their iterative nature and high sensitivity to parameter perturbations. This paper presents a novel approach that "edits" the learned score functions of a diffusion model at specific timesteps. By utilizing a hybrid parameter-efficient fine-tuning (PEFT) strategy, the method enables near-perfect secret image recovery in a single step while maintaining the original model's generative fidelity.

Introduction

Steganography, the practice of concealing information within another message or physical object, has evolved significantly with the advent of deep learning. Traditional "neural steganography" typically involves modifying a cover image to hide a secret payload. However, such modifications are often detectable by modern steganalysis tools. A more robust alternative is "weight steganography," where information is embedded directly into the weights of a pre-trained model.

Diffusion models, despite their state-of-the-art performance in image synthesis, present unique difficulties for weight steganography. Previous attempts to hide data in these models suffered from a "trilemma" of low recovery accuracy, significant model degradation (fidelity loss), and extreme computational inefficiency. This research addresses these bottlenecks by treating the diffusion process as a series of editable score functions rather than a monolithic multi-step black box.

Methodology: Score Function Editing

The core innovation of this method is the strategic "hijacking" of the diffusion model's score function at a privately selected timestep, $t_s$.

One-Step Extraction

Unlike standard diffusion sampling, which requires hundreds of iterations to generate an image, this method allows for one-step extraction. A recipient with the correct secret key generates a specific Gaussian noise vector. When this vector is processed by the "stego" model at the designated timestep $t_s$, the model directly outputs the secret image. This bypasses the cumulative error and computational cost typically associated with multi-step diffusion recovery.

Hybrid Parameter-Efficient Fine-Tuning (PEFT)

To minimize the footprint of the hidden data and prevent detection by an "inspector," the researchers developed a two-stage tuning process:

  1. Sensitivity Analysis: The method identifies specific layers within the U-Net architecture that are most responsive to the hiding task using gradient-based selection.
  2. LoRA (Low-Rank Adaptation): Only these sensitive layers are updated using LoRA. This approach reduces the number of trainable parameters by approximately 86%, ensuring that the global statistics of the model remain largely unchanged.

Dual-Objective Optimization

The training process utilizes a dual-objective loss function. The first objective ensures Extraction Accuracy, minimizing the difference between the recovered image and the original secret. The second objective maintains Model Fidelity, ensuring that the model’s ability to generate high-quality images at all other timesteps ($t \neq t_s$) remains uncompromised.

Experimental Setup and Datasets

The authors evaluated their method using pre-trained DDPMs on CIFAR10 (32x32) and LSUN Bedroom (256x256). To test the ability to hide complex textures, they used secret images from challenging datasets including COCO, DIV2K, and LSUN Church. These represent a significant increase in complexity over the simple icons or QR codes used in prior steganographic research.

Key Results

The results represent a significant leap over previous diffusion-based hiding methods across three primary metrics:

  • Visual Quality: The method achieved a PSNR of 52.90 dB for 32x32 images and 39.33 dB for 256x256 images. In the context of steganography, values over 30-40 dB are generally considered indistinguishable to the human eye.
  • Model Fidelity: On CIFAR10, the original model had an FID of 4.79, while the stego-model achieved an FID of 4.77. This negligible change indicates that the model's generative performance was preserved.
  • Efficiency: The method is 50x faster than the previous state-of-the-art (WDM), requiring only 0.18 GPU hours to embed a high-resolution secret image.

Discussion and Future Work

The success of this method lies in "localization." By isolating the secret to a specific point in the noise-to-image timeline, the researchers prevent the "entanglement" that typically causes model degradation. Furthermore, this localization allows for multi-recipient channels, where different secrets can be hidden at different timesteps or triggered by different keys within the same model.

While highly effective, the authors note that future work should explore the robustness of these hidden images against model "attacks" such as pruning, quantization, or further fine-tuning. Additionally, establishing theoretical bounds on the total information capacity of a diffusion model remains an open challenge.

Conclusion

By reframing diffusion models as a sequence of editable score functions, this work overcomes the primary hurdles of diffusion-based steganography. The resulting stego-models are efficient to produce, provide high-fidelity secret recovery, and remain statistically indistinguishable from standard generative models.

Summary updated

BibTeX
@inproceedings{chen2025hiding,
  author = {Haoyu Chen and Yunqiao Yang and Nan Zhong and Kede Ma},
  title = {{Hiding Images in Diffusion Models by Editing Learned Score Functions}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01739},
}
Figure