SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.06065 · CVPR · 2024

Unified Entropy Optimization for Open-Set Test-Time Adaptation

Xu-Yao Zhang, Cheng-Lin Liu, Zhengqing Gao

arXiv · PDF · Open in the Atlas

Code that ran

15 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 15 failures of our instrument; 0 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/2404.06065.json · badge: /api/ran/2404.06065.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
gaozhengqing/UniEnt canonical (classifier label)
classifier basis: census
15 ran · 0 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaozhengqing/UniEnt/imagenet/utils.py
code served (permissive licence) · get_code("ab52115ec2a59e51")
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 list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects:
# - output: a tensor with shape (batch_size, num_classes) containing logits/scores
# - target: a tensor with shape (batch_size,) containing class indices
# - topk: a tuple of integers specifying which top-k accuracies to compute

# Create small tensors for testing
batch_size = 2
num_classes = 4

# output tensor: (batch_size, num_classes) - logits for classification
output = torch.randn(batch_size, num_classes)

# target tensor: (batch_size,) - ground truth class indices (0 to num_classes-1)
target = torch.tensor([0, 2], dtype=torch.long)

# topk tuple - which top-k values to compute accuracy for
topk = (1, 2)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk
}
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 list, ndim 2, dtype family float — a list 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
collect_stats Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/imagenet/norm.py
pointer only (licence: MIT); the stored copy get_code serves, from royzry98/moase-pytorch, is pointer only (licence: NONE) · get_code("c5f915703f30ab89")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from royzry98/moase-pytorch, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

configure_model Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/imagenet/norm.py
pointer only (licence: MIT); the stored copy get_code serves, from royzry98/moase-pytorch, is pointer only (licence: NONE) · get_code("8f537ee8d4a9b397")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from royzry98/moase-pytorch, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

forward_and_adapt Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/imagenet/ostta.py
code served (permissive licence) · get_code("0b2d02a3e572ebdb")
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 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.optim as optim
from copy import deepcopy

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.feature_extractor = nn.Linear(input_dim, 8)
        self.head = nn.Linear(8, num_classes)
        self.model = self  # Self-reference for nested access
    
    def forward(self, x):
        features = self.feature_extractor(x)
        return self.head(features)

