SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1811.03194 · 2018

AdVersarial: Perceptual Ad Blocking meets Adversarial Machine Learning

arXiv · PDF · Open in the Atlas

Code that ran

11 of 15 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 11 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/1811.03194.json · badge: /api/ran/1811.03194.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
ftramer/ad-versarial canonical (classifier label)
classifier basis: census
11 ran · 4 no recorded run
FunctionStatusWhere it lives
batch_eval Ran
ran on a synthesized input
ftramer/ad-versarial/page-based/utils.py
code served (permissive licence) · get_code("7471ef5863e35839")
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. 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 tensorflow as tf

# Create a simple TensorFlow session and graph
tf.compat.v1.disable_eager_execution()
sess = tf.compat.v1.Session()

# Create placeholders for inputs
tf_input_1 = tf.compat.v1.placeholder(tf.float32, shape=[None, 4])
tf_input_2 = tf.compat.v1.placeholder(tf.float32, shape=[None, 3])

# Create simple output tensors (e.g., element-wise operations)
tf_output_1 = tf_input_1 + 1.0
tf_output_2 = tf_input_2 * 2.0

# Create numpy input arrays with consistent batch size (first dimension)
numpy_input_1 = np.random.randn(8, 4).astype(np.float32)
numpy_input_2 = np.random.randn(8, 3).astype(np.float32)

# Create feed_dict for batch_eval
feed_dict = {
    tf_input_1: numpy_input_1,
    tf_input_2: numpy_input_2,
}

