SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.10555 · ICLR · 2020

ELECTRA: PRE-TRAINING TEXT ENCODERS AS DISCRIMINATORS RATHER THAN GENERATORS

Quoc Le, Kevin Clark, Minh-Thang Luong, Christopher Manning

arXiv · PDF · Open in the Atlas

Code that ran

31 of 40 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 2 violated it and 12 have no contract verdict; 14 failures of our instrument; 9 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-21; 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/2003.10555.json · badge: /api/ran/2003.10555.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
lucidrains/electra-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
9 ran · 0 no recorded run
YChen1993/ELECRec community
Papers with Code archive
6 ran · 0 no recorded run
jbeno/sentiment community
Papers with Code archive
4 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
4 ran · 0 no recorded run
okanvk/ENELPI---Soru-Cevap-Sistemi community (classifier label)
classifier basis not recorded on the link
3 ran · 7 no recorded run
MalteHB/-l-ctra community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
richarddwang/electra_pytorch reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
smallbenchnlp/ELECTRA-DeBERTa community
Papers with Code archive
1 ran · 0 no recorded run
ThilinaRajapakse/simpletransformers community
Papers with Code archive
0 ran · 1 no recorded run
okanvk/Turkish-Reading-Comprehension-Question-Answering-Dataset community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
gumbel_noise Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("3f0491e137c5b556")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T23:26:03Z). 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)

def log(t, eps=1e-09):
    return torch.log(t + eps)

def gumbel_noise(t):
    noise = torch.zeros_like(t).uniform_(0, 1)
    return -log(-log(noise))

# Create a small tensor to pass to gumbel_noise
t = torch.randn(2, 4)

ARGS = {
    "t": t
}
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 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
Classifier Ran
ran on a synthesized input · constructed an object; no result was computed
jbeno/sentiment/classifier.py
pointer only (licence: GPL-3.0) · get_code("fe88c97941ebd49b")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, jbeno/sentiment, is not in the permissive set Syntology serves inline. 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.

CustomElectraClassifier Ran
ran on a synthesized input · constructed an object; no result was computed
jbeno/sentiment/classifier.py
pointer only (licence: GPL-3.0) · get_code("31adaef1bf068638")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, jbeno/sentiment, is not in the permissive set Syntology serves inline. 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.

ELECITY Ran
ran on a synthesized input · constructed an object; no result was computed
YChen1993/ELECRec/src/trainers.py
code served (permissive licence) · get_code("746db01cb1933bb5")
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, ELECITY: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np
from torch.optim import Adam
from argparse import Namespace

torch.manual_seed(0)

# Create minimal generator model
class MinimalGenerator(nn.Module):
    def __init__(self, hidden_size=4, item_size=10, max_seq_length=3):
        super().__init__()
        self.hidden_size = hidden_size
        self.item_size = item_size
        self.max_seq_length = max_seq_length
        self.item_embeddings = nn.Embedding(item_size, hidden_size)
        self.args = Namespace(max_seq_length=max_seq_length)
    
    def forward(self, x):
        return torch.randn(2, self.max_seq_length, self.hidden_size)

# Create minimal discriminator model
class MinimalDiscriminator(nn.Module):
    def __init__(self, hidden_size=4, item_size=10):
        super().__init__()
        self.hidden_size = hidden_size
        self.item_size = item_size
        self.fc = nn.Linear(hidden_size, 2)
    
    def forward(self, x):
        return torch.randn(2, 2)

# Create minimal dataloaders
def create_dataloader(batch_size=2, seq_length=3, num_batches=2):
    batches = []
    for _ in range(num_batches):
        seq = torch.randint(0, 10, (batch_size, seq_length))
        labels = torch.randint(0, 2, (batch_size,))
        batches.append((seq, labels))
    return batches

