This repository contains the implementation of MarkNull: Model-Agnostic Watermark Removal in AI-Generated Images via On-Manifold Latent Manipulation, accepted at USENIX Security 2026.
MarkNull consists of two complementary components:
We recommend using a fresh conda environment with Python 3.10.
conda create -n marknull python=3.10 -y
conda activate marknull
pip install -r requirements.txt
To reproduce experiments, watermarked images must first be generated using the target watermarking schemes. Readers may refer to the original implementations cited in our manuscript, or use the benchmark toolkit at https://github.com/THU-BPM/MarkDiffusion.
Once generated, store all watermarked images under ./Watermarked/ following the directory structure below. We provide Watermarked/SD2.1_GS/ as a concrete example, containing images watermarked by Gaussian Shading under Stable Diffusion 2.1.
Watermark baselines: DwtDctSvd and Gaussian Shading (CVPR 2024).
Watermarked/ # Clean watermarked images (input)
SD2.1_GS/
0.png
1.png
Attacked/ # Watermark-suppressed images (output)
MarkNull/
SD2.1_GS/
0.png
1.png
MarkNull_A/
SD2.1_GS/
0.png
1.png
<SUBSET_NAME> encodes the target model and watermarking scheme (e.g., SD2.1_GS = Gaussian Shading under SD2.1).<ATTACK_NAME> denotes the attack method (MarkNull or MarkNull_A).python MarkNull_attack.py --input_dir Watermarked/SD2.1_GS
cd MarkNull-A
python train.py
wget https://github.com/JieJayCao/MarkNull/releases/download/v.1.1/trained_model.7z
7z x trained_model.7z -o./
wget https://github.com/JieJayCao/MarkNull/releases/download/v1.0/Dataset.tar.gz
tar -xzvf Dataset.tar.gz --transform='s/.*\///' -C ./Dataset
python MarkNull_A_attack.py --input_dir ../Watermarked/SD2.1_GS
Evaluate watermark bit accuracy before and after attack using the provided decode scripts.
Before attack (original watermarked images):
cd Decode
./gs.sh ../Watermarked/SD2.1_GS
After attack:
cd Decode
./gs.sh ../Attacked/MarkNull/SD2.1_GS
./gs.sh ../Attacked/MarkNull_A/SD2.1_GS
We additionally provide an implementation of the detection-based defense proposed in the paper:
python Attack_detection.py
We evaluate whether MarkNull generalizes to SynthID-Image, the watermarking system deployed in Google Gemini.
Responsible disclosure. Before publication, we submitted the SynthID-Image watermark-removal vulnerability described in this section to Google through the Google Vulnerability Reward Program (VRP). The report is tracked by Google as Priority P3 and Severity S3.
../Watermarked/synthid_512/.
Left: SynthID detection result for the original watermarked image. Right: Detection result after applying MarkNull.
This case study demonstrates that MarkNull generalizes to AI-generated video watermarking without any modality-specific adaptation.
cd MarkDiffusion
conda create -n markdiffusion python=3.11 -y
conda activate markdiffusion
pip install -r requirements.txt
conda activate markdiffusion
python videomark.py --ver 0
Watermarked videos will be saved to ../Watermarked/SVD_VideoMark/.
python videomark.py --ver 1 --input_dir ../Watermarked/SVD_VideoMark
cd ../
conda activate marknull
python MarkNull_attack.py --input_dir Watermarked/SVD_VideoMark
Attacked videos will be saved to Attacked/SVD_VideoMark/.
cd MarkDiffusion
conda activate markdiffusion
python videomark.py --ver 1 --input_dir ../Attacked/SVD_VideoMark
If you use this repository in your research, please cite:
@inproceedings{marknull2026,
title = {MarkNull: Model-Agnostic Watermark Removal in AI-Generated Images via On-Manifold Latent Manipulation},
author = {Cao, Jie and Li, Qi and Zhang, Zelin and Wu, Xiaodong and Liu, Lingshuang and Li, Xiangman and Ni, Jianbing},
booktitle = {35nd USENIX Security Symposium (USENIX Security 26)},
year = {2026}
}
Jupyter Notebook
64.3%
Python
35.7%
This repository contains the implementation of MarkNull: Model-Agnostic Watermark Removal in AI-Generated Images via On-Manifold Latent Manipulation, accepted at USENIX Security 2026.
MarkNull consists of two complementary components:
We recommend using a fresh conda environment with Python 3.10.
conda create -n marknull python=3.10 -y
conda activate marknull
pip install -r requirements.txt
To reproduce experiments, watermarked images must first be generated using the target watermarking schemes. Readers may refer to the original implementations cited in our manuscript, or use the benchmark toolkit at https://github.com/THU-BPM/MarkDiffusion.
Once generated, store all watermarked images under ./Watermarked/ following the directory structure below. We provide Watermarked/SD2.1_GS/ as a concrete example, containing images watermarked by Gaussian Shading under Stable Diffusion 2.1.
Watermark baselines: DwtDctSvd and Gaussian Shading (CVPR 2024).
Watermarked/ # Clean watermarked images (input)
SD2.1_GS/
0.png
1.png
Attacked/ # Watermark-suppressed images (output)
MarkNull/
SD2.1_GS/
0.png
1.png
MarkNull_A/
SD2.1_GS/
0.png
1.png
<SUBSET_NAME> encodes the target model and watermarking scheme (e.g., SD2.1_GS = Gaussian Shading under SD2.1).<ATTACK_NAME> denotes the attack method (MarkNull or MarkNull_A).python MarkNull_attack.py --input_dir Watermarked/SD2.1_GS
cd MarkNull-A
python train.py
wget https://github.com/JieJayCao/MarkNull/releases/download/v.1.1/trained_model.7z
7z x trained_model.7z -o./
wget https://github.com/JieJayCao/MarkNull/releases/download/v1.0/Dataset.tar.gz
tar -xzvf Dataset.tar.gz --transform='s/.*\///' -C ./Dataset
python MarkNull_A_attack.py --input_dir ../Watermarked/SD2.1_GS
Evaluate watermark bit accuracy before and after attack using the provided decode scripts.
Before attack (original watermarked images):
cd Decode
./gs.sh ../Watermarked/SD2.1_GS
After attack:
cd Decode
./gs.sh ../Attacked/MarkNull/SD2.1_GS
./gs.sh ../Attacked/MarkNull_A/SD2.1_GS
We additionally provide an implementation of the detection-based defense proposed in the paper:
python Attack_detection.py
We evaluate whether MarkNull generalizes to SynthID-Image, the watermarking system deployed in Google Gemini.
Responsible disclosure. Before publication, we submitted the SynthID-Image watermark-removal vulnerability described in this section to Google through the Google Vulnerability Reward Program (VRP). The report is tracked by Google as Priority P3 and Severity S3.
../Watermarked/synthid_512/.
Left: SynthID detection result for the original watermarked image. Right: Detection result after applying MarkNull.
This case study demonstrates that MarkNull generalizes to AI-generated video watermarking without any modality-specific adaptation.
cd MarkDiffusion
conda create -n markdiffusion python=3.11 -y
conda activate markdiffusion
pip install -r requirements.txt
conda activate markdiffusion
python videomark.py --ver 0
Watermarked videos will be saved to ../Watermarked/SVD_VideoMark/.
python videomark.py --ver 1 --input_dir ../Watermarked/SVD_VideoMark
cd ../
conda activate marknull
python MarkNull_attack.py --input_dir Watermarked/SVD_VideoMark
Attacked videos will be saved to Attacked/SVD_VideoMark/.
cd MarkDiffusion
conda activate markdiffusion
python videomark.py --ver 1 --input_dir ../Attacked/SVD_VideoMark
If you use this repository in your research, please cite:
@inproceedings{marknull2026,
title = {MarkNull: Model-Agnostic Watermark Removal in AI-Generated Images via On-Manifold Latent Manipulation},
author = {Cao, Jie and Li, Qi and Zhang, Zelin and Wu, Xiaodong and Liu, Lingshuang and Li, Xiangman and Ni, Jianbing},
booktitle = {35nd USENIX Security Symposium (USENIX Security 26)},
year = {2026}
}
Jupyter Notebook
64.3%
Python
35.7%