We propose TRACE, a structure-aware framework leveraging diffusion models for localized character encoding to embed data. Unlike existing methods that rely on edge features or pre-defined codebooks, TRACE exploits character structures that provide inherent resistance to noise interference due to their stability and unified representation across diverse characters. Our framework comprises three key components: (1) adaptive diffusion initialization that automatically identifies handle points, target points, and editing regions through specialized algorithms including movement probability estimator (MPE), target point estimation (TPE) and mask drawing model (MDM), (2) guided diffusion encoding for precise movement of selected point, and (3) masked region replacement with a specialized loss function to minimize feature alterations after the diffusion process. Comprehensive experiments demonstrate \name{}'s superior performance over state-of-the-art methods, achieving more than 5 dB improvement in PSNR and 5% higher extraction accuracy following cross-media transmission. \name{} achieves broad generalizability across multiple languages and fonts, making it particularly suitable for practical document security applications.
Figures & tables
Figure 1: Illustration of different document hiding methods. Image-based methods embed information by adjusting the proportion of black pixels but are vulnerable to noise from cross-media transmission, leading to extraction errors. Font-based methods rely on predefined character codebooks, which limits their generalizability when encountering unseen characters. In contrast, our method leverages character structures to guide diffusion-based encoding, ensuring broad applicability. Moreover, character structures are more stable to noise, providing strong robustness.
Figure 2: TRACE Embedding Pipeline. Step 1. Adaptive Diffusion Initialization: Handle points, target points, and masks are identified to guide the subsequent diffusion process. Step 2. Guided Diffusion Encoding: The diffusion model’s UNet is fine-tuned via LoRA to better capture original image features. The marked image is then generated by controlled movement of handle points to target points within the predefined mask region. Step 3. Masked Region Replacement: The content within the mask of the original image is replaced with the corresponding encoded segments.
Figure 3: Illustration the direction of Ph movements corresponding to its stroke in various orientations.
Table 4
Figure 4: Robustness against Print-camera with varying viewpoint and distance.
Figure 5: Visual comparisons of encoded images of our TRACE and the comparison method [ 29 ] .
Method
Arial
TNR
Calibri
Simsun
Simhei
PSNR ↑
ASF
26.56
27.29
27.46
30.34
26.23
TRACE
36.76
36.51
32.38
40.98
40.05
SSIM ↑
ASF
0.984
0.986
0.985
0.989
0.986
TRACE
0.996
0.995
0.995
0.998
0.998
Table 5: PSNR and SSIM of TRACE and ASF, with best ACC marked in boldface .
Method
Screenshots
Print-scan
Print-camera
PSNR
SSIM
Handwritten
94.43
93.17
91.67
38.20
0.996
Artistic
97.27
94.77
92.93
41.37
0.995
Table 6: Invisibility and Robustness of TRACE on handwritten to artistic fonts, evaluating robustness to screenshots, print-scan, and print-camera.
Figure 6: Generalizability of our TRACE from handwritten to artistic fonts.
Figure 7: Hyper-parameter Sensitivity Analysis: Impact of D and τ on Watermarking Robustness (ACC) and Imperceptibility (PSNR, SSIM).
Design
Setting 1
Setting 2
Setting 3
Setting 4 (Ours)
MPE
✗
✓
✗
✓
TPE
✗
✗
✓
✓
ACC
49.95
68.75
53.50
100
Table 7: Ablation study on MPE and TPE. (✗: random point selection operation, ✓: MPE or TPE operation).
Figure 8: Ablation study on Llc loss, taking lowercase letters ‘g’ and ‘u’ in Calibri as examples.
Figure 9: Ablation study on MRR across various fonts in 12pt.
Strength
12pt
16pt
20pt
24pt
28pt
36pt
Light
97.83
98.56
98.91
99.12
99.54
99.96
Strong
96.54
97.21
97.89
98.35
98.92
99.74
Table 8: The robustness of our TRACE against structure morphing attack of varying strengths and font sizes.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Figure A : Three heatmaps output by the keypoint extraction network, including an endpoint heatmap, a junction point heatmap, and a background heatmap.
Figure B : Examples of handle points and target points selected by MPE and TPE, respectively, and masks drawn by MDM.
Method
PSNR (dB) ↑
SSIM ↑
ACC (%) ↑
w/o Rule 1:
25.24
0.911
63.33
w/o Rule 2:
39.48
0.997
80.67
w/o Rule 3:
32.82
0.965
68.51
MPE (Ours)
32.10
0.962
100.00
Appendix
Table A : Ablation study on MPE scoring rules, failed cases ( i.e . , PSNR < 30dB, SSIM < 0.95, and ACC < 85%) are marked in red.
Figure C : Examples of Japanese, Korean, Russian, and Arabic characters embedding ’0’ and ’1’ using the TRACE method.
Figure D : Generalizability in mathematical formulas, each character in every formula embeds 0 and 1 bits, respectively.
Number of words
5
10
15
20
8bit
97.78
100.00
100.00
100.00
16bit
59.76
99.62
100.00
100.00
32bit
0.37
61.16
99.03
100.00
Appendix
Table B : Impact of embedded bits and consecutive word count on average extraction accuracy.
Figure E : The visual effects of our method and the comparison methods.
Category
Method
Robustness
Generalizability
Integrity
Print-scan
Print-camera
Screenshot
Handwritten
artistic
formula
Language-universality
Font-based
[ 18 , 27 ]
✓
✓
✓
✗
✗
✗
✗
✓
Image-based
[ 13 , 11 ]
✓
✓
✓
✓
✗
✓
✓
✓
Format-based
[ 4 ]
✓
✗
✓
✓
✓
✓
✓
✓
Linguistic-based
[ 12 , 6 , 28 , 7 ]
✓
✓
✓
✗
✓
✗
✗
✗
TRACE (Ours)
✓
✓
✓
✓
✓
✓
✓
✓
Appendix
Table C : Qualitative comparison with related work from different perspectives.
Figure F : Visual comparisons of our TRACE and the comparison method AutoStegaFont [ 29 ] on encoded images of the Arial font, (a) original images, (b) encoded images embedding “0” by TRACE, (c) encoded images embedding “1” by AutoStegaFont, (d) encoded images embedding “1” by TRACE, (e)encoded images embedding “0” by AutoStegaFont.
Figure G : Visual comparisons of our TRACE and the comparison method AutoStegaFont [ 29 ] on encoded images of the Calibri font, (a) original images, (b) encoded images embedding “0” by TRACE, (c) encoded images embedding “1” by AutoStegaFont, (d) encoded images embedding “1” by TRACE, (e)encoded images embedding “0” by AutoStegaFont.
Figure H : Visual comparisons of our TRACE and the comparison method AutoStegaFont [ 29 ] on encoded images of the Times New Roman font, (a) original images, (b) encoded images embedding “0” by TRACE, (c) encoded images embedding “1” by AutoStegaFont, (d) encoded images embedding “1” by TRACE, (e)encoded images embedding “0” by AutoStegaFont.
Figure I : Visual comparisons of our TRACE and the comparison method AutoStegaFont [ 29 ] on encoded images of the Simhei font, (a) original images, (b) encoded images embedding “0” by TRACE, (c) encoded images embedding “1” by AutoStegaFont, (d) encoded images embedding “1” by TRACE, (e)encoded images embedding “0” by AutoStegaFont.
Figure J : Visual comparisons of our TRACE and the comparison method AutoStegaFont [ 29 ] on encoded images of the Simsun font, (a) original images, (b) encoded images embedding “0” by TRACE, (c) encoded images embedding “1” by AutoStegaFont, (d) encoded images embedding “1” by TRACE, (e)encoded images embedding “0” by AutoStegaFont.
Diffusion models generate high-quality images but pose serious risks like copyright violation and disinformation. Watermarking is a key defense for tracing and authenticating AI-generated content. However, existing methods rely on threshold-based detection, which only supports fuzzy matching and cannot recover structured watermark data bit-exactly, making them unsuitable for offline verification or applications requiring lossless metadata (e.g., licensing instructions). To address this problem, in this paper, we propose Gaussian Shannon, a watermarking framework that treats the diffusion process as a noisy communication channel and enables both robust tracing and exact bit recovery. Our method embeds watermarks in the initial Gaussian noise without fine-tuning or quality loss. We identify two types of channel interference, namely local bit flips and global stochastic distortions, and design a cascaded defense combining error-correcting codes and majority voting. This ensures reliable end-to-end transmission of semantic payloads. Experiments across three Stable Diffusion variants and seven perturbation types show that Gaussian Shannon achieves state-of-the-art bit-level accuracy while maintaining a high true positive rate, enabling trustworthy rights attribution in real-world deployment. The source code have been made available at: https://github.com/Rambo-Yi/Gaussian-Shannon
Yi Zhang, Hongbo Huang, Liang-Jie Zhang
Center for AI Services Computing, College of Computer Science and Software Engineering, Shenzhen University
We introduce TextSeal, a state-of-the-art watermark for large language models. Building on Gumbel-max sampling, TextSeal introduces dual-key generation to restore output diversity, along with entropy-weighted scoring and multi-region localization for improved detection. It supports serving optimizations such as speculative decoding and multi-token prediction, and does not add any inference overhead. TextSeal strictly dominates baselines like SynthID-text in detection strength and is robust to dilution, maintaining confident localized detection even in heavily mixed human/AI documents. The scheme is theoretically distortion-free, and evaluation across reasoning benchmarks confirms that it preserves downstream performance; while a multilingual human evaluation (6000 A/B comparisons, 5 languages) shows no perceptible quality difference. Beyond its use for provenance detection, TextSeal is also ``radioactive'': its watermark signal transfers through model distillation, enabling detection of unauthorized use.
Watermarking methods for language models have been studied extensively in the autoregressive setting, where tokens are generated sequentially. These works largely focus on local-context schemes that perturb the next token's distribution as a function of its preceding tokens. In diffusion language models, distributions over many unresolved positions are jointly sampled, allowing additive statistics of the entire sequence to be tractable during generation. We propose a watermark for masked diffusion language models that controls a global, vector-valued sketch representation of the text. Compared to context-dependent watermarking, the sketch formulation decouples detection from the local contexts seen during generation, resulting in an order-agnostic statistic and a watermarking rule which does not manifest as a simple token bias. We analyze the distortion, soundness, and robustness properties of the method.