# Create args namespace
ARGS = {
    'generator': MinimalGenerator(hidden_size=4, item_size=10, max_seq_length=3),
    'discriminator': MinimalDiscriminator(hidden_size=4, item_size=10),
    'train_dataloader': create_dataloader(batch_size=2, seq_length=3, num_batches=2),
    'eval_dataloader': create_dataloader(batch_size=2, seq_length=3, num_batches=1),
    'test_dataloader': create_dataloader(batch_size=2, seq_length=3, num_batches=1),
    'args': Namespace(
        no_cuda=True,
        adam_beta1=0.9,
        adam_beta2=0.999,
        lr=0.001,
        weight_decay=0.0,
        log_file='/tmp/log.txt',
        hidden_size=4,
        max_seq_length=3,
        item_size=10,
        item_sample_ratio=0.5,
        prob_power=1.0,
        sample_ratio=0.5
    )
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ELECITY — 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 ELECITY 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
Electra Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("05b426304336430b")
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, Electra: 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 math
import torch
from torch import nn
import torch.nn.functional as F

torch.manual_seed(0)

# Build a minimal generator that outputs logits
class SimpleGenerator(nn.Module):
    def __init__(self, vocab_size=10, hidden_size=4, seq_len=5):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_size)
        self.output = nn.Linear(hidden_size, vocab_size)
        self.seq_len = seq_len
    
    def forward(self, input, **kwargs):
        # input shape: (batch, seq_len)
        x = self.embedding(input)  # (batch, seq_len, hidden_size)
        logits = self.output(x)  # (batch, seq_len, vocab_size)
        return logits

# Build a minimal discriminator that outputs binary predictions per token
class SimpleDiscriminator(nn.Module):
    def __init__(self, vocab_size=10, hidden_size=4):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_size)
        self.hidden_layer = nn.Linear(hidden_size, hidden_size)
        self.output = nn.Linear(hidden_size, 1)
    
    def forward(self, input, **kwargs):
        # input shape: (batch, seq_len)
        x = self.embedding(input)  # (batch, seq_len, hidden_size)
        x = self.hidden_layer(x)   # (batch, seq_len, hidden_size)
        logits = self.output(x)    # (batch, seq_len, 1)
        return logits

# Create instances
vocab_size = 10
hidden_size = 4
seq_len = 5
batch_size = 2

generator = SimpleGenerator(vocab_size=vocab_size, hidden_size=hidden_size, seq_len=seq_len)
discriminator = SimpleDiscriminator(vocab_size=vocab_size, hidden_size=hidden_size)

# Create input tensor (batch_size=2, seq_len=5)
input_tensor = torch.randint(0, vocab_size, (batch_size, seq_len))

ARGS = {
    'generator': generator,
    'discriminator': discriminator,
    'num_tokens': vocab_size,
    'discr_dim': -1,  # no linear layer added
    'discr_layer': -1,
    'mask_prob': 0.15,
    'replace_prob': 0.85,
    'random_token_prob': 0.0,
    'mask_token_id': 2,
    'pad_token_id': 0,
    'mask_ignore_token_ids': [],
    'disc_weight': 50.0,
    'gen_weight': 1.0,
    'temperature': 1.0,
}
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 Electra — 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 Electra 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
Electra Ran
ran on a synthesized input
smallbenchnlp/ELECTRA-DeBERTa/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("eeccb8777414a81a")
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 Results. 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 numpy as np
from torch import nn

# Small stand-in modules
class TinyGenerator(nn.Module):
    def __init__(self, vocab_size=10, hidden_dim=4):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_dim)
        self.transform = nn.Linear(hidden_dim, hidden_dim)
        self.proj = nn.Linear(hidden_dim, vocab_size)

    def forward(self, x):
        x = self.embedding(x)
        x = self.transform(x)
        return self.proj(x)

class TinyDiscriminator(nn.Module):
    def __init__(self, hidden_dim=4):
        super().__init__()
        self.embedding = nn.Embedding(10, hidden_dim)
        self.layers = nn.Sequential(
            nn.Linear(hidden_dim, hidden_dim),
            nn.GELU(),
            nn.Linear(hidden_dim, hidden_dim)
        )

    def forward(self, x):
        x = self.embedding(x)
        return self.layers(x)

# Config dicts
INIT_ARGS = {
    'generator': TinyGenerator(),
    'discriminator': TinyDiscriminator(),
    'num_tokens': 10,
    'discr_dim': 4,
    'discr_layer': -1,
    'mask_prob': 0.15,
    'replace_prob': 0.85,
    'random_token_prob': 0.0,
    'mask_token_id': 2,
    'pad_token_id': 0,
    'mask_ignore_token_ids': [],
    'disc_weight': 50.0,
    'gen_weight': 1.0,
    'temperature': 1.0
}

