SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.00910 · 2019

Learning Representations by Maximizing Mutual Information Across Views

Philip Bachman, Devon Hjelm, William Buchwalter

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 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; 1 failure of our instrument; 3 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.00910.json · badge: /api/ran/1906.00910.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
Alibaba-AAIG/SSL-FEW-SHOT community
Papers with Code archive
5 ran · 2 no recorded run
cfld/amdim community
Papers with Code archive
2 ran · 1 no recorded run
Philip-Bachman/amdim-public community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Conv3x3 Ran
ran on a synthesized input · constructed an object; no result was computed
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("fd0c3fab3b60d3c1")
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 an instance of its own class, Conv3x3: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'n_in': 3,
    'n_out': 16,
    'n_kern': 3,
    'n_stride': 1,
    'n_pad': 1,
    'use_bn': True,
    'pad_mode': 'constant'
}
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 Conv3x3 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Conv3x3 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
ConvResBlock Ran
ran on a synthesized input · constructed an object; no result was computed
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("033b4f1cc1d18de5")
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 an instance of its own class, ConvResBlock: the run constructed the object and did not call it, so no result was computed. 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
import math

torch.manual_seed(0)

class MaybeBatchNorm2d(nn.Module):
    def __init__(self, n_ftr, affine, use_bn):
        super(MaybeBatchNorm2d, self).__init__()
        self.bn = nn.BatchNorm2d(n_ftr, affine=affine)
        self.use_bn = use_bn

    def forward(self, x):
        if self.use_bn:
            x = self.bn(x)
        return x

class ConvResNxN(nn.Module):
    def __init__(self, n_in, n_out, width, stride, pad, use_bn=False):
        super(ConvResNxN, self).__init__()
        assert n_out >= n_in
        self.n_in = n_in
        self.n_out = n_out
        self.width = width
        self.stride = stride
        self.pad = pad
        self.relu1 = nn.ReLU(inplace=True)
        self.relu2 = nn.ReLU(inplace=True)
        self.conv1 = nn.Conv2d(n_in, n_out, width, stride, pad, bias=False)
        self.conv2 = nn.Conv2d(n_out, n_out, 1, 1, 0, bias=False)
        self.conv3 = None
        self.bn1 = MaybeBatchNorm2d(n_out, True, use_bn)

    def init_weights(self, init_scale=1.0):
        nn.init.kaiming_uniform_(self.conv1.weight, a=math.sqrt(5))
        self.conv1.weight.data.mul_(init_scale)
        nn.init.constant_(self.conv2.weight, 0.0)

    def forward(self, x):
        import torch.nn.functional as F
        h1 = self.bn1(self.conv1(x))
        h2 = self.conv2(self.relu2(h1))
        if self.n_out < self.n_in:
            h3 = self.conv3(x)
        elif self.n_in == self.n_out:
            h3 = F.avg_pool2d(x, self.width, self.stride, self.pad)
        else:
            h3_pool = F.avg_pool2d(x, self.width, self.stride, self.pad)
            h3 = F.pad(h3_pool, (0, 0, 0, 0, 0, self.n_out - self.n_in))
        h23 = h2 + h3
        return h23

class ConvResBlock(nn.Module):
    def __init__(self, n_in, n_out, width, stride, pad, depth, use_bn):
        super(ConvResBlock, self).__init__()
        layer_list = [ConvResNxN(n_in, n_out, width, stride, pad, use_bn)]
        for i in range(depth - 1):
            layer_list.append(ConvResNxN(n_out, n_out, 1, 1, 0, use_bn))
        self.layer_list = nn.Sequential(*layer_list)

    def init_weights(self, init_scale=1.0):
        for m in self.layer_list:
            m.init_weights(init_scale)

    def forward(self, x):
        x_out = self.layer_list(x)
        return x_out

ARGS = {
    "n_in": 3,
    "n_out": 5,
    "width": 3,
    "stride": 1,
    "pad": 1,
    "depth": 2,
    "use_bn": False
}
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 ConvResBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConvResBlock 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
ConvResNxN Ran
ran on a synthesized input · constructed an object; no result was computed
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("5cd380ad133ebedc")
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 an instance of its own class, ConvResNxN: the run constructed the object and did not call it, so no result was computed. 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
import math

torch.manual_seed(0)

# ConvResNxN expects:
# n_in: number of input channels
# n_out: number of output channels
# width: kernel width for conv1
# stride: stride for conv1
# pad: padding for conv1
# use_bn: whether to use batch norm (optional, defaults to False)

