SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.10737 · 2024

DPCore: Dynamic Prompt Coreset for Continual Test-Time Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 2 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/2406.10737.json · badge: /api/ran/2406.10737.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
zybeich/DPCore canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
collect_params Ran
ran, honoured the contract we drafted
zybeich/DPCore/imagenet/dpcore.py
code served (permissive licence) · get_code("cbef8046cedb6b50")
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 3, 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)

class ModelWithPrompts(nn.Module):
    def __init__(self):
        super().__init__()
        self.prompts = torch.randn(2, 4)

model = ModelWithPrompts()

ARGS = {
    "model": model
}
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 3, 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_params Ran
ran; our contract draft was wrong, not the code
zybeich/DPCore/imagenet/tent.py
code served (permissive licence) · get_code("63832452f78dcb58")
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

torch.manual_seed(0)

# Create a small model with batch normalization layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 4, kernel_size=3)
        self.bn1 = nn.BatchNorm2d(4)
        self.linear1 = nn.Linear(4, 8)
        self.norm_layer = nn.BatchNorm1d(8)
        self.conv2 = nn.Conv2d(4, 5, kernel_size=3)
        self.bn2 = nn.BatchNorm2d(5)
    
    def forward(self, x):
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
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 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
create_cdc_sequence Ran
ran, honoured the contract we drafted
zybeich/DPCore/imagenet/utils_cdc.py
code served (permissive licence) · get_code("bee09399f981525b")
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 1, dtype family int; 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

np.random.seed(42)

ARGS = {
    'distribution': 'dirichlet',
    'delta': 1.0,
    'num_total_batches': 5000 // 64 + 1
}
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 list, ndim 1, dtype family int — 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
forward_and_adapt Ran
ran; our contract draft was wrong, not the code
zybeich/DPCore/imagenet/tent.py
code served (permissive licence) · get_code("dae52c9027c48afd")
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 simple 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)

# Set up the components
input_dim = 4
output_dim = 3
batch_size = 2

# Create model
model = SimpleModel(input_dim, output_dim)

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

# 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
inject_trainable_vida Ran
ran; our contract draft was wrong, not the code
zybeich/DPCore/imagenet/inject_vida.py
code served (permissive licence) · get_code("108a82af5a25b36a")
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

torch.manual_seed(0)

class Attention(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 4)

class CrossAttention(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 6)
        self.linear2 = nn.Linear(6, 4)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.attention = Attention()
        self.cross_attention = CrossAttention()
        self.other_module = nn.Linear(4, 4)

model = DummyModel()

ARGS = {
    'model': model,
    'target_replace_module': ['CrossAttention', 'Attention'],
    'r': 4,
    'r2': 16,
}
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 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
setup_source Ran
ran; our contract draft was wrong, not the code
zybeich/DPCore/imagenet/imagenetc.py
code served (permissive licence) · get_code("721e565ebd5fda4e")
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 MinimalModel. 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 logging

logger = logging.getLogger(__name__)

# Set seed for reproducibility
torch.manual_seed(0)

# Create a minimal model that can be set to eval mode
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the model
model = MinimalModel()

# Construct the arguments dictionary
ARGS = {
    'model': model
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zybeich/DPCore/imagenet/dpcore.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
update_ema_variables Ran
ran; our contract draft was wrong, not the code
zybeich/DPCore/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.

update_ema_variables Ran
ran; our contract draft was wrong, not the code
zybeich/DPCore/imagenet/vida.py
code served (permissive licence) · get_code("f11bbc6fc4cc3fe7")
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 SimpleModel. 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)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.vida_linear = nn.Linear(3, 2)
        self.linear2 = nn.Linear(2, 1)
    
    def forward(self, x):
        return self.linear2(self.vida_linear(self.linear1(x)))

# Create two model instances - one for EMA model and one for the current model
ema_model = SimpleModel()
model = SimpleModel()

# Initialize EMA model with the same weights as the model
for ema_param, param in zip(ema_model.parameters(), model.parameters()):
    ema_param.data[:] = param.data[:]

# Define the arguments
alpha_teacher = 0.999
alpha_vida = 0.95

ARGS = {
    'ema_model': ema_model,
    'model': model,
    'alpha_teacher': alpha_teacher,
    'alpha_vida': alpha_vida
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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_cifar10 Not yet run
unverified (harvested, no recorded run)
zybeich/DPCore/imagenet/robustbench/data.py
code served (permissive licence) · get_code("2ef65c34f0fa8042")
How it ran

no invocation recorded.

load_cifar100 Not yet run
unverified (harvested, no recorded run)
zybeich/DPCore/imagenet/robustbench/data.py
code served (permissive licence) · get_code("52acd5b81cee97b1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 4 later) and 2 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
update_ema_variables 14 other papers
9 dated earlier, 5 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
5 dated earlier, 2 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
forward_and_adapt 5 other papers
3 dated earlier, 1 later, 1 undated
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
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
and 2 more not named here
setup_source 4 other papers
3 dated earlier, 1 later
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
2405.16486 (2024-05)
Decomposing the Neurons: Activation Sparsity via Mixture of Experts for Continual Test Time Adaptation
and 1 more not named here
load_cifar10 2 other papers
2 dated earlier
2307.03133 (2023-07)
Benchmarking Test-Time Adaptation against Distribution Shifts in Image Classification
2405.16486 (2024-05)
Decomposing the Neurons: Activation Sparsity via Mixture of Experts for Continual Test Time Adaptation
load_cifar100 2 other papers
2 dated earlier
2307.03133 (2023-07)
Benchmarking Test-Time Adaptation against Distribution Shifts in Image Classification
2405.16486 (2024-05)
Decomposing the Neurons: Activation Sparsity via Mixture of Experts for Continual Test Time Adaptation
collect_params 1 other paper
1 dated earlier
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
inject_trainable_vida 1 other paper
1 dated earlier
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation
update_ema_variables 1 other paper
1 dated earlier
2306.04344 (2023-06)
ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation

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

Continual Test-Time Adaptation (CTTA) seeks to adapt source pre-trained models to continually changing, unseen target domains. While existing CTTA methods assume structured domain changes with uniform durations, real-world environments often exhibit dynamic patterns where domains recur with varying frequencies and durations. Current approaches, which adapt the same parameters across different domains, struggle in such dynamic conditions-they face convergence issues with brief domain exposures, risk forgetting previously learned knowledge, or misapplying it to irrelevant domains. To remedy this, we propose DPCore, a method designed for robust performance across diverse domain change patterns while ensuring computational efficiency. DPCore integrates three key components: Visual Prompt Adaptation for efficient domain alignment, a Prompt Coreset for knowledge preservation, and a Dynamic Update mechanism that intelligently adjusts existing prompts for similar domains while creating new ones for substantially different domains. Extensive experiments on four benchmarks demonstrate that DPCore consistently outperforms various CTTA methods, achieving state-of-the-art performance in both structured and dynamic settings while reducing trainable parameters by 99% and computation time by 64% compared to previous approaches.

For agents

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

get_harvested_code_for_paper("2406.10737")
get_code_for_paper("2406.10737")
have("2406.10737")

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

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

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

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

Connect an agent — have() is free.