SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.08487 · ICCV · 2021

Amplitude-Phase Recombination: Rethinking Robustness of Convolutional Neural Networks in Frequency Domain

Jia Li, Yonghong Tian, Guangyao Chen, Peixi Peng, Ma Li, Lin Du, Peng Laborotory

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 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/2108.08487.json · badge: /api/ran/2108.08487.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
iCGY96/APR marked official in Papers with Code
Papers with Code archive
9 ran · 1 no recorded run
FunctionStatusWhere it lives
float_parameter Ran
ran, honoured the contract we drafted
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("be1cf2403304fa6d")
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) and returned float, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - level: a numeric value between 0 and PARAMETER_MAX (appears to be 10 based on division by 10.0)
# - maxval: a numeric value representing the maximum value to scale
# The function returns: float(level) * maxval / 10.0

# Simple test values
level = 5
maxval = 20.0

ARGS = {
    "level": level,
    "maxval": maxval,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
int_parameter Ran
ran, honoured the contract we drafted
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("beaa91443124b324")
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) and returned int, ndim 0, dtype family int, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - level: an integer between 0 and PARAMETER_MAX (which appears to be 10 based on the division)
# - maxval: a numeric value representing the maximum value to scale

# The function simply scales maxval according to level/10
# No complex objects needed - just numeric values

ARGS = {
    "level": 5,
    "maxval": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
posterize Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("43b678f915759923")
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 Image. 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
from PIL import Image

# Create a small valid PIL Image for testing
pil_img = Image.new('RGB', (8, 8), color='red')

# Define ARGS dict with all parameters for posterize function
ARGS = {
    'pil_img': pil_img,
    'level': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
rotate Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("d85800f55f323864")
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 Image. 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.

from PIL import Image
import numpy as np

# Create a simple PIL Image for testing
# Create a small 10x10 RGB image
pil_img = Image.new('RGB', (10, 10), color='red')

# Define the ARGS dictionary with all parameters for the rotate function
ARGS = {
    'pil_img': pil_img,
    'level': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
shear_x Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("417bb83cee1eb445")
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 Image. 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
from PIL import Image

IMAGE_SIZE = 32

def float_parameter(level, maxval):
    """Helper function to scale `val` between 0 and maxval.
    Args:
      level: Level of the operation that will be between [0, `PARAMETER_MAX`].
      maxval: Maximum value that the operation can have. This will be scaled to
        level/PARAMETER_MAX.
    Returns:
      A float that results from scaling `maxval` according to `level`.
    """
    return float(level) * maxval / 10.0

def sample_level(n):
    return np.random.uniform(low=0.1, high=n)

def shear_x(pil_img, level):
    level = float_parameter(sample_level(level), 0.3)
    if np.random.uniform() > 0.5:
        level = -level
    return pil_img.transform((IMAGE_SIZE, IMAGE_SIZE), Image.AFFINE, (1, level, 0, 0, 1, 0), resample=Image.BILINEAR)

# Create a small PIL image for testing
test_image = Image.new('RGB', (IMAGE_SIZE, IMAGE_SIZE), color='red')

ARGS = {
    'pil_img': test_image,
    'level': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
shear_y Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("5615796e020bb66b")
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 Image. 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
from PIL import Image

# Create a small PIL Image for testing
# IMAGE_SIZE is 32x32
img_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
pil_img = Image.fromarray(img_array)

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

ARGS = {
    "pil_img": pil_img,
    "level": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
solarize Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("62f59af34932ce5f")
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 Image. 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
from PIL import Image

# Create a small PIL image for testing
pil_img = Image.new('RGB', (4, 3), color='red')

# Define arguments for the solarize function
ARGS = {
    'pil_img': pil_img,
    'level': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
translate_x Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("63c558f9d95b07bd")
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 Image. 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.

from PIL import Image
import numpy as np

# Create a small PIL Image for testing
pil_img = Image.new('RGB', (32, 32), color='red')

# Define ARGS dict with all parameters
ARGS = {
    'pil_img': pil_img,
    'level': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
translate_y Ran
ran; our contract draft was wrong, not the code
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("9497b9c7bcc19bdf")
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 Image. 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.

from PIL import Image
import numpy as np

# Create a small PIL image for testing
pil_image = Image.new('RGB', (32, 32), color=(100, 150, 200))

# Define ARGS dict with all parameters for translate_y
ARGS = {
    'pil_img': pil_image,
    'level': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
APRecombination Not yet run
unverified (harvested, no recorded run)
iCGY96/APR/datasets/APR.py
code served (permissive licence) · get_code("718adcc72de6cc2b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 9 later) and 1 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
float_parameter
brick of this paper's assembly: helper
19 other papers
4 dated earlier, 14 later, 1 same year, order not determinable · 2 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 16 more not named here
int_parameter
brick of this paper's assembly: helper
19 other papers
4 dated earlier, 14 later, 1 same year, order not determinable · 2 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 16 more not named here
posterize
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers
rotate
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers
shear_x
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers
shear_y
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers
solarize
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers
translate_x
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers
translate_y
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2310.04780 (2023-10)
IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers

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

Recently, the generalization behavior of Convolutional Neural Networks (CNN) is gradually transparent through explanation techniques with the frequency components decomposition. However, the importance of the phase spectrum of the image for a robust vision system is still ignored. In this paper, we notice that the CNN tends to converge at the local optimum which is closely related to the high-frequency components of the training images, while the amplitude spectrum is easily disturbed such as noises or common corruptions. In contrast, more empirical studies found that humans rely on more phase components to achieve robust recognition. This observation leads to more explanations of the CNN's generalization behaviors in both robustness to common perturbations and out-of-distribution detection, and motivates a new perspective on data augmentation designed by re-combing the phase spectrum of the current image and the amplitude spectrum of the distracter image. That is, the generated samples force the CNN to pay more attention to the structured information from phase components and keep robust to the variation of the amplitude. Experiments on several image datasets indicate that the proposed method achieves state-of-the-art performances on multiple generalizations and calibration tasks, including adaptability for common corruptions and surface variations, out-of-distribution detection, and adversarial attack. The code is released on github/iCGY96/APR.

For agents

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

get_harvested_code_for_paper("2108.08487")
get_code_for_paper("2108.08487")
have("2108.08487")

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

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

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

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

Connect an agent — have() is free.