SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.03973 · 2019

E-LPIPS: Robust Perceptual Image Similarity via Random Transformation Ensembles

arXiv · PDF · Open in the Atlas

Code that ran

7 of 13 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 7 have no contract verdict; 0 failures of our instrument; 6 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/1906.03973.json · badge: /api/ran/1906.03973.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
mkettune/elpips canonical (classifier label)
classifier basis: census
7 ran · 6 no recorded run
FunctionStatusWhere it lives
load_image Ran
ran on a synthesized input
mkettune/elpips/ex_bary10.py
code served (permissive licence) · get_code("3e19a6296d2c7cc9")
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 (32, 32, 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 tempfile
import os
import numpy as np
import imageio

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a .npy test file
npy_path = os.path.join(temp_dir, 'test_image.npy')
test_array = np.random.rand(32, 32, 3).astype(np.float32)
np.save(npy_path, test_array)

# Create a .png test file
png_path = os.path.join(temp_dir, 'test_image.png')
test_image = (np.random.rand(32, 32, 3) * 255).astype(np.uint8)
imageio.imwrite(png_path, test_image)

# Create a .jpg test file
jpg_path = os.path.join(temp_dir, 'test_image.jpg')
imageio.imwrite(jpg_path, test_image)

ARGS = {
    'path': npy_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
imageio, 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 (32, 32, 3) — shape (32, 32, 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
load_image Ran
ran on a synthesized input
mkettune/elpips/train_dataset.py
code served (permissive licence) · get_code("0c9e93c8e464e175")
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 (32, 32, 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 os
import tempfile
import numpy as np
import imageio

# Create a temporary directory for test files
tmpdir = tempfile.mkdtemp()

# Create a test .npy file
npy_path = os.path.join(tmpdir, "test_image.npy")
test_array = np.random.rand(32, 32, 3).astype(np.float32)
np.save(npy_path, test_array)

# Create a test .png file
png_path = os.path.join(tmpdir, "test_image.png")
test_image_data = (np.random.rand(32, 32, 3) * 255).astype(np.uint8)
imageio.imwrite(png_path, test_image_data)

# The function takes a path parameter
ARGS = {
    "path": npy_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
imageio, 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 (32, 32, 3) — shape (32, 32, 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
load_image_uint Ran
ran on a synthesized input
mkettune/elpips/train_dataset.py
code served (permissive licence) · get_code("6ca0c644d6af33bc")
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 (10, 10, 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 os
import tempfile
import imageio
import numpy as np

# Create a temporary directory and a test PNG image
temp_dir = tempfile.mkdtemp()
test_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple test image as a numpy array and save it
test_image_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
imageio.imwrite(test_image_path, test_image_array)

ARGS = {
    'path': test_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
imageio, 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 (10, 10, 3) — shape (10, 10, 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
normalize_tensor Ran
ran on a synthesized input
mkettune/elpips/elpips/pnetlin.py
code served (permissive licence) · get_code("975fbd033769b396")
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 EagerTensor, ndim 4, 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 tensorflow as tf
import numpy as np

# Create a small test tensor with shape (batch=2, height=3, width=4, channels=5)
# The function expects axis=3 (the last dimension) to be the feature dimension
in_feat = tf.constant(
    np.random.randn(2, 3, 4, 5).astype(np.float32),
    dtype=tf.float32
)

ARGS = {
    "in_feat": in_feat,
    "eps": 1e-10
}
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 EagerTensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor ndim 4, 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
np_dtype Ran
ran on a synthesized input
mkettune/elpips/elpips/util.py
code served (permissive licence) · get_code("a3a377e5ab46db27")
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 type. 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 tensorflow as tf
import numpy as np

ARGS = {
    'tf_dtype': tf.float32
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
switch_case_cond Ran
ran on a synthesized input
mkettune/elpips/elpips/util.py
code served (permissive licence) · get_code("057c64f780456c83")
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 EagerTensor, 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 tensorflow as tf

# Build arguments for switch_case_cond

# The function expects:
# - cases: a list of (condition, effect) tuples where:
#   - condition is a tensor that evaluates to True/False (used by tf.cond)
#   - effect is a callable that returns a tensor
# - default_case: a callable that returns a tensor

# Create some simple tensor values to work with
tensor_a = tf.constant(5.0)
tensor_b = tf.constant(10.0)
tensor_c = tf.constant(15.0)

# Define effect functions that return tensors
def effect_1():
    return tf.constant(100.0)

def effect_2():
    return tf.constant(200.0)

def default_effect():
    return tf.constant(999.0)

# Create conditions (boolean tensors)
# tf.cond expects a scalar boolean tensor
condition_1 = tf.constant(False)
condition_2 = tf.constant(False)

# Build the cases list with (condition, effect) tuples
cases = [
    (condition_1, effect_1),
    (condition_2, effect_2),
]

# Default case is a callable
default_case = default_effect

ARGS = {
    "cases": cases,
    "default_case": default_case,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
switch_case_where Ran
ran on a synthesized input
mkettune/elpips/elpips/util.py
code served (permissive licence) · get_code("e72ff6a25970cd47")
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 EagerTensor, ndim 2, dtype family float, shape (2, 4) 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 tensorflow as tf
import numpy as np

# Create small TensorFlow tensors for testing
batch_size = 2
dim = 4

# Create three conditions (boolean tensors) and three effects (float tensors)
condition_1 = tf.constant([[True, False, True, False], [False, True, False, True]], dtype=tf.bool)
effect_1 = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

condition_2 = tf.constant([[False, True, False, True], [True, False, True, False]], dtype=tf.bool)
effect_2 = tf.constant([[10.0, 11.0, 12.0, 13.0], [14.0, 15.0, 16.0, 17.0]], dtype=tf.float32)

condition_3 = tf.constant([[True, True, False, False], [True, False, True, False]], dtype=tf.bool)
effect_3 = tf.constant([[20.0, 21.0, 22.0, 23.0], [24.0, 25.0, 26.0, 27.0]], dtype=tf.float32)

# Create a default case tensor
default_case = tf.constant([[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], dtype=tf.float32)

# Build the cases list as list of (condition, effect) tuples
cases = [
    (condition_1, effect_1),
    (condition_2, effect_2),
    (condition_3, effect_3),
]

ARGS = {
    "cases": cases,
    "default_case": default_case,
}
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 EagerTensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
BCERankingLoss Not yet run
unverified (harvested, no recorded run)
mkettune/elpips/train_run.py
code served (permissive licence) · get_code("38535896737ff703")
How it ran

no invocation recorded.

apply_ensemble Not yet run
unverified (harvested, no recorded run)
mkettune/elpips/elpips/elpips.py
code served (permissive licence) · get_code("ce84f88a4a3b5c8b")
How it ran

no invocation recorded.

cached_listdir Not yet run
unverified (harvested, no recorded run)
mkettune/elpips/train_dataset.py
code served (permissive licence) · get_code("324d0d067e127ddd")
How it ran

no invocation recorded.

conv2d_1x1 Not yet run
unverified (harvested, no recorded run)
mkettune/elpips/train_run.py
code served (permissive licence) · get_code("c709bb5cdca21cb6")
How it ran

no invocation recorded.

make_trainable Not yet run
unverified (harvested, no recorded run)
mkettune/elpips/elpips/networks.py
code served (permissive licence) · get_code("127a6b173d9016ce")
How it ran

no invocation recorded.

sample_ensemble Not yet run
unverified (harvested, no recorded run)
mkettune/elpips/elpips/elpips.py
code served (permissive licence) · get_code("b145e1bd83db8177")
How it ran

no invocation recorded.

Also present in other papers' code

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

It has been recently shown that the hidden variables of convolutional neural networks make for an efficient perceptual similarity metric that accurately predicts human judgment on relative image similarity assessment. First, we show that such learned perceptual similarity metrics (LPIPS) are susceptible to adversarial attacks that dramatically contradict human visual similarity judgment. While this is not surprising in light of neural networks' well-known weakness to adversarial perturbations, we proceed to show that self-ensembling with an infinite family of random transformations of the input --- a technique known not to render classification networks robust --- is enough to turn the metric robust against attack, while retaining predictive power on human judgments. Finally, we study the geometry imposed by our our novel self-ensembled metric (E-LPIPS) on the space of natural images. We find evidence of "perceptual convexity" by showing that convex combinations of similar-looking images retain appearance, and that discrete geodesics yield meaningful frame interpolation and texture morphing, all without explicit correspondences.

For agents

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

get_harvested_code_for_paper("1906.03973")
get_code_for_paper("1906.03973")
have("1906.03973")

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

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

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

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

Connect an agent — have() is free.