class MinimalModel0(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.feature_extractor = nn.Linear(input_dim, 8)
        self.head = nn.Linear(8, num_classes)
        self.model = self  # Self-reference for nested access
    
    def forward(self, x):
        features = self.feature_extractor(x)
        return self.head(features)

# Create instances
model0 = MinimalModel0(input_dim=4, num_classes=3)
model = MinimalModel(input_dim=4, num_classes=3)

# Create sample input batch (batch_size=2, input_dim=4)
x = torch.randn(2, 4)

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

# Alpha parameter - list with 2 elements for weighting
alpha = [0.1, 0.5]

# Criterion parameter - can be 'ent', 'ent_ind', 'ent_unf', or others
criterion = 'ent'

ARGS = {
    'x': x,
    'model0': model0,
    'model': model,
    'optimizer': optimizer,
    'alpha': alpha,
    'criterion': criterion
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn, 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 — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
gaozhengqing/UniEnt/imagenet/tent.py
code served (permissive licence) · get_code("e792fe789fb94df3")
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 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Build a minimal model that matches what forward_and_adapt expects
class MinimalModel(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.feature_extractor = nn.Linear(input_dim, 8)
        self.head = nn.Linear(8, num_classes)
        self.model = self  # self-reference for model.model.head access
    
    def forward(self, x):
        x = self.feature_extractor(x)
        x = self.head(x)
        return x

# Create models
model0 = MinimalModel(input_dim=4, num_classes=3)
model = MinimalModel(input_dim=4, num_classes=3)

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

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

# Alpha parameter - tuple of two floats for weighting
alpha = (0.1, 0.5)

# Criterion - one of 'ent', 'ent_ind', 'ent_unf'
criterion = 'ent_ind'

# Package arguments
ARGS = {
    'x': x,
    'model0': model0,
    'model': model,
    'optimizer': optimizer,
    'alpha': alpha,
    'criterion': criterion
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn, 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 — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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_eata Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/imagenet/eata.py
code served (permissive licence) · get_code("513dc262cb3f7002")
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 torch
import torch.nn as nn
import torch.nn.functional as F
from torch.optim import SGD

torch.manual_seed(0)

# Build a minimal model that matches the function's usage
class MinimalModel(nn.Module):
    def __init__(self, num_classes=3):
        super().__init__()
        self.model = nn.Sequential(
            nn.Linear(4, 8),
            nn.ReLU()
        )
        self.head = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = self.model(x)
        x = self.head(x)
        return x

# Create model instances
model0 = MinimalModel(num_classes=3)
model = MinimalModel(num_classes=3)
model.train()

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

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

# Create fishers dict (used in the function signature but not in the provided body)
fishers = {}

# Create initial model probs (None or a probability vector)
current_model_probs = None

# Parameters from function signature
e_margin = 0.4
fisher_alpha = 50.0
d_margin = 0.05
scale_factor = 2
num_samples_update = 0
alpha = [0.5, 0.5]
criterion = 'ent'

ARGS = {
    'x': x,
    'model0': model0,
    'model': model,
    'optimizer': optimizer,
    'fishers': fishers,
    'e_margin': e_margin,
    'current_model_probs': current_model_probs,
    'fisher_alpha': fisher_alpha,
    'd_margin': d_margin,
    'scale_factor': scale_factor,
    'num_samples_update': num_samples_update,
    'alpha': alpha,
    'criterion': criterion
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn, 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_eata Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/tiny_imagenet/eata.py
code served (permissive licence) · get_code("2495003ded423e33")
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 torch
import torch.nn as nn
import torch.nn.functional as F
from sklearn.mixture import GaussianMixture

torch.manual_seed(0)

# Build a minimal model that has the structure used in the function
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)  # 4 input features, 3 classes
        self.model = nn.Sequential(nn.Linear(4, 4))
    
    def forward(self, x):
        return self.fc(x)

class SimpleModelWithFeatures(nn.Module):
    def __init__(self):
        super().__init__()
        self.model = nn.ModuleDict({
            'fc': nn.Linear(4, 3)
        })
        self.features = nn.Linear(4, 4)
    
    def forward(self, x):
        features = self.features(x)
        return self.model['fc'](features)

# Create tiny tensors
x = torch.randn(2, 4)  # batch size 2, 4 features

# Create models
model0 = SimpleModel()
model = SimpleModel()

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

# Create fishers dict (used in the function signature but may not be used in provided code)
fishers = {}

# Create small probability vector
current_model_probs = torch.softmax(torch.randn(3), dim=0)

# Define ARGS dict with all parameters
ARGS = {
    'x': x,
    'model0': model0,
    'model': model,
    'optimizer': optimizer,
    'fishers': fishers,
    'e_margin': 0.5,
    'current_model_probs': current_model_probs,
    'fisher_alpha': 50.0,
    'd_margin': 0.05,
    'scale_factor': 2,
    'num_samples_update': 0,
    'alpha': [0.5, 0.3],
    'criterion': 'ent'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sklearn, 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
get_logger Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/imagenet/utils.py
code served (permissive licence) · get_code("211f0b5c566ca621")
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 Logger. 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 logging
import os
import sys
import tempfile
from termcolor import colored

# Create a temporary directory for logging
temp_dir = tempfile.mkdtemp()

ARGS = {
    "name": "test_logger",
    "save_dir": temp_dir,
    "log_dest": "test.log"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
termcolor — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
load_imagenet_o_64x64 Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/tiny_imagenet/data.py
code served (permissive licence) · get_code("dffb43525c87e005")
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 torch
import torch.utils.data as data
import torchvision.transforms as transforms
from torchvision.datasets import DatasetFolder
from PIL import Image
import os
import tempfile
import numpy as np

torch.manual_seed(0)

# Create a temporary directory structure for ImageFolder
temp_dir = tempfile.mkdtemp()
imagenet_o_dir = os.path.join(temp_dir, 'imagenet-o')
os.makedirs(imagenet_o_dir, exist_ok=True)

# Create a few dummy class directories with dummy images
class_dir = os.path.join(imagenet_o_dir, 'class_0')
os.makedirs(class_dir, exist_ok=True)

# Create dummy images as PIL Images and save them
for i in range(5):
    img_array = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
    img = Image.fromarray(img_array)
    img.save(os.path.join(class_dir, f'img_{i}.jpg'))

# Define the transforms
test_transforms = transforms.Compose([
    transforms.Resize((64, 64)),
    transforms.ToTensor()
])

ARGS = {
    'n_examples': 5,
    'data_dir': temp_dir,
    'transforms_test': test_transforms
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — 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
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaozhengqing/UniEnt/imagenet/ostta.py
pointer only (licence: MIT); the stored copy get_code serves, from Feliciaxyao/ICML2024-FSTTA, is pointer only (licence: NONE) · get_code("3078648c75e3e1e3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Feliciaxyao/ICML2024-FSTTA, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaozhengqing/UniEnt/tiny_imagenet/cotta.py
code served (permissive licence) · get_code("e589e47d748af885")
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 float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create two small logit tensors
# The function calls:
# - x.log_softmax(1)
# - x_ema.softmax(1)
# - sum(1) on the product
# So we need 2D tensors (batch_size, num_classes)

x = torch.randn(2, 4)
x_ema = torch.randn(2, 4)

ARGS = {
    "x": x,
    "x_ema": x_ema,
}
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 float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaozhengqing/UniEnt/imagenet/eata.py
code served (permissive licence) · get_code("7b9d88d29b50aca6")
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 float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

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

ARGS = {
    "x": x
}
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 float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaozhengqing/UniEnt/imagenet/cotta.py
code served (permissive licence) · get_code("b8ea8e2ae9be86a9")
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 float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects two tensors that support:
# - .softmax(1) method
# - .log_softmax(1) method
# - Element-wise multiplication
# - .sum(1) method
# These are standard PyTorch tensor operations

x = torch.randn(2, 4)
x_ema = torch.randn(2, 4)

ARGS = {
    "x": x,
    "x_ema": x_ema,
}
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 float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
softmax_mean_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gaozhengqing/UniEnt/imagenet/eata.py
code served (permissive licence) · get_code("9bd7038815c1f6f9")
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 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a tensor x and computes softmax along dimension 1,
# then takes mean along dimension 0, and finally computes entropy.
# x needs to be 2D: (batch_size, num_classes)
# Let's use batch_size=2 and num_classes=4

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
update_ema_variables Ran
ran; our contract draft was wrong, not the code
gaozhengqing/UniEnt/imagenet/cotta.py
pointer only (licence: MIT); the stored copy get_code serves, from joe817/gcal, is pointer only (licence: NONE) · get_code("a77d556c0aea19c1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from joe817/gcal, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 3 the same month, 7 later) and 5 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
accuracy 116 other papers
99 dated earlier, 1 the same month, 15 later, 1 same year, order not determinable · 8 only as an assembly brick
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1610.05820 (2016-10)
Membership Inference Attacks Against Machine Learning Models
1905.03696 (2019-05)
HAWQ: Hessian AWare Quantization of Neural Networks with Mixed-Precision
and 113 more not named here
softmax_entropy 22 other papers
12 dated earlier, 9 later, 1 undated · 4 only as an assembly brick
2006.10726 (2020-06)
TENT: FULLY TEST-TIME ADAPTATION BY ENTROPY MINIMIZATION
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2110.14038 (2021-10)
Robustness of Graph Neural Networks at Scale
and 19 more not named here
update_ema_variables 14 other papers
6 dated earlier, 1 the same month, 7 later · 2 only as an assembly brick
2203.13591 (2022-03)
Continual Test-Time Domain Adaptation
2212.09713 (2022-12)
A Probabilistic Framework for Lifelong Test-Time Adaptation
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
and 11 more not named here
softmax_entropy 8 other papers
4 dated earlier, 4 later · 2 only as an assembly brick
2303.13899 (2023-03)
Robust Test-Time Adaptation in Dynamic Scenarios
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
2309.14949 (2023-09)
Towards Real-World Test-Time Adaptation: Tri-Net Self-Training with Balanced Normalization
and 5 more not named here
softmax_entropy 8 other papers
3 dated earlier, 1 the same month, 3 later, 1 undated
2006.10726 (2020-06)
TENT: FULLY TEST-TIME ADAPTATION BY ENTROPY MINIMIZATION
2204.02610 (2022-04)
Efficient Test-Time Model Adaptation without Forgetting
2311.14402 (2023-11)
TEA: Test-time Energy Adaptation
and 5 more not named here
collect_stats 3 other papers
2 dated earlier, 1 later
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2311.14402 (2023-11)
TEA: Test-time Energy Adaptation
2405.16486 (2024-05)
Decomposing the Neurons: Activation Sparsity via Mixture of Experts for Continual Test Time Adaptation
configure_model 3 other papers
2 dated earlier, 1 later
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2311.14402 (2023-11)
TEA: Test-time Energy Adaptation
2405.16486 (2024-05)
Decomposing the Neurons: Activation Sparsity via Mixture of Experts for Continual Test Time Adaptation
softmax_entropy 2 other papers
2 dated earlier
2203.13591 (2022-03)
Continual Test-Time Domain Adaptation
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
forward_and_adapt 1 other paper
1 dated earlier
2308.06879 (2023-08)
Towards Open-Set Test-Time Adaptation Utilizing the Wisdom of Crowds in Entropy Minimization
softmax_mean_entropy 1 other paper
1 dated earlier
2308.06879 (2023-08)
Towards Open-Set Test-Time Adaptation Utilizing the Wisdom of Crowds in Entropy Minimization

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

Test-time adaptation (TTA) aims at adapting a model pre-trained on the labeled source domain to the unlabeled target domain. Existing methods usually focus on improving TTA performance under covariate shifts, while neglecting semantic shifts. In this paper, we delve into a realistic open-set TTA setting where the target domain may contain samples from unknown classes. Many state-ofthe-art closed-set TTA methods perform poorly when applied to open-set scenarios, which can be attributed to the inaccurate estimation of data distribution and model confidence. To address these issues, we propose a simple but effective framework called unified entropy optimization (UniEnt), which is capable of simultaneously adapting to covariate-shifted in-distribution (csID) data and detecting covariate-shifted out-of-distribution (csOOD) data. Specifically, UniEnt first mines pseudo-csID and pseudo-csOOD samples from test data, followed by entropy minimization on the pseudo-csID data and entropy maximization on the pseudo-csOOD data. Furthermore, we introduce UniEnt+ to alleviate the noise caused by hard data partition leveraging sample-level confidence. Extensive experiments on CIFAR benchmarks and Tiny-ImageNet-C show the superiority of our framework. The code is available at https://github.com/gaozhengqing/UniEnt.

For agents

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

get_harvested_code_for_paper("2404.06065")
get_code_for_paper("2404.06065")
have("2404.06065")

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

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

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

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

Connect an agent — have() is free.