# Input tensor
ARGS = {
    'input': torch.randint(0, 10, (2, 8))
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Results — a Results 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
FixVCMacroSlashes Ran
ran on a synthesized input
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
code served (permissive licence) · get_code("fe0cfcdd4f533d4a")
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 re

fix_vc_macro_slashes_regex_list = ('IntDir', 'OutDir')
fix_vc_macro_slashes_regex = re.compile('(\\$\\((?:%s)\\))(?:[\\\\/]+)' % '|'.join(fix_vc_macro_slashes_regex_list))

def FixVCMacroSlashes(s):
    """Replace macros which have excessive following slashes.

  These macros are known to have a built-in trailing slash. Furthermore, many
  scripts hiccup on processing paths with extra slashes in the middle.

  This list is probably not exhaustive.  Add as needed.
  """
    if '$' in s:
        s = fix_vc_macro_slashes_regex.sub('\\1', s)
    return s

# The function takes a single parameter 's' which is a string
# It checks if '$' is in the string and applies regex substitution if so
# The regex targets $(IntDir) or $(OutDir) followed by one or more slashes or backslashes

ARGS = {
    's': '$(IntDir)\\\\some\\path\\$(OutDir)///another/path'
}
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
GetPreferredTryMasters Ran
ran on a synthesized input
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/PRESUBMIT.py
code served (permissive licence) · get_code("8b5c77d9bafa4f74")
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 numpy as np

class MockChange:
    """Stand-in for a change object with minimal required structure."""
    def __init__(self):
        self.data = {}

ARGS = {
    '_': None,
    'change': MockChange()
}
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 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
HiddenLayerExtractor Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("0e623ffa58c046a7")
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, HiddenLayerExtractor: 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
from torch import nn

torch.manual_seed(0)

# Create a simple neural network to use as the base network
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.layer3 = nn.Linear(2, 5)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.layer3(x)
        return x

# Instantiate the network
net = SimpleNet()

# Create test input tensor (batch_size=2, features=4)
test_input = torch.randn(2, 4)

# Test that the network works
_ = net(test_input)

# Define arguments for HiddenLayerExtractor
# Test with integer layer index (-2 should reference layer2)
ARGS = {
    'net': net,
    'layer': -2
}
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 HiddenLayerExtractor — 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 HiddenLayerExtractor 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
PoolingLayer Ran
ran on a synthesized input · constructed an object; no result was computed
jbeno/sentiment/classifier.py
pointer only (licence: GPL-3.0) · get_code("7b1e3bc29ddcc47d")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, jbeno/sentiment, is not in the permissive set Syntology serves inline. 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.

ShardTargets Ran
ran on a synthesized input
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
code served (permissive licence) · get_code("dbc5cf3cd537a793")
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 copy

def _SuffixName(name, suffix):
    """Add a suffix to the end of a target.

  Arguments:
    name: name of the target (foo#target)
    suffix: the suffix to be added
  Returns:
    Target name with suffix added (foo_suffix#target)
  """
    parts = name.rsplit('#', 1)
    parts[0] = '%s_%s' % (parts[0], suffix)
    return '#'.join(parts)

def _ShardName(name, number):
    """Add a shard number to the end of a target.

  Arguments:
    name: name of the target (foo#target)
    number: shard number
  Returns:
    Target name with shard added (foo_1#target)
  """
    return _SuffixName(name, str(number))

def ShardTargets(target_list, target_dicts):
    """Shard some targets apart to work around the linkers limits.

  Arguments:
    target_list: List of target pairs: 'base/base.gyp:base'.
    target_dicts: Dict of target properties keyed on target pair.
  Returns:
    Tuple of the new sharded versions of the inputs.
  """
    targets_to_shard = {}
    for t in target_dicts:
        shards = int(target_dicts[t].get('msvs_shard', 0))
        if shards:
            targets_to_shard[t] = shards
    new_target_list = []
    for t in target_list:
        if t in targets_to_shard:
            for i in range(targets_to_shard[t]):
                new_target_list.append(_ShardName(t, i))
        else:
            new_target_list.append(t)
    new_target_dicts = {}
    for t in target_dicts:
        if t in targets_to_shard:
            for i in range(targets_to_shard[t]):
                name = _ShardName(t, i)
                new_target_dicts[name] = copy.copy(target_dicts[t])
                new_target_dicts[name]['target_name'] = _ShardName(new_target_dicts[name]['target_name'], i)
                sources = new_target_dicts[name].get('sources', [])
                new_sources = []
                for pos in range(i, len(sources), targets_to_shard[t]):
                    new_sources.append(sources[pos])
                new_target_dicts[name]['sources'] = new_sources
        else:
            new_target_dicts[t] = target_dicts[t]
    for t in new_target_dicts:
        for deptype in ('dependencies', 'dependencies_original'):
            dependencies = copy.copy(new_target_dicts[t].get(deptype, []))
            new_dependencies = []
            for d in dependencies:
                if d in targets_to_shard:
                    for i in range(targets_to_shard[d]):
                        new_dependencies.append(_ShardName(d, i))
                else:
                    new_dependencies.append(d)
            new_target_dicts[t][deptype] = new_dependencies
    return (new_target_list, new_target_dicts)


ARGS = {
    'target_list': [
        'base/base.gyp:base',
        'net/net.gyp:net',
        'url/url.gyp:url'
    ],
    'target_dicts': {
        'base/base.gyp:base': {
            'msvs_shard': 2,
            'target_name': 'base',
            'sources': ['file1.cc', 'file2.cc', 'file3.cc', 'file4.cc'],
            'dependencies': ['net/net.gyp:net'],
            'dependencies_original': ['net/net.gyp:net']
        },
        'net/net.gyp:net': {
            'msvs_shard': 0,
            'target_name': 'net',
            'sources': ['net1.cc', 'net2.cc'],
            'dependencies': [],
            'dependencies_original': []
        },
        'url/url.gyp:url': {
            'msvs_shard': 3,
            'target_name': 'url',
            'sources': ['url1.cc', 'url2.cc', 'url3.cc', 'url4.cc', 'url5.cc', 'url6.cc'],
            'dependencies': ['base/base.gyp:base'],
            'dependencies_original': ['base/base.gyp:base']
        }
    }
}
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
SwishGLU Ran
ran on a synthesized input
jbeno/sentiment/classifier.py
pointer only (licence: GPL-3.0) · get_code("476517c90ed9ae4c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, jbeno/sentiment, is not in the permissive set Syntology serves inline. 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.

Trainer Ran
ran on a synthesized input · constructed an object; no result was computed
YChen1993/ELECRec/src/trainers.py
code served (permissive licence) · get_code("0e085ca2f3d4bb62")
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, Trainer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np
import math
import tempfile

torch.manual_seed(0)

class SimpleGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 4)
    
    def forward(self, x):
        return self.linear(x)

class SimpleArgs:
    def __init__(self):
        self.no_cuda = True
        self.adam_beta1 = 0.9
        self.adam_beta2 = 0.999
        self.lr = 0.001
        self.weight_decay = 0.0
        self.max_seq_length = 5
        self.log_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.log').name

generator = SimpleGenerator()
discriminator = SimpleDiscriminator()

train_batch_1 = (torch.randn(2, 4), torch.randint(0, 4, (2,)))
train_batch_2 = (torch.randn(2, 4), torch.randint(0, 4, (2,)))
train_dataloader = [train_batch_1, train_batch_2]

eval_batch_1 = (torch.randn(2, 4), torch.randint(0, 4, (2,)))
eval_dataloader = [eval_batch_1]

test_batch_1 = (torch.randn(2, 4), torch.randint(0, 4, (2,)))
test_dataloader = [test_batch_1]

args = SimpleArgs()

ARGS = {
    'generator': generator,
    'discriminator': discriminator,
    'train_dataloader': train_dataloader,
    'eval_dataloader': eval_dataloader,
    'test_dataloader': test_dataloader,
    'args': args
}
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 Trainer — 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 Trainer 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
create_int_feature Ran
ran; our contract draft was wrong, not the code
MalteHB/-l-ctra/electra_google/build_pretraining_dataset.py
code served (permissive licence) · get_code("b03d45af664a39e3")
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 Feature. 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.compat.v1 as tf

# The function takes 'values' parameter and converts it to a list
# which is then passed to tf.train.Int64List(value=list(values))
# So values needs to be something iterable that can be converted to a list of integers

values = [1, 2, 3, 4, 5]

ARGS = {
    "values": values
}
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 Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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_electra_train_flops Ran
ran, honoured the contract we drafted
MalteHB/-l-ctra/electra_google/flops_computation.py
code served (permissive licence) · get_code("c8b43ae9d1268761")
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.

# Setup code for get_electra_train_flops

ARGS = {
    'h_d': 768,           # discriminator hidden size
    'l_d': 12,            # discriminator layers
    'h_g': 256,           # generator hidden size
    'l_g': 12,            # generator layers
    'batch_size': 32,     # batch size
    'train_steps': 100,   # training steps
    'tied_embeddings': True,  # whether embeddings are tied
    'e': 768,             # embedding dimension
    's': 512,             # sequence length
    'output_frac': 0.15625  # output fraction
}
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 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_exp_id Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/pretraining/openwebtext/pretrain.py
code served (permissive licence) · get_code("759bed040fc319f3")
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 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

# Create a temporary file to use as the argument
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
    temp_file = f.name
    f.write("# test file")

try:
    ARGS = {
        "file": temp_file
    }
finally:
    # Clean up
    if os.path.exists(temp_file):
        os.remove(temp_file)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
get_mask_subset_with_prob Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/mlm-pytorch
pointer only · get_code("e33ada12822bb56c")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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_metric Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YChen1993/ELECRec/src/trainers.py
code served (permissive licence) · get_code("ac6da27d75f60e2b")
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 numpy as np

# Analyze the function:
# - pred_list: a list/iterable of rank values (integers)
# - topk: an integer parameter with default value 10
# The function iterates through pred_list, treating each element as a rank (0-indexed position)
# and computes NDCG, HIT, and MRR metrics

# Create a simple pred_list with some rank values
pred_list = [0, 1, 2, 5, 15, 20, 8, 3, 1, 0]

# topk parameter
topk = 10

ARGS = {
    "pred_list": pred_list,
    "topk": topk
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
get_output_dir Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/pretraining/openwebtext/pretrain.py
code served (permissive licence) · get_code("626e63a150cc746f")
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 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 output to avoid polluting the filesystem
temp_dir = tempfile.mkdtemp()
original_output_dir = 'output'

# Patch os.path.join and os.makedirs to use temp directory
_original_join = os.path.join
_original_makedirs = os.makedirs

def patched_join(*args):
    result = _original_join(*args)
    if result.startswith('output/'):
        result = result.replace('output/', temp_dir + '/', 1)
    return result

def patched_makedirs(path, exist_ok=False):
    # Create in temp directory instead
    if path.startswith(temp_dir):
        _original_makedirs(path, exist_ok=exist_ok)

os.path.join = patched_join
os.makedirs = patched_makedirs

ARGS = {
    'exp_id': 'test_experiment'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
gumbel_noise Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("983767b34d11c495")
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 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 torch

torch.manual_seed(0)

def log(t, eps=1e-09):
    return torch.log(t + eps)

def gumbel_noise(t):
    noise = torch.zeros_like(t).uniform_(0, 1)
    return -log(-log(noise))

# Create a small tensor to pass to gumbel_noise
t = torch.randn(2, 4)

ARGS = {
    "t": t
}
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 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
gumbel_sample Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("00982897fc3374b0")
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 1, dtype family int, shape (2,) 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)

# gumbel_sample takes parameters: t, temperature
# t should be a tensor (logits)
# temperature should be a float

# Create a small logits tensor
t = torch.randn(2, 4)  # batch_size=2, num_classes=4

# temperature is a float parameter
temperature = 1.0

ARGS = {
    "t": t,
    "temperature": temperature,
}
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 1, dtype family int, shape (2,) — shape (2,) 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
gumbel_sample Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("340d3b3d2515a22b")
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 1, dtype family int, shape (2,) 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 gumbel_sample takes:
# - t: a tensor (logits), used with division, gumbel_noise, and argmax on dim=-1
# - temperature: a float (default 1.0)

# Create a small logits tensor with shape (batch=2, num_classes=4)
logits = torch.randn(2, 4)

ARGS = {
    "t": logits,
    "temperature": 1.0,
}
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 1, dtype family int, shape (2,) — shape (2,) 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
idcg_k Ran
ran, honoured the contract we drafted
YChen1993/ELECRec/src/trainers.py
code served (permissive licence) · get_code("20b7c6470df6e0be")
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 math

def idcg_k(k):
    res = sum([1.0 / math.log(i + 2, 2) for i in range(k)])
    if not res:
        return 1.0
    else:
        return res

ARGS = {
    "k": 5
}
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 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
list_parameters Ran
ran; our contract draft was wrong, not the code
richarddwang/electra_pytorch/finetune.py
pointer only (licence: NONE) · get_code("de0fde92ce293206")
How it ran

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

log Ran
ran; our contract draft was wrong, not the code
lucidrains/electra-pytorch/electra_pytorch/electra_pytorch.py
code served (permissive licence) · get_code("c01e5c8df433613c")
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 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 torch
import math

torch.manual_seed(0)

# The function log(t, eps=1e-09) takes a tensor t and an optional eps parameter
# It returns torch.log(t + eps)

# Create a small tensor for testing
t = torch.tensor([[0.1, 0.5, 1.0, 2.0], [0.01, 0.05, 0.1, 0.5]], dtype=torch.float32)

ARGS = {
    't': t,
    'eps': 1e-09
}
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 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
log Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/marge-pytorch
pointer only · get_code("6269424d608eba34")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

mask_tokens Ran
ran; our contract draft was wrong, not the code
richarddwang/electra_pytorch/pretrain.py
pointer only (licence: NONE) · get_code("b195c0bc58a304ad")
How it ran

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

mask_with_tokens Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/mlm-pytorch
pointer only · get_code("5573a79bdc0a0a09")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

ndcg_k Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YChen1993/ELECRec/src/trainers.py
code served (permissive licence) · get_code("8667036db81df043")
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 math

def idcg_k(k):
    res = sum([1.0 / math.log(i + 2, 2) for i in range(k)])
    if not res:
        return 1.0
    else:
        return res

def ndcg_k(actual, predicted, topk):
    res = 0
    for user_id in range(len(actual)):
        k = min(topk, len(actual[user_id]))
        idcg = idcg_k(k)
        dcg_k = sum([int(predicted[user_id][j] in set(actual[user_id])) / math.log(j + 2, 2) for j in range(topk)])
        res += dcg_k / idcg
    return res / float(len(actual))

# actual: list of lists containing ground truth item IDs for each user
actual = [
    [1, 3, 5],
    [2, 4, 6, 7]
]

# predicted: list of lists containing predicted item IDs for each user
predicted = [
    [1, 2, 3, 4, 5],
    [2, 5, 6, 8, 9]
]

# topk: integer specifying the cutoff for evaluation
topk = 3

ARGS = {
    "actual": actual,
    "predicted": predicted,
    "topk": topk
}
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 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
prob_mask_like Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from lucidrains/mlm-pytorch
pointer only · get_code("0a27e49623646a01")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

recall_at_k Ran
ran; our contract draft was wrong, not the code
YChen1993/ELECRec/src/trainers.py
code served (permissive licence) · get_code("a7d3c6223f6b59ea")
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

# The function expects:
# - actual: a list/sequence of lists, where each inner list contains item IDs relevant to a user
# - predicted: a list/sequence of lists, where each inner list contains predicted item IDs for a user
# - topk: an integer specifying how many top predictions to consider

torch.manual_seed(0)

# Create sample data
# actual: ground truth items for each user
actual = [
    [1, 2, 5],           # user 0 has items 1, 2, 5
    [3, 4, 7, 8],        # user 1 has items 3, 4, 7, 8
]

# predicted: ranked predictions for each user (should be longer lists to make topk meaningful)
predicted = [
    [1, 6, 2, 9, 10],    # user 0's predictions (1 and 2 are correct)
    [3, 5, 4, 7, 11],    # user 1's predictions (3, 4, 7 are correct)
]

# topk: number of top predictions to consider
topk = 3

ARGS = {
    "actual": actual,
    "predicted": predicted,
    "topk": topk,
}
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
CheckChangeOnCommit Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/PRESUBMIT.py
code served (permissive licence) · get_code("290ce73f2b0467c1")
How it ran

no invocation recorded.

CheckChangeOnUpload Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/PRESUBMIT.py
code served (permissive licence) · get_code("3a45861a4eafa4d4")
How it ran

no invocation recorded.

ConvertToMSBuildSettings Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
code served (permissive licence) · get_code("9a9a0f483cc08e79")
How it ran

no invocation recorded.

ConvertVCMacrosToMSBuild Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
code served (permissive licence) · get_code("b38ac6cb5ce30811")
How it ran

no invocation recorded.

ElectraForSequenceClassification Not yet run
unverified (harvested, no recorded run)
ThilinaRajapakse/simpletransformers/simpletransformers/classification/transformer_models/electra_model.py
code served (permissive licence) · get_code("3cc9d01eacec4925")
How it ran

no invocation recorded.

ElectraQAService Not yet run
unverified (harvested, no recorded run)
okanvk/Turkish-Reading-Comprehension-Question-Answering-Dataset/web/backend/app/services/ElectraService.py
code served (permissive licence) · get_code("f8d14e7b22f1d071")
How it ran

no invocation recorded.

InsertLargePdbShims Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
code served (permissive licence) · get_code("3942a8afb86f96db")
How it ran

no invocation recorded.

MakeGuid Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
code served (permissive licence) · get_code("b9dd04206384eff8")
How it ran

no invocation recorded.

SelectVisualStudioVersion Not yet run
unverified (harvested, no recorded run)
okanvk/ENELPI---Soru-Cevap-Sistemi/web/frontend/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
code served (permissive licence) · get_code("24796fea5f721e97")
How it ran

no invocation recorded.

Also present in other papers' code

Of 40 samples lifted from this paper's linked repositories, 40 carry a function identity and 0 do not. Of the 37 distinct functions with an identity, 12 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 11 later) and 25 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
create_int_feature 13 other papers
6 dated earlier, 7 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.05474 (2019-06)
Transfer Learning in Biomedical Natural Language Processing: An Evaluation of BERT and ELMo on Ten Benchmarking Datasets
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
and 10 more not named here
gumbel_noise
brick of this paper's assembly: helper
10 other papers
10 later · 6 only as an assembly brick
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
2203.07852 (2022-03)
Block-Recurrent Transformers
2211.17192 (2022-11)
Fast Inference from Transformers via Speculative Decoding
and 7 more not named here
log
brick of this paper's assembly: helper
4 other papers
4 later
2006.15020 (2020-06)
Pre-training via Paraphrasing
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
2201.08239 (2022-01)
LaMDA: Language Models for Dialog Applications
and 1 more not named here
get_mask_subset_with_prob
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2002.08909 (2020-02)
REALM: Retrieval-Augmented Language Model Pre-Training
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
2212.00794 (2022-12)
Scaling Language-Image Pre-training via Masking
mask_with_tokens
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2002.08909 (2020-02)
REALM: Retrieval-Augmented Language Model Pre-Training
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
2212.00794 (2022-12)
Scaling Language-Image Pre-training via Masking
prob_mask_like
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2002.08909 (2020-02)
REALM: Retrieval-Augmented Language Model Pre-Training
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
2212.00794 (2022-12)
Scaling Language-Image Pre-training via Masking
get_electra_train_flops 2 other papers
1 dated earlier, 1 later
1906.05474 (2019-06)
Transfer Learning in Biomedical Natural Language Processing: An Evaluation of BERT and ELMo on Ten Benchmarking Datasets
2305.10427 (2023-05)
Accelerating Transformer Inference for Translation via Parallel Decoding
gumbel_sample
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
2023.acl-short.31 (2023 (year only))
PLUE: Language Understanding Evaluation Benchmark for Privacy Policies in English
HiddenLayerExtractor
brick of this paper's assembly: helper
1 other paper
1 later
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
get_exp_id 1 other paper
1 later
2106.02513 (2021-06)
Generative Text Modeling through Short Run Inference
idcg_k
brick of this paper's assembly: helper
1 other paper
1 later
2312.10325 (2023-12)
An Attentive Inductive Bias for Sequential Recommendation beyond the Self-Attention
recall_at_k
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1906.09217 (2019-06)
Hierarchical Gating Networks for Sequential Recommendation

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Masked language modeling (MLM) pre-training methods such as BERT corrupt the input by replacing some tokens with [MASK] and then train a model to reconstruct the original tokens. While they produce good results when transferred to downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a more sample-efficient pre-training task called replaced token detection. Instead of masking the input, our approach corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments demonstrate this new pre-training task is more efficient than MLM because the task is defined over all input tokens rather than just the small subset that was masked out. As a result, the contextual representations learned by our approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale, where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when using the same amount of compute.

For agents

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

get_harvested_code_for_paper("2003.10555")
get_code_for_paper("2003.10555")
have("2003.10555")

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

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

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

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

Connect an agent — have() is free.