SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.13686 · ECCV · 2022

Shift-tolerant Perceptual Similarity Metric

Feng Liu, Abhijay Ghildyal

arXiv · PDF · Open in the Atlas

Code that ran

8 of 21 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 1 has no contract verdict; 7 failures of our instrument; 13 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/2207.13686.json · badge: /api/ran/2207.13686.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
abhijay9/shifttolerant-lpips canonical (classifier label)
classifier basis not recorded on the link
8 ran · 13 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
abhijay9/shifttolerant-lpips/models_lpf/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 Conv2d. 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

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv1x1 Ran
ran on a synthesized input
abhijay9/shifttolerant-lpips/models_lpf/vgg_w_skip.py
code served (permissive licence) · get_code("36328f52643d60a0")
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 Conv2d. 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

torch.manual_seed(0)

# The function conv1x1 takes two required parameters (in_planes, out_planes)
# and one optional parameter (stride with default=1)
# It creates and returns an nn.Conv2d layer based on these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
abhijay9/shifttolerant-lpips/models_lpf/resnet.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from ChrisMats/Res2Net, is pointer only (licence: NONE) · get_code("e18ed73aa89f051a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from ChrisMats/Res2Net, and GitHub detected no licence in that repository 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
abhijay9/shifttolerant-lpips/models_lpf/vgg_w_skip.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from dahyedahye/dear, is pointer only (licence: NOASSERTION) · get_code("67c9ab8e625b4e5f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from dahyedahye/dear, and GitHub could not classify the licence of that repository (NOASSERTION). 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_pad_layer Ran
ran; our contract draft was wrong, not the code
abhijay9/shifttolerant-lpips/models_lpf/downsample.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from linwei-chen/seg-aliasing, is pointer only (licence: NONE) · get_code("50aa4a59fe718c61")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from linwei-chen/seg-aliasing, and GitHub detected no licence in that repository 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_pad_layer_1d Ran
ran; our contract draft was wrong, not the code
abhijay9/shifttolerant-lpips/models_lpf/downsample.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from Ekko-zn/AIGCDetectBenchmark, is pointer only (licence: NONE) · get_code("176a539246e68879")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from Ekko-zn/AIGCDetectBenchmark, and GitHub detected no licence in that repository 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.

spatial_average Ran
ran; our contract draft was wrong, not the code
abhijay9/shifttolerant-lpips/stlpips/lpips.py
code served (permissive licence) · get_code("29e5e72bcd006dcd")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 1, 1) 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)

# The function performs spatial averaging on a 4D tensor (batch, channels, height, width)
# by taking the mean over dimensions 2 and 3 (height and width)
in_tens = torch.randn(2, 4, 3, 5)  # batch=2, channels=4, height=3, width=5

ARGS = {
    "in_tens": in_tens,
    "keepdim": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (2, 4, 1, 1) — shape (2, 4, 1, 1) 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
upsample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
abhijay9/shifttolerant-lpips/stlpips/lpips.py
code served (permissive licence) · get_code("8cafd18b57a4d171")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 64, 64) 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

torch.manual_seed(0)

# Create a small input tensor with shape (batch, channels, height, width)
# Using batch=2, channels=4, height=8, width=6 for distinct dimensions
in_tens = torch.randn(2, 4, 8, 6)

# Define output height and width
out_HW = (64, 64)

