SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1612.04642 · 2016

Harmonic Networks: Deep Translation and Rotation Equivariance

arXiv · PDF · Open in the Atlas

Code that ran

6 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 6 have no contract verdict; 0 failures of our instrument; 7 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/1612.04642.json · badge: /api/ran/1612.04642.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
deworrall92/harmonicConvolutions community (classifier label)
classifier basis not recorded on the link
6 ran · 7 no recorded run
FunctionStatusWhere it lives
add_folder Ran
ran on a synthesized input
deworrall92/harmonicConvolutions/MNIST-rot/run_mnist.py
code served (permissive licence) · get_code("3585fc156f11f337")
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 str. 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 os
import tempfile
import shutil

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Define the folder name to be created (as a subdirectory of temp_dir)
folder_name = os.path.join(temp_dir, 'test_folder')

# Define ARGS dict with the folder_name parameter
ARGS = {
    'folder_name': folder_name
}

# Cleanup will happen when the test completes
# Note: The temp_dir itself exists, but folder_name (subdirectory) does not yet
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
bsd_preprocess Ran
ran on a synthesized input
deworrall92/harmonicConvolutions/BSD500/run_BSD.py
code served (permissive licence) · get_code("c5e0c334b1ea894e")
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 tuple, ndim 3, 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
import skimage.exposure as skiex

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

# Create small test images as numpy arrays
# im: input image, should be a 2D or 3D numpy array
# Using a small 4x3 array for the image
im = np.random.rand(4, 3).astype(np.float32)

# tg: target image, same shape as im
tg = np.random.rand(4, 3).astype(np.float32)

ARGS = {
    "im": im,
    "tg": tg,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
get_learning_rate Ran
ran on a synthesized input
deworrall92/harmonicConvolutions/MNIST-rot/run_mnist.py
code served (permissive licence) · get_code("b8e8d8cb56bc2548")
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 tuple, ndim 1, 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 torch
import torch.nn as nn

class Args:
    def __init__(self):
        self.delay = 3
        self.lr_div = 10

ARGS = {
    "args": Args(),
    "current": 0.85,
    "best": 0.80,
    "counter": 2,
    "learning_rate": 0.001
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
read_train_file Ran
ran on a synthesized input
deworrall92/harmonicConvolutions/deprecated/convert_imagenet_to_tfrecords.py
code served (permissive licence) · get_code("4e3936d10a010a69")
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 tuple. 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 tempfile
import os

# Create a temporary file with sample training file paths
temp_dir = tempfile.mkdtemp()
train_file = os.path.join(temp_dir, "train_files.txt")

# Write sample ImageNet-style paths to the temporary file
sample_paths = [
    "/media/daniel/DATA/ImageNet/ILSVRC2012_img_train/n01440764/n01440764_10026.JPEG",
    "/media/daniel/DATA/ImageNet/ILSVRC2012_img_train/n01440764/n01440764_10027.JPEG",
    "/media/daniel/DATA/ImageNet/ILSVRC2012_img_train/n01449583/n01449583_10001.JPEG",
    "/media/daniel/DATA/ImageNet/ILSVRC2012_img_train/n01449583/n01449583_10002.JPEG",
    "/media/daniel/DATA/ImageNet/ILSVRC2012_img_train/n01540053/n01540053_10001.JPEG",
]

with open(train_file, 'w') as f:
    for path in sample_paths:
        f.write(path + "\n")

new_data_dir = "/data/processed/"

ARGS = {
    "file": train_file,
    "new_data_directory": new_data_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
read_valid_file Ran
ran on a synthesized input
deworrall92/harmonicConvolutions/deprecated/convert_imagenet_to_tfrecords.py
code served (permissive licence) · get_code("5cae47060b6ff219")
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 tuple, ndim 2, 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 tempfile
import os

# Create a temporary file with validation data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("image1.jpg cat\n")
temp_file.write("image2.jpg dog\n")
temp_file.write("image3.jpg bird\n")
temp_file.close()

# Create a temporary directory for data
temp_dir = tempfile.mkdtemp()

# Create label map
label_map = {
    'cat': 0,
    'dog': 1,
    'bird': 2
}

ARGS = {
    'file': temp_file.name,
    'new_data_directory': temp_dir,
    'label_map': label_map
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
to_4d Ran
ran on a synthesized input
deworrall92/harmonicConvolutions/BSD500/BSD_model.py
code served (permissive licence) · get_code("31167f7af878ba77")
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, shape (2, 3, 4, 30) 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 tensorflow as tf

# Create a small 4D+ tensor to test the function
# The function reshapes tensors with shape [batch, dim1, dim2, ...rest]
# to shape [batch, dim1, dim2, prod(rest)]

batch_size = 2
dim1 = 3
dim2 = 4
rest_dims = [5, 6]  # These will be flattened into a single dimension

# Create a tensor with shape (2, 3, 4, 5, 6)
tensor_shape = [batch_size, dim1, dim2] + rest_dims
x = tf.constant(np.random.randn(*tensor_shape), dtype=tf.float32)

ARGS = {
    "x": x
}
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, shape (2, 3, 4, 30) — shape (2, 3, 4, 30) 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
batch_norm Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/harmonic_network_lite.py
code served (permissive licence) · get_code("7723edaa5a84d58f")
How it ran

no invocation recorded.

conv2d Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/harmonic_network_lite.py
code served (permissive licence) · get_code("c279237444adb14b")
How it ran

no invocation recorded.

h_conv Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/harmonic_network_ops.py
code served (permissive licence) · get_code("ccf8f3d68866badd")
How it ran

no invocation recorded.

h_nonlin Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/harmonic_network_ops.py
code served (permissive licence) · get_code("3176341d4187a34c")
How it ran

no invocation recorded.

h_range_conv Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/harmonic_network_ops.py
code served (permissive licence) · get_code("d058392f498fa843")
How it ran

no invocation recorded.

non_linearity Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/harmonic_network_lite.py
code served (permissive licence) · get_code("745a4cd097402be8")
How it ran

no invocation recorded.

vgg_bsd Not yet run
unverified (harvested, no recorded run)
deworrall92/harmonicConvolutions/BSD500/BSD_model.py
code served (permissive licence) · get_code("1e4678f177467e83")
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 13 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 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.

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

Translating or rotating an input image should not affect the results of many computer vision tasks. Convolutional neural networks (CNNs) are already translation equivariant: input image translations produce proportionate feature map translations. This is not the case for rotations. Global rotation equivariance is typically sought through data augmentation, but patch-wise equivariance is more difficult. We present Harmonic Networks or H-Nets, a CNN exhibiting equivariance to patch-wise translation and 360-rotation. We achieve this by replacing regular CNN filters with circular harmonics, returning a maximal response and orientation for every receptive field patch. H-Nets use a rich, parameter-efficient and low computational complexity representation, and we show that deep feature maps within the network encode complicated rotational invariants. We demonstrate that our layers are general enough to be used in conjunction with the latest architectures and techniques, such as deep supervision and batch normalization. We also achieve state-of-the-art classification on rotated-MNIST, and competitive results on other benchmark challenges.

For agents

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

get_harvested_code_for_paper("1612.04642")
get_code_for_paper("1612.04642")
have("1612.04642")

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

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

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

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

Connect an agent — have() is free.