SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1610.02242 · 2016

Temporal Ensembling for Semi-Supervised Learning

Timo Aila, Samuli Laine

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-23; 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/1610.02242.json · badge: /api/ran/1610.02242.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
geosada/pi community
Papers with Code archive
1 ran · 2 no recorded run
benathi/fastswa-semi-sup community
Papers with Code archive
1 ran · 0 no recorded run
hiram64/temporal-ensembling-semi-supervised community
Papers with Code archive
1 ran · 0 no recorded run
notha99y/mean_teacher_domain_adapt community
Papers with Code archive
0 ran · 1 no recorded run
tensorfreitas/Temporal-Ensembling-for-Semi-Supervised-Learning community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Layers Ran
ran on a synthesized input · constructed an object; no result was computed
geosada/pi/PI.py
code served (permissive licence) · get_code("419f8b719773c8bb")
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, Layers: 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 tensorflow as tf
import numpy as np

# Initialize TensorFlow session for eager execution or graph mode
tf.compat.v1.disable_eager_execution()

# Create a Layers instance
layers_instance = tf.compat.v1.get_default_graph()

# Since Layers.__init__() takes no parameters, we just need to instantiate it
# The class will be tested by calling its methods

ARGS = {
    # The Layers class __init__ takes no arguments
}

# However, if we need to demonstrate usage of the Layers class methods,
# we can create a simple setup:

def setup_layers_test():
    """Setup for testing Layers methods"""
    layers = Layers()
    
    # Create a TensorFlow session
    with tf.compat.v1.Session() as sess:
        # Initialize variables
        sess.run(tf.compat.v1.global_variables_initializer())
        
        # Test data
        batch_size = 2
        height, width = 8, 8
        in_channels = 3
        out_channels = 16
        
        # Create sample input tensor [batch, height, width, channels]
        x_input = tf.constant(np.random.randn(batch_size, height, width, in_channels).astype(np.float32))
        
        # Test conv2d
        conv_output = layers.conv2d('conv1', x_input, out_channels, filter_size=(3, 3), activation=layers.lrelu)
        
        # Test dense layer with 2D input
        x_2d = tf.constant(np.random.randn(batch_size, 10).astype(np.float32))
        dense_output = layers.dense('dense1', x_2d, 5, activation=layers.lrelu)
        
        # Test softmax
        softmax_output = layers.softmax('softmax1', dense_output, 5)
        
        # Test noise/sampler
        mu = tf.constant(np.random.randn(batch_size, 4).astype(np.float32))
        sigma = tf.constant(np.ones((batch_size, 4), dtype=np.float32) * 0.1)
        sampled = layers.sampler(mu, sigma)
        
        # Run operations
        results = sess.run([conv_output, dense_output, softmax_output, sampled])

# Define ARGS - Layers class has no __init__ parameters
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Layers — 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 Layers 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
WeightEMA Ran
ran on a synthesized input · constructed an object; no result was computed
benathi/fastswa-semi-sup/mean_teacher/optim_weight_ema.py
pointer only (licence: NONE) · get_code("aa7ea344f0434be4")
How it ran

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

update_unsupervised_target Ran
ran; our contract draft was wrong, not the code
hiram64/temporal-ensembling-semi-supervised/lib/ops.py
code served (permissive licence) · get_code("400d36e0fcd2632d")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - ensemble_prediction: tensor, used in arithmetic operations
# - y: tensor, indexed and assigned to (y[:, 0:num_class] = ...)
# - num_class: int, used for slicing
# - alpha: float, used in arithmetic
# - cur_pred: tensor, used in arithmetic with ensemble_prediction
# - epoch: int, used in arithmetic

# Create small tensors
batch_size = 2
num_class = 4
feature_dim = 5

# ensemble_prediction: shape (batch_size, num_class) - predictions from ensemble
ensemble_prediction = torch.randn(batch_size, num_class)

# y: shape (batch_size, num_class + extra_cols) - labels/targets with extra columns
# Need at least num_class columns for the slice y[:, 0:num_class]
y = torch.randn(batch_size, num_class + 1)

# cur_pred: shape (batch_size, num_class) - current epoch predictions
cur_pred = torch.randn(batch_size, num_class)

# alpha: float between 0 and 1, typical for exponential moving average
alpha = 0.9

# epoch: int, epoch number
epoch = 5

ARGS = {
    "ensemble_prediction": ensemble_prediction,
    "y": y,
    "num_class": num_class,
    "alpha": alpha,
    "cur_pred": cur_pred,
    "epoch": epoch,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
LossFunctions Not yet run
unverified (harvested, no recorded run)
geosada/pi/PI.py
code served (permissive licence) · get_code("b148a31fddf9565e")
How it ran

no invocation recorded.

PI Not yet run
unverified (harvested, no recorded run)
geosada/pi/PI.py
code served (permissive licence) · get_code("6578002d5d292065")
How it ran

no invocation recorded.

ema Not yet run
unverified (harvested, no recorded run)
notha99y/mean_teacher_domain_adapt/src/model.py
code served (permissive licence) · get_code("88874fb38feaf13a")
How it ran

no invocation recorded.

temporal_ensembling_loss Not yet run
unverified (harvested, no recorded run)
tensorfreitas/Temporal-Ensembling-for-Semi-Supervised-Learning/pi_model.py
pointer only (licence: NONE) · get_code("2fa6b82b8cbfe7b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tensorfreitas/Temporal-Ensembling-for-Semi-Supervised-Learning 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 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

In this paper, we present a simple and efficient method for training deep neural networks in a semi-supervised setting where only a small portion of training data is labeled. We introduce self-ensembling, where we form a consensus prediction of the unknown labels using the outputs of the network-in-training on different epochs, and most importantly, under different regularization and input augmentation conditions. This ensemble prediction can be expected to be a better predictor for the unknown labels than the output of the network at the most recent training epoch, and can thus be used as a target for training. Using our method, we set new records for two standard semi-supervised learning benchmarks, reducing the (non-augmented) classification error rate from 18.44% to 7.05% in SVHN with 500 labels and from 18.63% to 16.55% in CIFAR-10 with 4000 labels, and further to 5.12% and 12.16% by enabling the standard augmentations. We additionally obtain a clear improvement in CIFAR-100 classification accuracy by using random images from the Tiny Images dataset as unlabeled extra inputs during training. Finally, we demonstrate good tolerance to incorrect labels.

For agents

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

get_harvested_code_for_paper("1610.02242")
get_code_for_paper("1610.02242")
have("1610.02242")

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

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

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

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

Connect an agent — have() is free.