SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.03000 · 2021

SpectralDefense: Detecting Adversarial Attacks on CNNs in the Fourier Domain

arXiv · PDF · Open in the Atlas

Code that ran

2 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 0 have no contract verdict; 2 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/2103.03000.json · badge: /api/ran/2103.03000.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
adverml/multilid extension (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
adverml/spectraldef_framework extension (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
FunctionStatusWhere it lives
LID Ran
ran; our contract draft was wrong, not the code
adverml/multilid/defenses/multiLID.py
pointer only (licence: NONE) · get_code("21e65585a285dd40")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, adverml/multilid when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_activation Ran
ran; our contract draft was wrong, not the code
adverml/spectraldef_framework/extract_characteristics.py
pointer only (licence: AGPL-3.0) · get_code("315b5ee37bf1681f")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, adverml/spectraldef_framework, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_fourier_spectrum Not yet run
unverified (harvested, no recorded run)
adverml/spectraldef_framework/extract_characteristics.py
pointer only (licence: AGPL-3.0) · get_code("9bc62e786053f3d6")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, adverml/spectraldef_framework, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

multiLID Not yet run
unverified (harvested, no recorded run)
adverml/multilid/defenses/multiLID.py
pointer only (licence: NONE) · get_code("30f7bceee5199870")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, adverml/multilid when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. 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, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 2 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
get_activation 4 other papers
1 dated earlier, 3 later
2002.05810 (2020-02)
RNA Secondary Structure Prediction By Learning Unrolled Algorithms
2305.19435 (2023-05)
AdANNS: A Framework for Adaptive Semantic Search
2311.05808 (2023-11)
Scale-MIA: A Scalable Model Inversion Attack against Secure Federated Learning via Latent Space Reconstruction
and 1 more not named here
multiLID 1 other paper
1 later
2111.08785 (2021-11)
Detecting AutoAttack Perturbations in the Frequency Domain

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

Despite the success of convolutional neural networks (CNNs) in many computer vision and image analysis tasks, they remain vulnerable against so-called adversarial attacks: Small, crafted perturbations in the input images can lead to false predictions. A possible defense is to detect adversarial examples. In this work, we show how analysis in the Fourier domain of input images and feature maps can be used to distinguish benign test samples from adversarial images. We propose two novel detection methods: Our first method employs the magnitude spectrum of the input images to detect an adversarial attack. This simple and robust classifier can successfully detect adversarial perturbations of three commonly used attack methods. The second method builds upon the first and additionally extracts the phase of Fourier coefficients of feature-maps at different layers of the network. With this extension, we are able to improve adversarial detection rates compared to state-of-the-art detectors on five different attack methods.

For agents

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

get_harvested_code_for_paper("2103.03000")
get_code_for_paper("2103.03000")
have("2103.03000")

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

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

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

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

Connect an agent — have() is free.