SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.09553 · 2023

Prompt-based Distribution Alignment for Unsupervised Domain Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 4 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/2312.09553.json · badge: /api/ran/2312.09553.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
baishuanghao/prompt-based-distribution-alignment canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
fixed_patch Ran
ran; our contract draft was wrong, not the code
baishuanghao/prompt-based-distribution-alignment/utils/visual_prompt.py
code served (permissive licence) · get_code("fb8b765f896ca77c")
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 FixedPatchPrompter. 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 Config:
    def __init__(self):
        self.GPU = 0
        self.INPUT = InputConfig()
        self.TRAINER = TrainerConfig()

class InputConfig:
    def __init__(self):
        self.SIZE = [8]

class TrainerConfig:
    def __init__(self):
        self.VPT = VPTConfig()

class VPTConfig:
    def __init__(self):
        self.NUM_TOKENS = 4

cfg = Config()

ARGS = {
    'cfg': cfg
}
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 FixedPatchPrompter — a FixedPatchPrompter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FixedPatchPrompter 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
get_clones Ran
ran; our contract draft was wrong, not the code
baishuanghao/prompt-based-distribution-alignment/utils/clip_part.py
code served (permissive licence) · get_code("0944240e80ec7625")
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 ModuleList. 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 copy
import torch
import torch.nn as nn

torch.manual_seed(0)

# The function get_clones takes a module and clones it N times.
# Looking at the body: it calls copy.deepcopy on the module N times.
# We need to provide:
# 1. module: an nn.Module instance
# 2. N: an integer

# Create a simple neural network module
simple_module = nn.Sequential(
    nn.Linear(4, 8),
    nn.ReLU(),
    nn.Linear(8, 3)
)

# Define N as the number of clones to create
N = 3

ARGS = {
    "module": simple_module,
    "N": N
}
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 ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 2 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
padding Ran
ran; our contract draft was wrong, not the code
baishuanghao/prompt-based-distribution-alignment/utils/visual_prompt.py
code served (permissive licence) · get_code("98c70398b832504f")
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 PadPrompter. 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 Config:
    def __init__(self):
        self.GPU = 0
        self.TRAINER = TrainerConfig()
        self.INPUT = InputConfig()

class TrainerConfig:
    def __init__(self):
        self.VPT = VPTConfig()

class VPTConfig:
    def __init__(self):
        self.NUM_TOKENS = 2

class InputConfig:
    def __init__(self):
        self.SIZE = [8]

cfg = Config()

ARGS = {
    'cfg': cfg
}
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 PadPrompter — a PadPrompter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PadPrompter 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
random_patch Ran
ran; our contract draft was wrong, not the code
baishuanghao/prompt-based-distribution-alignment/utils/visual_prompt.py
code served (permissive licence) · get_code("3f8752aa7aac40b9")
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 RandomPatchPrompter. 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 numpy as np

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.GPU = 0
        self.INPUT = InputConfig()
        self.TRAINER = TrainerConfig()

class InputConfig:
    def __init__(self):
        self.SIZE = [32]

class TrainerConfig:
    def __init__(self):
        self.VPT = VPTConfig()

class VPTConfig:
    def __init__(self):
        self.NUM_TOKENS = 8

cfg = Config()

ARGS = {
    "cfg": cfg
}
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 RandomPatchPrompter — a RandomPatchPrompter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RandomPatchPrompter 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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 4 later) and 0 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
get_clones 40 other papers
20 dated earlier, 2 the same month, 17 later, 1 same year, order not determinable · 8 only as an assembly brick
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2002.07033 (2020-02)
Towards an Appropriate Query, Key, and Value Computation for Knowledge Tracing
2010.12042 (2020-10)
SAINT+: Integrating Temporal Features for EdNet Correctness Prediction
and 37 more not named here
fixed_patch 2 other papers
2 later
aaai_27830 (2024 (year only))
Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation
2404.19286 (2024-04)
Soft Prompt Generation for Domain Generalization
padding 2 other papers
2 later
aaai_27830 (2024 (year only))
Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation
2404.19286 (2024-04)
Soft Prompt Generation for Domain Generalization
random_patch 2 other papers
2 later
aaai_27830 (2024 (year only))
Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation
2404.19286 (2024-04)
Soft Prompt Generation for Domain Generalization

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

Recently, despite the unprecedented success of large pre-trained visual-language models (VLMs) on a wide range of downstream tasks, the real-world unsupervised domain adaptation (UDA) problem is still not well explored. Therefore, in this paper, we first experimentally demonstrate that the unsupervised-trained VLMs can significantly reduce the distribution discrepancy between source and target domains, thereby improving the performance of UDA. However, a major challenge for directly deploying such models on downstream UDA tasks is prompt engineering, which requires aligning the domain knowledge of source and target domains, since the performance of UDA is severely influenced by a good domain-invariant representation. We further propose a Prompt-based Distribution Alignment (PDA) method to incorporate the domain knowledge into prompt learning. Specifically, PDA employs a two-branch prompt-tuning paradigm, namely base branch and alignment branch. The base branch focuses on integrating class-related representation into prompts, ensuring discrimination among different classes. To further minimize domain discrepancy, for the alignment branch, we construct feature banks for both the source and target domains and propose image-guided feature tuning (IFT) to make the input attend to feature banks, which effectively integrates self-enhanced and cross-domain features into the model. In this way, these two branches can be mutually promoted to enhance the adaptation of VLMs for UDA. We conduct extensive experiments on three benchmarks to demonstrate that our proposed PDA achieves state-of-the-art performance. The code is available at https://github.com/BaiShuanghao/Prompt-based-Distribution-Alignment.

For agents

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

get_harvested_code_for_paper("2312.09553")
get_code_for_paper("2312.09553")
have("2312.09553")

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

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

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

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

Connect an agent — have() is free.