SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_19982 · AAAI · 2022

CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes

Weisi Lin, Zhi Tang, Yongtao Wang, Yuheng Li, Hao Huang, Zhaoyu Chen, Jingdong Chen, Wei Chu, Yuze Zhang, Kai-Kuang Ma

Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/aaai_19982.json · badge: /api/ran/aaai_19982.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
VDIGPKU/CMUA-Watermark canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
avg_smoothing_filter Ran
ran on a synthesized input
VDIGPKU/CMUA-Watermark/stargan/model.py
code served (permissive licence) · get_code("89fcb17a1e902888")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (3, 1, 5, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "channels": 3,
    "kernel_size": 5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (3, 1, 5, 5) — shape (3, 1, 5, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clip_tensor Ran
ran on a synthesized input
VDIGPKU/CMUA-Watermark/attacks.py
code served (permissive licence) · get_code("e146588f3635fb05")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small test tensors
X = torch.randn(2, 4, dtype=torch.float32)
Y = torch.randn(2, 4, dtype=torch.float32)
Z = torch.randn(2, 4, dtype=torch.float32)

# Ensure Y <= Z elementwise for realistic clipping
Y_np = Y.numpy()
Z_np = Z.numpy()
Z_np = np.maximum(Z_np, Y_np)
Z = torch.FloatTensor(Z_np)

ARGS = {
    "X": X,
    "Y": Y,
    "Z": Z,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
perturb_batch Ran
ran on a synthesized input
VDIGPKU/CMUA-Watermark/attacks.py
code served (permissive licence) · get_code("d5fb3912cee27206")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import copy

torch.manual_seed(0)

# Define a minimal model that works with the function
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal adversary that has a perturb method
class SimpleAdversary:
    def __init__(self):
        self.model = None
    
    def perturb(self, X, y, c_trg):
        # Return perturbed X and some auxiliary output
        X_adv = X + 0.1 * torch.randn_like(X)
        aux = None
        return X_adv, aux

# Create instances
model = SimpleModel()
adversary = SimpleAdversary()

# Create tiny tensors (batch size 2, feature dim 4)
X = torch.randn(2, 4)
y = torch.tensor([0, 1])
c_trg = torch.tensor([1, 0])

ARGS = {
    'X': X,
    'y': y,
    'c_trg': c_trg,
    'model': model,
    'adversary': adversary
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse Not yet run
unverified (harvested, no recorded run)
VDIGPKU/CMUA-Watermark/model_data_prepare.py
code served (permissive licence) · get_code("b27511e26968bb40")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
avg_smoothing_filter 1 other paper
1 dated earlier
2105.10872 (2021-05)
CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes
clip_tensor 1 other paper
1 dated earlier
2105.10872 (2021-05)
CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes
parse 1 other paper
1 dated earlier
2105.10872 (2021-05)
CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes
perturb_batch 1 other paper
1 dated earlier
2105.10872 (2021-05)
CMUA-Watermark: A Cross-Model Universal Adversarial Watermark for Combating Deepfakes

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Malicious applications of deepfakes (i.e., technologies generating target facial attributes or entire faces from facial images) have posed a huge threat to individuals' reputation and security. To mitigate these threats, recent studies have proposed adversarial watermarks to combat deepfake models, leading them to generate distorted outputs. Despite achieving impressive results, these adversarial watermarks have low imagelevel and model-level transferability, meaning that they can protect only one facial image from one specific deepfake model. To address these issues, we propose a novel solution that can generate a Cross-Model Universal Adversarial Watermark (CMUA-Watermark), protecting a large number of facial images from multiple deepfake models. Specifically, we begin by proposing a cross-model universal attack pipeline that attacks multiple deepfake models iteratively. Then, we design a two-level perturbation fusion strategy to alleviate the conflict between the adversarial watermarks generated by different facial images and models. Moreover, we address the key problem in cross-model optimization with a heuristic approach to automatically find the suitable attack step sizes for different models, further weakening the model-level conflict. Finally, we introduce a more reasonable and comprehensive evaluation method to fully test the proposed method and compare it with existing ones. Extensive experimental results demonstrate that the proposed CMUA-Watermark can effectively distort the fake facial images generated by multiple deepfake models while achieving a better performance than existing methods. Our code is available at https://github.com/VDIGPKU/CMUA-Watermark.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("aaai_19982")
get_code_for_paper("aaai_19982")
have("aaai_19982")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/aaai_19982.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/aaai_19982.svg)](https://syntology.ai/paper/aaai_19982)

Connect an agent — have() is free.