SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.04825 · 2024

Explanation as a Watermark: Towards Harmless and Multi-bit Model Ownership Verification via Watermarking Feature Attribution

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 3 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2405.04825.json · badge: /api/ran/2405.04825.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
shaoshuo-ss/eaaw canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
bit_error_rate Ran
ran, honoured the contract we drafted
shaoshuo-ss/eaaw/text-generation/watermark.py
code served (permissive licence) · get_code("2d6eb3941ded6ba3")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np
import torch

torch.manual_seed(0)

# bit_error_rate compares two arrays/tensors element-wise using !=
# and returns the average. Both source and target should be array-like
# with the same shape.

source = np.array([0, 1, 0, 1, 1, 0, 1, 0])
target = np.array([0, 1, 1, 1, 0, 0, 1, 0])

ARGS = {
    "source": source,
    "target": target,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
dec2bin Ran
ran, honoured the contract we drafted
shaoshuo-ss/eaaw/image-classification/watermark/lime.py
code served (permissive licence) · get_code("9e45f2f8ecb4d6ba")
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 list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# Analyze the function:
# - dec2bin takes two parameters: num and length
# - num is used in divmod(num, 2), so it should be an integer
# - length is used in len(mid) < length and mid.insert(0, 0), so it should be an integer
# - The function converts a decimal number to binary representation as a list of 0s and 1s

ARGS = {
    "num": 42,
    "length": 8
}
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 list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
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
evaluate_watermark Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
shaoshuo-ss/eaaw/text-generation/watermark.py
code served (permissive licence) · get_code("5a2d581963fed9bb")
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 tuple. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small numpy arrays with binary values (-1 and 1, or 0 and 1)
# The function expects arrays that can be compared with !=
# and can have values -1 and 0
weights = np.array([-1, 1, -1, 1, 0, 1], dtype=np.int32)
target = np.array([1, 1, -1, 0, 0, -1], dtype=np.int32)

ARGS = {
    "weights": weights,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
get_resnet18 Ran
ran; our contract draft was wrong, not the code
shaoshuo-ss/eaaw/image-classification/utils/models.py
code served (permissive licence) · get_code("f8a98d97abed03ba")
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 ResNet. The image it ran in was not recorded. If your copy returns the same type 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
from torch import nn
from torchvision.models import resnet18

torch.manual_seed(0)

class Args:
    def __init__(self, num_classes, dataset):
        self.num_classes = num_classes
        self.dataset = dataset

ARGS = {
    'args': Args(num_classes=10, dataset='cifar10')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
get_resnet34 Ran
ran; our contract draft was wrong, not the code
shaoshuo-ss/eaaw/image-classification/utils/models.py
code served (permissive licence) · get_code("3b3524a6b7e9fdb1")
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 ResNet. The image it ran in was not recorded. If your copy returns the same type 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
from torchvision.models import resnet34

torch.manual_seed(0)

class Args:
    def __init__(self, num_classes):
        self.num_classes = num_classes

args = Args(num_classes=10)

ARGS = {
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
get_resnet50 Ran
ran; our contract draft was wrong, not the code
shaoshuo-ss/eaaw/image-classification/utils/models.py
code served (permissive licence) · get_code("ef3f911aaa6673a2")
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 ResNet. The image it ran in was not recorded. If your copy returns the same type 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
from torchvision.models import resnet50

torch.manual_seed(0)

class Args:
    def __init__(self, num_classes):
        self.num_classes = num_classes

ARGS = {
    "args": Args(num_classes=10)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
init_watermark Ran
ran, honoured the contract we drafted
shaoshuo-ss/eaaw/text-generation/watermark.py
code served (permissive licence) · get_code("e608aee2acfd059c")
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 ndarray, ndim 1, dtype family int, shape (32,) 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 numpy as np

def init_watermark(wm_length):
    wm = np.random.choice([-1, 1], wm_length)
    return wm

ARGS = {
    "wm_length": 32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (32,) — shape (32,) 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
select_random_noise_data Ran
ran; our contract draft was wrong, not the code
shaoshuo-ss/eaaw/image-classification/watermark/watermark.py
code served (permissive licence) · get_code("56f802ee07886304")
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 tuple. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np
import torch

torch.manual_seed(0)

ARGS = {
    "trigger_size": 2,
    "image_size": 4,
    "num_channels": 3,
    "num_classes": 2,
}
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 tuple — a tuple output has no array shape of its own; none is stated
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
select_triggered_data Ran
ran on a synthesized input
shaoshuo-ss/eaaw/image-classification/watermark/watermark.py
code served (permissive licence) · get_code("0477bd7d1f9b2e33")
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 tuple. The image it ran in was not recorded. If your copy returns the same type 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
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, num_samples=10, data_dim=4, num_classes=5):
        self.num_samples = num_samples
        self.data_dim = data_dim
        self.num_classes = num_classes
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        data = torch.randn(self.data_dim)
        label = idx % self.num_classes
        return data, label

train_dataset = SimpleDataset(num_samples=10, data_dim=4, num_classes=5)

ARGS = {
    "train_dataset": train_dataset,
    "trigger_size": 3,
    "wrong_label": False,
}
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 tuple — a tuple output has no array shape of its own; none is stated
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
get_fixed_trigger Not yet run
unverified (harvested, no recorded run)
shaoshuo-ss/eaaw/image-classification/watermark/watermark.py
code served (permissive licence) · get_code("4a67b032f6b32ae9")
How it ran

no invocation recorded.

get_full_dataset Not yet run
unverified (harvested, no recorded run)
shaoshuo-ss/eaaw/image-classification/utils/datasets.py
code served (permissive licence) · get_code("49e9a8310a77bfdf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 11 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.

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-22.

Repositories linked to this paper

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

Abstract

Ownership verification is currently the most critical and widely adopted post-hoc method to safeguard model copyright. In general, model owners exploit it to identify whether a given suspicious third-party model is stolen from them by examining whether it has particular properties `inherited' from their released models. Currently, backdoor-based model watermarks are the primary and cutting-edge methods to implant such properties in the released models. However, backdoor-based methods have two fatal drawbacks, including harmfulness and ambiguity. The former indicates that they introduce maliciously controllable misclassification behaviors ($i.e.$, backdoor) to the watermarked released models. The latter denotes that malicious users can easily pass the verification by finding other misclassified samples, leading to ownership ambiguity. In this paper, we argue that both limitations stem from the `zero-bit' nature of existing watermarking schemes, where they exploit the status ($i.e.$, misclassified) of predictions for verification. Motivated by this understanding, we design a new watermarking paradigm, $i.e.$, Explanation as a Watermark (EaaW), that implants verification behaviors into the explanation of feature attribution instead of model predictions. Specifically, EaaW embeds a `multi-bit' watermark into the feature attribution explanation of specific trigger samples without changing the original prediction. We correspondingly design the watermark embedding and extraction algorithms inspired by explainable artificial intelligence. In particular, our approach can be used for different tasks ($e.g.$, image classification and text generation). Extensive experiments verify the effectiveness and harmlessness of our EaaW and its resistance to potential attacks.

For agents

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

get_harvested_code_for_paper("2405.04825")
get_code_for_paper("2405.04825")
have("2405.04825")

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

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

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

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

Connect an agent — have() is free.