SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.02616 · ICLR · 2025

Smoothing the Shift: Towards Stable Test-Time Adaptation under Complex Multimodal Noises

Tao Jin, Zirun Guo

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 0 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-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/2503.02616.json · badge: /api/ran/2503.02616.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
zrguo/sumi canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
FunctionStatusWhere it lives
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zrguo/sumi/src/sumi.py
code served (permissive licence) · get_code("311413feee2ab1dd")
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-04T23:09:38Z). 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, 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 softmax_entropy takes a single parameter: x (a torch.Tensor)
# It expects x to be a 2D tensor (logits) with shape (batch_size, num_classes)
# The function applies softmax and log_softmax along dimension 1, then computes entropy

# Create a small tensor with batch size 2 and 4 logit dimensions
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
SuMi Ran
ran on a synthesized input · constructed an object; no result was computed
zrguo/sumi/src/sumi.py
code served (permissive licence) · get_code("bc4ab37a43ed0040")
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, SuMi: 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 math

torch.manual_seed(0)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear_audio = nn.Linear(4, 8)
        self.linear_video = nn.Linear(4, 8)
        self.linear_out = nn.Linear(8, 5)
    
    def forward_eval(self, a, v, mode='multimodal'):
        if mode == 'audioonly':
            feat = self.linear_audio(a)
            logits = self.linear_out(feat)
            return logits, feat
        elif mode == 'videoonly':
            feat = self.linear_video(v)
            logits = self.linear_out(feat)
            return logits, feat
        elif mode == 'multimodal':
            a_feat = self.linear_audio(a)
            v_feat = self.linear_video(v)
            combined = a_feat + v_feat
            logits = self.linear_out(combined)
            return logits, combined
        else:
            combined = self.linear_audio(a) + self.linear_video(v)
            logits = self.linear_out(combined)
            return logits, combined

class WrappedModel(nn.Module):
    def __init__(self, model):
        super().__init__()
        self.module = model
    
    def forward(self, x):
        return x

class DummyArgs:
    def __init__(self):
        self.testmode = 'multimodal'

model = WrappedModel(DummyModel())
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
device = 'cpu'
args = DummyArgs()

ARGS = {
    'model': model,
    'optimizer': optimizer,
    'device': device,
    'args': args,
    'steps': 1,
    'episodic': False,
    'uent_thresh': math.e / 10,
    'ment_thresh': math.log(1000) / 2 - 1,
    'umu': 1.0,
    'lamda': 5.0,
    'e_margin': math.log(1000) / 2 - 1,
}
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 SuMi — 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 SuMi 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
collect_params Ran
ran; our contract draft was wrong, not the code
zrguo/sumi/src/sumi.py
code served (permissive licence) · get_code("394afed8d9dc0d49")
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. 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

torch.manual_seed(0)

# Build a minimal model with LayerNorm modules
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.LayerNorm(4)
        self.layer2 = nn.LayerNorm(3)
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.linear(x)
        x = self.layer2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
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
forward_and_adapt Ran
ran; our contract draft was wrong, not the code
zrguo/sumi/src/sumi.py
code served (permissive licence) · get_code("18f265b0e1d1f02f")
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. 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 torch.nn.functional as F
from torch.cuda.amp import GradScaler
import numpy as np

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MinimalAudioVideoModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 5)  # 5 output classes
        
    def forward_eval(self, a, v, mode='multimodal'):
        # a: audio input, v: video input
        # Returns (logits, features)
        batch_size = a.shape[0]
        
        if mode == 'audioonly':
            # Process audio only
            feat = torch.randn(batch_size, 3, 8)  # (batch, time_steps, feat_dim)
            logits = self.linear(torch.randn(batch_size, 4))
            return logits, feat
        elif mode == 'videoonly':
            # Process video only
            feat = torch.randn(batch_size, 3, 8)  # (batch, time_steps, feat_dim)
            logits = self.linear(torch.randn(batch_size, 4))
            return logits, feat
        else:  # multimodal
            feat = torch.randn(batch_size, 3, 8)
            logits = self.linear(torch.randn(batch_size, 4))
            return logits, feat

class ModelWrapper(nn.Module):
    def __init__(self):
        super().__init__()
        self.module = MinimalAudioVideoModel()

class ArgsConfig:
    def __init__(self):
        self.testmode = 'multimodal'

# Create model and wrap it
model = ModelWrapper()

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