ARGS = {
    'sess': sess,
    'tf_outputs': [tf_output_1, tf_output_2],
    'feed_dict': feed_dict,
    'batch_size': 2,
    'extra_feed': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
batch_eval_ch Ran
ran on a synthesized input
ftramer/ad-versarial/page-based/utils.py
code served (permissive licence) · get_code("1f1b48c13ddfd7f1")
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. 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 tensorflow as tf

# Create a simple TensorFlow session and graph
tf.compat.v1.disable_eager_execution()
sess = tf.compat.v1.Session()

# Create simple TensorFlow placeholders and operations
tf_input_1 = tf.compat.v1.placeholder(tf.float32, shape=[None, 4])
tf_input_2 = tf.compat.v1.placeholder(tf.float32, shape=[None, 3])

# Create simple output operations
tf_output_1 = tf_input_1 + 1.0
tf_output_2 = tf_input_2 * 2.0

# Create numpy input data (8 samples)
numpy_input_1 = np.random.randn(8, 4).astype(np.float32)
numpy_input_2 = np.random.randn(8, 3).astype(np.float32)

ARGS = {
    'sess': sess,
    'tf_inputs': [tf_input_1, tf_input_2],
    'tf_outputs': [tf_output_1, tf_output_2],
    'numpy_inputs': [numpy_input_1, numpy_input_2],
    'batch_size': 2,
    'feed': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
blend_white Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/utils.py
code served (permissive licence) · get_code("6f84e0253750d23a")
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 3, dtype family int, shape (5, 6, 3) 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 cv2
import numpy as np

# Create a small RGBA image (4 channels: RGB + Alpha)
# Height=5, Width=6, Channels=4
overlay_t_img = np.random.randint(0, 256, size=(5, 6, 4), dtype=np.uint8)

ARGS = {
    "img": overlay_t_img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (5, 6, 3) — shape (5, 6, 3) 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
compare_hash Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/phash/model.py
code served (permissive licence) · get_code("35ac26a4707546ca")
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

# Create two hash arrays with the same shape
h1 = np.array([[1, 0, 1, 0],
               [1, 1, 0, 1]])

h2 = np.array([[1, 0, 1, 0],
               [1, 0, 0, 1]])

ARGS = {
    'h1': h1,
    'h2': h2
}
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 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
is_equal Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/exact_match.py
code served (permissive licence) · get_code("f7a281adc4fb2f95")
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 bool, ndim 0, dtype family float, shape () 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

# Create two similar numpy arrays (images) that will pass the equality test
# The function checks if the normalized difference is less than 0.01

# Create a base image
img1 = np.random.rand(4, 3, 2)

# Create a slightly perturbed version (within 1% relative error)
img2 = img1 + np.random.rand(4, 3, 2) * 0.005

ARGS = {
    "img1": img1,
    "img2": img2,
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
load_image Ran
ran on a synthesized input
ftramer/ad-versarial/page-based/utils.py
code served (permissive licence) · get_code("b7e77d2bb35e1278")
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 3, dtype family float, shape (10, 15, 3) 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
import cv2
import tempfile
import os

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple test image using numpy and cv2
test_image = np.random.randint(0, 256, (10, 15, 3), dtype=np.uint8)
cv2.imwrite(temp_image_path, test_image)

ARGS = {
    "image_file": temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (10, 15, 3) — shape (10, 15, 3) 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
remove_alpha Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/phash/model.py
code served (permissive licence) · get_code("c347a1bee1e9939f")
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 3, dtype family float, shape (2, 4, 3) 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)

# Create a small image tensor with shape (height, width, channels)
# The function expects channels to include RGB (first 3) and alpha (last 1+)
# Shape: (2, 4, 4) means height=2, width=4, channels=4 (RGBA)
img_ph = torch.randint(0, 256, (2, 4, 4), dtype=torch.float32)

ARGS = {
    "img_ph": img_ph
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) 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
resize Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/sift/model.py
code served (permissive licence) · get_code("4ceb2d6022efa952")
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 3, dtype family int, shape (120, 144, 3) 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 cv2
import numpy as np

# Create a small test patch (image)
# The function expects a numpy array with shape (height, width) or (height, width, channels)
# Let's create a small patch with height=10, width=12, and 3 channels (RGB)
patch = np.random.randint(0, 256, size=(10, 12, 3), dtype=np.uint8)

ARGS = {
    'patch': patch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (120, 144, 3) — shape (120, 144, 3) 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
squeezenet1_0 Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/percival/ModuleSqueezeNet1.py
code served (permissive licence) · get_code("fdf8f85f406426a8")
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 SqueezeNet. 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
import torch.nn.init as init

torch.manual_seed(0)

# Mock load_state_dict_from_url since we can't download
def load_state_dict_from_url(url, progress=True):
    return {}

# Inject the mock into the module
import sys
current_module = sys.modules[__name__]
current_module.load_state_dict_from_url = load_state_dict_from_url

ARGS = {
    'pretrained': False,
    'progress': True,
}
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 SqueezeNet — a SqueezeNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SqueezeNet 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
squeezenet1_1 Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/percival/ModuleSqueezeNet1.py
code served (permissive licence) · get_code("43cd5c22cd650a33")
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 SqueezeNet. 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
import torch.nn.init as init

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
    'progress': True,
}
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 SqueezeNet — a SqueezeNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SqueezeNet 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
to_gray Ran
ran on a synthesized input
ftramer/ad-versarial/element-frame-based/utils.py
code served (permissive licence) · get_code("45c374c2c75105a5")
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 2, dtype family int, shape (4, 3) 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
import cv2

# Create test images for the to_gray function
# The function can accept:
# 1. A grayscale image (2D array)
# 2. A color image without alpha (3D array with shape[2] == 3)
# 3. A color image with alpha (3D array with shape[2] == 4)

# Test case: color image with alpha channel (BGRA)
# Create a small 4x3 image with 4 channels (BGRA)
logo_with_alpha = np.random.randint(0, 256, (4, 3, 4), dtype=np.uint8)

ARGS = {
    "logo": logo_with_alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 3) — shape (4, 3) 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
blend_transparent Not yet run
unverified (harvested, no recorded run)
ftramer/ad-versarial/element-frame-based/utils.py
code served (permissive licence) · get_code("f11417cdc9ea3460")
How it ran

no invocation recorded.

load_example Not yet run
unverified (harvested, no recorded run)
ftramer/ad-versarial/element-frame-based/OCR/evade_or_fp_attack.py
code served (permissive licence) · get_code("35a4a4659ccecb7a")
How it ran

no invocation recorded.

load_weights Not yet run
unverified (harvested, no recorded run)
ftramer/ad-versarial/page-based/yolo_v3.py
code served (permissive licence) · get_code("968725378659c630")
How it ran

no invocation recorded.

phash_dct_tf Not yet run
unverified (harvested, no recorded run)
ftramer/ad-versarial/element-frame-based/phash/model.py
code served (permissive licence) · get_code("4622646a7161f4cc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 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 15 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-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

Perceptual ad-blocking is a novel approach that detects online advertisements based on their visual content. Compared to traditional filter lists, the use of perceptual signals is believed to be less prone to an arms race with web publishers and ad networks. We demonstrate that this may not be the case. We describe attacks on multiple perceptual ad-blocking techniques, and unveil a new arms race that likely disfavors ad-blockers. Unexpectedly, perceptual ad-blocking can also introduce new vulnerabilities that let an attacker bypass web security boundaries and mount DDoS attacks. We first analyze the design space of perceptual ad-blockers and present a unified architecture that incorporates prior academic and commercial work. We then explore a variety of attacks on the ad-blocker's detection pipeline, that enable publishers or ad networks to evade or detect ad-blocking, and at times even abuse its high privilege level to bypass web security boundaries. On one hand, we show that perceptual ad-blocking must visually classify rendered web content to escape an arms race centered on obfuscation of page markup. On the other, we present a concrete set of attacks on visual ad-blockers by constructing adversarial examples in a real web page context. For seven ad-detectors, we create perturbed ads, ad-disclosure logos, and native web content that misleads perceptual ad-blocking with 100% success rates. In one of our attacks, we demonstrate how a malicious user can upload adversarial content, such as a perturbed image in a Facebook post, that fools the ad-blocker into removing another users' non-ad content. Moving beyond the Web and visual domain, we also build adversarial examples for AdblockRadio, an open source radio client that uses machine learning to detects ads in raw audio streams.

For agents

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

get_harvested_code_for_paper("1811.03194")
get_code_for_paper("1811.03194")
have("1811.03194")

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

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

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

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

Connect an agent — have() is free.