SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.07525 · 2022

Efficient Self-supervised Learning with Contextualized Target Representations for Vision, Speech and Language

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures 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/2212.07525.json · badge: /api/ran/2212.07525.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
ashutosh1919/data2vec-pytorch community (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
FunctionStatusWhere it lives
get_alibi Ran
ran, honoured the contract we drafted
ashutosh1919/data2vec-pytorch/data2vec/models/utils.py
code served (permissive licence) · get_code("64a73f82ea703bf0")
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 Tensor, ndim 3, dtype family float, shape (4, 8, 8) 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 math

torch.manual_seed(0)

ARGS = {
    "max_positions": 8,
    "attention_heads": 4,
}
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 Tensor, ndim 3, dtype family float, shape (4, 8, 8) — shape (4, 8, 8) 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
get_annealed_rate Ran
ran, honoured the contract we drafted
ashutosh1919/data2vec-pytorch/data2vec/models/data2vec_audio.py
code served (permissive licence) · get_code("27e813fec3cb4b6f")
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 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)

ARGS = {
    "start": 0.001,
    "end": 0.1,
    "curr_step": 500,
    "total_steps": 1000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
get_layer_id_for_vit Ran
ran, honoured the contract we drafted
ashutosh1919/data2vec-pytorch/data2vec/models/mae_image_classification.py
code served (permissive licence) · get_code("3f903f847b8f7f28")
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 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

torch.manual_seed(0)

# The function get_layer_id_for_vit takes two parameters:
# 1. name: a string representing a parameter name
# 2. num_layers: an integer representing the number of layers

# Let's construct valid test cases
name = "blocks.5.attn.qkv.weight"
num_layers = 12

ARGS = {
    "name": name,
    "num_layers": num_layers,
}
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 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
masked_alibi Ran
ran; our contract draft was wrong, not the code
ashutosh1919/data2vec-pytorch/data2vec/models/utils.py
code served (permissive licence) · get_code("beba926588613ced")
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 Tensor, ndim 3, dtype family float, shape (6, 3, 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 torch

torch.manual_seed(0)

# Analyze the function:
# - alibi_bias: tensor that gets reshaped to (orig_B, H, orig_T, orig_T)
# - mask_indices: tensor used with unsqueeze and masked_select
# - orig_B: int, batch size
# - orig_T: int, sequence length

# The function does:
# 1. alibi_bias.view(orig_B, -1, orig_T, orig_T) -> H is inferred
# 2. mask_indices.unsqueeze(1) and .unsqueeze(-1), .unsqueeze(-2)
# 3. masked_select operations that reduce dimensions
# 4. Final reshape to (-1, M, M)

# mask_indices must be a boolean tensor that can be broadcast properly
# It's used as alibi_mask = mask_indices.unsqueeze(1)
# Then alibi_mask.unsqueeze(-1) for first masked_select
# Then alibi_mask.unsqueeze(-2) for second masked_select

orig_B = 2
orig_T = 4
H = 3

# Create alibi_bias: shape should allow view to (orig_B, H, orig_T, orig_T)
# So total elements = 2 * 3 * 4 * 4 = 96
alibi_bias = torch.randn(96)

# Create mask_indices as a boolean tensor
# Based on usage: mask_indices.unsqueeze(1) then unsqueeze(-1) and unsqueeze(-2)
# It needs to broadcast with (orig_B, orig_T, orig_T)
# Starting shape should be (orig_B, orig_T) for this to work
mask_indices = torch.tensor([[True, True, False, True],
                              [True, False, True, True]], dtype=torch.bool)

ARGS = {
    "alibi_bias": alibi_bias,
    "mask_indices": mask_indices,
    "orig_B": orig_B,
    "orig_T": orig_T,
}
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 Tensor, ndim 3, dtype family float, shape (6, 3, 3) — shape (6, 3, 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
update_checkpoint Ran
ran; our contract draft was wrong, not the code
ashutosh1919/data2vec-pytorch/data2vec/fb_convert_beit_cp.py
code served (permissive licence) · get_code("cf82e11f14a349c2")
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 dict. 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)

# Construct a minimal model_dict with checkpoint state
model_dict = {
    'cls_token': torch.randn(1, 1, 4),
    'patch_embed.proj.weight': torch.randn(4, 3),
    'patch_embed.proj.bias': torch.randn(4),
    'mask_token': torch.randn(1, 1, 4),
    'mlp.fc1.weight': torch.randn(8, 4),
    'mlp.fc1.bias': torch.randn(8),
    'mlp.fc2.weight': torch.randn(4, 8),
    'mlp.fc2.bias': torch.randn(4),
    'lm_head.weight': torch.randn(10, 4),
    'lm_head.bias': torch.randn(10),
    'fc_norm.weight': torch.randn(4),
    'fc_norm.bias': torch.randn(4),
    'head.weight': torch.randn(5, 4),
    'head.bias': torch.randn(5),
    'other_layer.weight': torch.randn(3, 4),
}

prefix = 'model.'
is_nested = True

ARGS = {
    'model_dict': model_dict,
    'prefix': prefix,
    'is_nested': is_nested,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_2d_sincos_pos_embed Not yet run
unverified (harvested, no recorded run)
ashutosh1919/data2vec-pytorch/data2vec/models/mae.py
pointer only (licence: MIT); the stored copy get_code serves, from yunongLiu1/IKEA-Manuals-at-Work, is pointer only (licence: NONE) · get_code("3185afc3e87293ed")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yunongLiu1/IKEA-Manuals-at-Work, 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. No invocation recorded.

get_2d_sincos_pos_embed_from_grid Not yet run
unverified (harvested, no recorded run)
ashutosh1919/data2vec-pytorch/data2vec/models/mae.py
pointer only (licence: MIT); the stored copy get_code serves, from zhangyifei01/LMIM, is pointer only (licence: NONE) · get_code("f10004e059714d42")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zhangyifei01/LMIM, 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. No invocation recorded.

modify_relative_position_bias Not yet run
unverified (harvested, no recorded run)
ashutosh1919/data2vec-pytorch/data2vec/models/mae.py
code served (permissive licence) · get_code("915281feeb90ee5a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 8 later) and 0 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
get_2d_sincos_pos_embed_from_grid 190 other papers
17 dated earlier, 2 the same month, 171 later · 65 only as an assembly brick
1807.10221 (2018-07)
Unified Perceptual Parsing for Scene Understanding
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 187 more not named here
get_2d_sincos_pos_embed 95 other papers
13 dated earlier, 1 the same month, 81 later · 33 only as an assembly brick
1807.10221 (2018-07)
Unified Perceptual Parsing for Scene Understanding
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 92 more not named here
get_layer_id_for_vit 3 other papers
3 later
2401.03497 (2024-01)
EAT: Self-Supervised Pre-Training with Efficient Audio Transformer
2410.13179 (2024-10)
EH-MAM: Easy-to-Hard Masked Acoustic Modeling for Self-Supervised Speech Representation Learning
2506.12222 (2025-06)
SSLAM: Enhancing Self-Supervised Models with Audio Mixtures for Polyphonic Soundscapes
modify_relative_position_bias 3 other papers
3 later
2401.03497 (2024-01)
EAT: Self-Supervised Pre-Training with Efficient Audio Transformer
2410.13179 (2024-10)
EH-MAM: Easy-to-Hard Masked Acoustic Modeling for Self-Supervised Speech Representation Learning
2506.12222 (2025-06)
SSLAM: Enhancing Self-Supervised Models with Audio Mixtures for Polyphonic Soundscapes
get_alibi 1 other paper
1 later
2410.13179 (2024-10)
EH-MAM: Easy-to-Hard Masked Acoustic Modeling for Self-Supervised Speech Representation Learning
get_annealed_rate 1 other paper
1 later
2410.13179 (2024-10)
EH-MAM: Easy-to-Hard Masked Acoustic Modeling for Self-Supervised Speech Representation Learning
masked_alibi 1 other paper
1 later
2410.13179 (2024-10)
EH-MAM: Easy-to-Hard Masked Acoustic Modeling for Self-Supervised Speech Representation Learning
update_checkpoint 1 other paper
1 later
2410.13179 (2024-10)
EH-MAM: Easy-to-Hard Masked Acoustic Modeling for Self-Supervised Speech Representation Learning

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

Current self-supervised learning algorithms are often modality-specific and require large amounts of computational resources. To address these issues, we increase the training efficiency of data2vec, a learning objective that generalizes across several modalities. We do not encode masked tokens, use a fast convolutional decoder and amortize the effort to build teacher representations. data2vec 2.0 benefits from the rich contextualized target representations introduced in data2vec which enable a fast self-supervised learner. Experiments on ImageNet-1K image classification show that data2vec 2.0 matches the accuracy of Masked Autoencoders in 16.4x lower pre-training time, on Librispeech speech recognition it performs as well as wav2vec 2.0 in 10.6x less time, and on GLUE natural language understanding it matches a retrained RoBERTa model in half the time. Trading some speed for accuracy results in ImageNet-1K top-1 accuracy of 86.8\% with a ViT-L model trained for 150 epochs.

For agents

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

get_harvested_code_for_paper("2212.07525")
get_code_for_paper("2212.07525")
have("2212.07525")

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

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

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

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

Connect an agent — have() is free.