# Create GradScaler for mixed precision
scaler = GradScaler()

# Create args config
args = ArgsConfig()

# Create input data: (audio, video)
# audio shape: (batch_size, audio_features)
# video shape: (batch_size, video_features)
audio_input = torch.randn(2, 4)
video_input = torch.randn(2, 4)
x = [audio_input, video_input]

# Hyperparameters
uent_thresh = 0.5
ment_thresh = 1.5
mu = 0.5
lamda = 0.1
t = 0.3  # current iteration progress
iters = 10  # total iterations
e_margin = 0.4

ARGS = {
    'x': x,
    'model': model,
    'optimizer': optimizer,
    'args': args,
    'scaler': scaler,
    'uent_thresh': uent_thresh,
    'ment_thresh': ment_thresh,
    'mu': mu,
    'lamda': lamda,
    't': t,
    'iters': iters,
    'e_margin': e_margin,
}
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
forward_and_adapt Ran
ran; our contract draft was wrong, not the code
zrguo/sumi/src/sumi.py
code served (permissive licence) · get_code("7f787eed2caa543c")
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. 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

torch.manual_seed(0)

class StandInModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.module = self
        self.linear_audio = nn.Linear(4, 5)
        self.linear_video = nn.Linear(4, 5)
        self.linear_multimodal = nn.Linear(8, 5)
    
    def forward_eval(self, a, v, mode='multimodal'):
        """
        Args:
            a: audio tensor (batch, 4)
            v: video tensor (batch, 4)
            mode: 'audioonly', 'videoonly', or 'multimodal'
        
        Returns:
            output: logits (batch, 5)
            feat: features (batch, seq_len, feat_dim)
        """
        batch_size = a.shape[0]
        
        if mode == 'audioonly':
            output = self.linear_audio(a)
            feat = a.unsqueeze(1).expand(batch_size, 3, 4)
        elif mode == 'videoonly':
            output = self.linear_video(v)
            feat = v.unsqueeze(1).expand(batch_size, 3, 4)
        else:  # multimodal
            combined = torch.cat([a, v], dim=1)
            output = self.linear_multimodal(combined)
            feat = combined.unsqueeze(1).expand(batch_size, 3, 8)
        
        return output, feat

class StandInArgs:
    def __init__(self):
        self.testmode = 'multimodal'

# Create setup
torch.manual_seed(0)

model = StandInModel()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
scaler = torch.cuda.amp.GradScaler() if torch.cuda.is_available() else torch.amp.GradScaler('cpu')

# Create input tensors
audio_input = torch.randn(2, 4)
video_input = torch.randn(2, 4)
x = (audio_input, video_input)

args = StandInArgs()

ARGS = {
    'x': x,
    'model': model,
    'optimizer': optimizer,
    'args': args,
    'scaler': scaler,
    'uent_thresh': 0.5,
    'ment_thresh': 1.0,
    'mu': 0.5,
    'lamda': 0.1,
    't': 2,
    'iters': 10,
    'e_margin': 0.3,
}
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 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
brick of this paper's assembly: metric
22 other papers
18 dated earlier, 3 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

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 to tackle distribution shifts using unlabeled test data without access to the source data. In the context of multimodal data, there are more complex noise patterns than unimodal data such as simultaneous corruptions for multiple modalities and missing modalities. Besides, in real-world applications, corruptions from different distribution shifts are always mixed. Existing TTA methods always fail in such multimodal scenario because the abrupt distribution shifts will destroy the prior knowledge from the source model, thus leading to performance degradation. To this end, we reveal a new challenge named multimodal wild TTA. To address this challenging problem, we propose two novel strategies: sample identification with interquartile range Smoothing and unimodal assistance, and Mutual information sharing (SuMi). SuMi smooths the adaptation process by interquartile range which avoids the abrupt distribution shifts. Then, SuMi fully utilizes the unimodal features to select low-entropy samples with rich multimodal information for optimization. Furthermore, mutual information sharing is introduced to align the information, reduce the discrepancies and enhance the information utilization across different modalities. Extensive experiments on two public datasets show the effectiveness and superiority over existing methods under the complex noise patterns in multimodal data. Code is available at https://github.com/zrguo/SuMi.

For agents

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

get_harvested_code_for_paper("2503.02616")
get_code_for_paper("2503.02616")
have("2503.02616")

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

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

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

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

Connect an agent — have() is free.