SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.10726 · ICLR · 2021

TENT: FULLY TEST-TIME ADAPTATION BY ENTROPY MINIMIZATION

Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, Trevor Darrell

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 6 failures of our instrument; 1 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-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/2006.10726.json · badge: /api/ran/2006.10726.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
DequanWang/tent canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
mr-eggplant/eata community
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DequanWang/tent/tent.py
code served (permissive licence) · get_code("5f3e7b3e8f7ad589")
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 1, dtype family float, shape (2,) 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-05T00:02:57Z). 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)

# The function takes a single parameter: x (torch.Tensor)
# It expects logits that can be passed through softmax and log_softmax
# Shape should be (batch_size, num_classes) based on the .sum(1) operation

x = torch.randn(2, 4)  # batch_size=2, num_classes=4

ARGS = {
    "x": x
}
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 float, 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
Tent Ran
ran on a synthesized input · constructed an object; no result was computed
DequanWang/tent/tent.py
code served (permissive licence) · get_code("9b0b70ed44f66088")
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, Tent: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model that takes input and produces logits
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)  # Input dim 4, output dim (num classes) 3
    
    def forward(self, x):
        return self.fc(x)

# Instantiate the model
model = SimpleModel()

# Create an optimizer for the model
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Define ARGS dictionary with all parameters for Tent.__init__
ARGS = {
    'model': model,
    'optimizer': optimizer,
    'steps': 1,
    'episodic': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tent — 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 Tent 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
Tent Ran
ran on a synthesized input · constructed an object; no result was computed
mr-eggplant/eata/tent.py
pointer only (licence: NOASSERTION) · get_code("b927793a8ed0ea9a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mr-eggplant/eata (NOASSERTION). 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.

collect_params Ran
ran; our contract draft was wrong, not the code
DequanWang/tent/tent.py
code served (permissive licence) · get_code("ddcda7ec86db3b8c")
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 torch.nn as nn
from copy import deepcopy

torch.manual_seed(0)

# Build a minimal model with BatchNorm2d layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3)
        self.bn1 = nn.BatchNorm2d(16)
        self.conv2 = nn.Conv2d(16, 32, kernel_size=3)
        self.bn2 = nn.BatchNorm2d(32)
        self.linear = nn.Linear(32, 10)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.conv2(x)
        x = self.bn2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
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 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
forward_and_adapt Ran
ran; our contract draft was wrong, not the code
DequanWang/tent/tent.py
code served (permissive licence) · get_code("2471575c724b32c5")
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, 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
import torch.nn as nn
from torch.optim import SGD

torch.manual_seed(0)

# Create a minimal model that takes input and produces logits
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the model
model = SimpleModel(input_dim=4, output_dim=3)

# Create a small batch of input data (batch_size=2, features=4)
x = torch.randn(2, 4, requires_grad=True)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.01)

ARGS = {
    "x": x,
    "model": model,
    "optimizer": optimizer,
}
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, 3) — shape (2, 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
forward_and_adapt Ran
ran; our contract draft was wrong, not the code
DequanWang/tent/tent.py
code served (permissive licence) · get_code("1d10e9bc70ce18a5")
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, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal model that takes input and produces logits
class SimpleModel(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Create input tensor: batch_size=2, input_dim=4
x = torch.randn(2, 4)

# Create model: input_dim=4, output_dim=3 (for softmax entropy)
model = SimpleModel(input_dim=4, output_dim=3)

# Create optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

ARGS = {
    "x": x,
    "model": model,
    "optimizer": optimizer
}
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, 3) — shape (2, 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
forward_and_adapt Ran
ran; our contract draft was wrong, not the code
mr-eggplant/eata/tent.py
pointer only (licence: NOASSERTION) · get_code("5afe3f9d26c1b278")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mr-eggplant/eata (NOASSERTION). 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.

softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mr-eggplant/eata/tent.py
pointer only (licence: NOASSERTION) · get_code("be510b4c74ce8440")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mr-eggplant/eata (NOASSERTION). 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.

load_model_and_optimizer Not yet run
unverified (harvested, no recorded run)
DequanWang/tent/tent.py
code served (permissive licence) · get_code("5014c3a1f79a6661")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 1 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
softmax_entropy 22 other papers
21 later, 1 undated · 4 only as an assembly brick
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2110.14038 (2021-10)
Robustness of Graph Neural Networks at Scale
2302.12400 (2023-02)
Towards Stable Test-Time Adaptation in Dynamic Wild World
and 19 more not named here
load_model_and_optimizer
brick of this paper's assembly: helper
9 other papers
9 later · 8 only as an assembly brick
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2203.13591 (2022-03)
Continual Test-Time Domain Adaptation
2302.12400 (2023-02)
Towards Stable Test-Time Adaptation in Dynamic Wild World
and 6 more not named here
softmax_entropy
brick of this paper's assembly: loss
8 other papers
7 later, 1 undated
2204.02610 (2022-04)
Efficient Test-Time Model Adaptation without Forgetting
2311.14402 (2023-11)
TEA: Test-time Energy Adaptation
2404.01650 (2024-04)
Test-Time Model Adaptation with Only Forward Passes
and 5 more not named here
forward_and_adapt
brick of this paper's assembly: update_rule
5 other papers
4 later, 1 undated
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
2406.10737 (2024-06)
DPCore: Dynamic Prompt Coreset for Continual Test-Time Adaptation
and 2 more not named here
collect_params 2 other papers
2 later
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2405.05012 (2024-05)
The Entropy Enigma: Success and Failure of Entropy Minimization
Tent 1 other paper
1 later
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks

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

A model must adapt itself to generalize to new and different data during testing. In this setting of fully test-time adaptation the model has only the test data and its own parameters. We propose to adapt by test entropy minimization (tent 1 ): we optimize the model for confidence as measured by the entropy of its predictions. Our method estimates normalization statistics and optimizes channel-wise affine transformations to update online on each batch. Tent reduces generalization error for image classification on corrupted ImageNet and CIFAR-10/100 and reaches a new state-of-the-art error on ImageNet-C. Tent handles source-free domain adaptation on digit recognition from SVHN to MNIST/MNIST-M/USPS, on semantic segmentation from GTA to Cityscapes, and on the VisDA-C benchmark. These results are achieved in one epoch of test-time optimization without altering training.

For agents

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

get_harvested_code_for_paper("2006.10726")
get_code_for_paper("2006.10726")
have("2006.10726")

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

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

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

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

Connect an agent — have() is free.