ARGS = {
    'in_tens': in_tens,
    'out_HW': out_HW
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (2, 4, 64, 64) — shape (2, 4, 64, 64) 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
alexnet Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/alexnet.py
code served (permissive licence) · get_code("bc34e3894ecb4e8e")
How it ran

no invocation recorded.

alexnetnmp Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/alexnet.py
code served (permissive licence) · get_code("8159879c0ddf5c68")
How it ran

no invocation recorded.

densenet121 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/densenet.py
code served (permissive licence) · get_code("139d9cd6430f7bbe")
How it ran

no invocation recorded.

densenet169 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/densenet.py
code served (permissive licence) · get_code("cd120e0fbc36740f")
How it ran

no invocation recorded.

densenet201 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/densenet.py
code served (permissive licence) · get_code("0c253f6eb67013b8")
How it ran

no invocation recorded.

make_layers Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/vgg.py
code served (permissive licence) · get_code("898ea4d5b3898d06")
How it ran

no invocation recorded.

mobilenet_v2 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/mobilenet.py
code served (permissive licence) · get_code("db4ebb84a4e9d995")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/resnet.py
code served (permissive licence) · get_code("7160765a8283319e")
How it ran

no invocation recorded.

squeezenet1_0 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/squeezenet.py
code served (permissive licence) · get_code("8e1dfe6249cb7d5b")
How it ran

no invocation recorded.

squeezenet1_1 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/squeezenet.py
code served (permissive licence) · get_code("e3b4e03c1df19138")
How it ran

no invocation recorded.

vgg11 Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/vgg.py
code served (permissive licence) · get_code("218e7087e99477df")
How it ran

no invocation recorded.

vgg11_bn Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/vgg.py
code served (permissive licence) · get_code("37a0395593656d08")
How it ran

no invocation recorded.

vgg16_w_skip Not yet run
unverified (harvested, no recorded run)
abhijay9/shifttolerant-lpips/models_lpf/vgg_w_skip.py
code served (permissive licence) · get_code("d3ba69db5808ba0d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 7 later) and 13 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
conv1x1 431 other papers
194 dated earlier, 5 the same month, 220 later, 11 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
get_pad_layer 25 other papers
9 dated earlier, 16 later · 3 only as an assembly brick
2004.09484 (2020-04)
Bringing Old Photos Back to Life
2007.15651 (2020-07)
Contrastive Learning for Unpaired Image-to-Image Translation
2008.09604 (2020-08)
Delving Deeper into Anti-aliasing in ConvNets
and 22 more not named here
spatial_average 19 other papers
8 dated earlier, 11 later
1801.03924 (2018-01)
The Unreasonable Effectiveness of Deep Features as a Perceptual Metric
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2002.09219 (2020-02)
Stochastic Latent Residual Video Prediction
and 16 more not named here
conv3x3 13 other papers
9 dated earlier, 4 later · 1 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1904.01169 (2019-04)
Res2Net: A New Multi-scale Backbone Architecture
1907.11561 (2019-07)
Deep Learning for Classification and Severity Estimation of Coffee Leaf Biotic Stress
and 10 more not named here
get_pad_layer_1d 8 other papers
2 dated earlier, 6 later
2112.09130 (2021-12)
Ensembling Off-the-shelf Models for GAN Training
2204.05841 (2022-04)
VoiceFixer: A Unified Framework for High-Fidelity Speech Restoration
2302.10174 (2023-02)
Towards Universal Fake Image Detectors that Generalize Across Generative Models
and 5 more not named here
alexnet 5 other papers
5 dated earlier
1811.06965 (2018-11)
GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism
1812.00332 (2018-12)
ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
and 2 more not named here
upsample 5 other papers
1 dated earlier, 4 later
1801.03924 (2018-01)
The Unreasonable Effectiveness of Deep Features as a Perceptual Metric
2307.15157 (2023-07)
R-LPIPS: An Adversarially Robust Perceptual Similarity Metric
2401.08573 (2024-01)
WAVES: Benchmarking the Robustness of Image Watermarks
and 2 more not named here
conv3x3 2 other papers
2 later
2211.00680 (2022-11)
On the detection of synthetic images generated by diffusion models
2606.10309 (2026-06)
Dissect and Prune: Enhancing Robustness in AI-Generated Image Detection

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

Existing perceptual similarity metrics assume an image and its reference are well aligned. As a result, these metrics are often sensitive to a small alignment error that is imperceptible to the human eyes. This paper studies the effect of small misalignment, specifically a small shift between the input and reference image, on existing metrics, and accordingly develops a shift-tolerant similarity metric. This paper builds upon LPIPS, a widely used learned perceptual similarity metric, and explores architectural design considerations to make it robust against imperceptible misalignment. Specifically, we study a wide spectrum of neural network elements, such as anti-aliasing filtering, pooling, striding, padding, and skip connection, and discuss their roles in making a robust metric. Based on our studies, we develop a new deep neural network-based perceptual similarity metric. Our experiments show that our metric is tolerant to imperceptible shifts while being consistent with the human similarity judgment. Code is available at https://tinyurl.com/5n85r28r.

For agents

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

get_harvested_code_for_paper("2207.13686")
get_code_for_paper("2207.13686")
have("2207.13686")

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

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

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

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

Connect an agent — have() is free.