ARGS = {
    'n_in': 4,
    'n_out': 8,
    'width': 3,
    'stride': 1,
    'pad': 1,
    'use_bn': True
}
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 ConvResNxN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConvResNxN 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
MaybeBatchNorm2d Ran
ran on a synthesized input · constructed an object; no result was computed
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("5212c46b5f2ab291")
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 an instance of its own class, MaybeBatchNorm2d: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'n_ftr': 16,
    'affine': True,
    'use_bn': True
}
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 MaybeBatchNorm2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MaybeBatchNorm2d 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
NCE_MI_MULTI Ran
ran on a synthesized input
cfld/amdim/amdim/costs.py
pointer only (licence: NONE) · get_code("ff3dd74ec75795e6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cfld/amdim 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.

NCE_MI_MULTI Ran
ran on a synthesized input
Philip-Bachman/amdim-public/costs.py
code served (permissive licence) · get_code("df7e2b94c623d6a1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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

# INIT_ARGS
INIT_ARGS = {
    'tclip': 20.0
}

# ARGS
n_batch_gpu = 2
n_batch = 2
n_rkhs = 8
n_locs = 3

# Create input tensors
r1_src_1 = torch.randn(n_batch_gpu, n_rkhs)
r5_src_1 = torch.randn(n_batch_gpu, n_rkhs)
r1_src_2 = torch.randn(n_batch_gpu, n_rkhs)
r5_src_2 = torch.randn(n_batch_gpu, n_rkhs)

# r5_trg and r7_trg are lists containing tensors of shape (n_rkhs, n_batch * n_locs)
r5_trg_1 = [torch.randn(n_rkhs, n_batch * n_locs)]
r7_trg_1 = [torch.randn(n_rkhs, n_batch * n_locs)]
r5_trg_2 = [torch.randn(n_rkhs, n_batch * n_locs)]
r7_trg_2 = [torch.randn(n_rkhs, n_batch * n_locs)]

# mask_mat of shape (n_batch_gpu, n_batch)
mask_mat = torch.tensor([[1.0, 0.0], [0.0, 1.0]])

mode = 'train'

ARGS = {
    'r1_src_1': r1_src_1,
    'r5_src_1': r5_src_1,
    'r1_src_2': r1_src_2,
    'r5_src_2': r5_src_2,
    'r5_trg_1': r5_trg_1,
    'r7_trg_1': r7_trg_1,
    'r5_trg_2': r5_trg_2,
    'r7_trg_2': r7_trg_2,
    'mask_mat': mask_mat,
    'mode': mode
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
NopNet Ran
ran on a synthesized input · constructed an object; no result was computed
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("1ec03f92bbeb5aa5")
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 an instance of its own class, NopNet: the run constructed the object and did not call it, so no result was computed. 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 NopNet.__init__ takes only norm_dim as a parameter
# norm_dim can be None or an integer specifying which dimension to normalize over

# Create a small test tensor: batch_size=2, features=4
x = torch.randn(2, 4)

# norm_dim can be None (no normalization) or an integer (normalize along that dimension)
# Let's test with norm_dim=1 (normalize each sample independently)
norm_dim = 1

ARGS = {
    'norm_dim': norm_dim
}
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 NopNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NopNet 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
tanh_clip Ran
ran; our contract draft was wrong, not the code
cfld/amdim/amdim/costs.py
pointer only (licence: NONE) · get_code("93154000bc1f766f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cfld/amdim 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.

AmdimNet Not yet run
unverified (harvested, no recorded run)
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("f46b7bbcd154de3b")
How it ran

no invocation recorded.

FakeRKHSConvNet Not yet run
unverified (harvested, no recorded run)
Alibaba-AAIG/SSL-FEW-SHOT/feat/networks/amdimnet.py
code served (permissive licence) · get_code("5e82fbe775ab5a0e")
How it ran

no invocation recorded.

LossMultiNCE Not yet run
unverified (harvested, no recorded run)
cfld/amdim/amdim/costs.py
pointer only (licence: NONE) · get_code("e4ac668dd3286000")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cfld/amdim 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 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 10 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
tanh_clip
brick of this paper's assembly: helper
1 other paper
1 later
2006.05553 (2020-06)
Neural Methods for Point-wise Dependency Estimation

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

We propose an approach to self-supervised representation learning based on maximizing mutual information between features extracted from multiple views of a shared context. For example, one could produce multiple views of a local spatiotemporal context by observing it from different locations (e.g., camera positions within a scene), and via different modalities (e.g., tactile, auditory, or visual). Or, an ImageNet image could provide a context from which one produces multiple views by repeatedly applying data augmentation. Maximizing mutual information between features extracted from these views requires capturing information about high-level factors whose influence spans multiple views -e.g., presence of certain objects or occurrence of certain events. Following our proposed approach, we develop a model which learns image representations that significantly outperform prior methods on the tasks we consider. Most notably, using self-supervised learning, our model learns representations which achieve 68.1% accuracy on Im-ageNet using standard linear evaluation. This beats prior results by over 12% and concurrent results by 7%. When we extend our model to use mixture-based representations, segmentation behaviour emerges as a natural side-effect. Our code is available online: https://github.com/Philip-Bachman/amdim-public.

For agents

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

get_harvested_code_for_paper("1906.00910")
get_code_for_paper("1906.00910")
have("1906.00910")

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

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

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

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

Connect an agent — have() is free.