SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_19970 · AAAI · 2022

SECRET: Self-Consistent Pseudo Label Refinement for Unsupervised Domain Adaptive Person Re-identification

Guiguang Ding, Tao He, Yuchen Guo, Zhenhua Guo, Leqi Shen

Code that ran

8 of 16 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 3 have no contract verdict; 5 failures of our instrument; 8 no recorded run), measured 2026-11-22; 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/aaai_19970.json · badge: /api/ran/aaai_19970.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
LunarShen/SECRET canonical (classifier label)
classifier basis: census
8 ran · 8 no recorded run
FunctionStatusWhere it lives
RefineClusterProcess Ran
ran on a synthesized input
LunarShen/SECRET/secret/cluster/RefineCluster.py
code served (permissive licence) · get_code("0358a80462bd66d6")
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 ndarray, ndim 1, dtype family int, shape (8,) 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 numpy as np

# Analyze the function:
# - Reference_Cluster_result: numpy array of cluster assignments (int), may contain -1
# - Target_Cluster_result: numpy array of cluster assignments (int), may contain -1
# - divide_ratio: float, used in division (1 / divide_ratio) and comparison (num_Part[_max] > num_ID * divide_ratio)

# Create small example data
np.random.seed(0)

# Reference_Cluster_result: array of reference cluster assignments with some -1 values
# Length should match Target_Cluster_result
# Let's make it with clusters 0, 1, 2 and some -1 (noise points)
Reference_Cluster_result = np.array([0, 0, 1, 1, 2, 2, -1, -1], dtype=np.int64)

# Target_Cluster_result: array of target cluster assignments
# Same length, with clusters and possibly -1
Target_Cluster_result = np.array([0, 0, 0, 1, 1, 1, 2, -1], dtype=np.int64)

# divide_ratio: a float between 0 and 1
# Used as: int(1 / divide_ratio) - so if divide_ratio=0.5, this gives 2
# Also used as: num_Part[_max] > num_ID * divide_ratio
divide_ratio = 0.5

ARGS = {
    "Reference_Cluster_result": Reference_Cluster_result,
    "Target_Cluster_result": Target_Cluster_result,
    "divide_ratio": divide_ratio,
}
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 ndarray, ndim 1, dtype family int, shape (8,) — shape (8,) 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
LunarShen/SECRET/secret/models/resnet.py
code served (permissive licence) · get_code("158bf4c3a5f11f04")
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 Conv2d. 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
LunarShen/SECRET/secret/models/resnet.py
code served (permissive licence) · get_code("29df79c9fdb0cee8")
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 Conv2d. 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)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
cosine_dist Ran
ran; our contract draft was wrong, not the code
LunarShen/SECRET/secret/loss/triplet.py
code served (permissive licence) · get_code("97bcc985e3ddff46")
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, 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

torch.manual_seed(0)

# The function expects two tensors x and y
# It performs cosine distance computation
# x and y should be 2D tensors (batch_size, feature_dim)
# The function uses:
# - x.size(0), y.size(0) to get batch sizes
# - x.transpose(0, 1) to transpose y
# - torch.matmul for matrix multiplication
# - torch.sum, torch.pow, torch.sqrt for norm computation
# - view and repeat for reshaping and broadcasting

x = torch.randn(2, 4)  # batch_size=2, feature_dim=4
y = torch.randn(3, 4)  # batch_size=3, feature_dim=4

ARGS = {
    'x': x,
    'y': y,
}
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 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
euclidean_dist Ran
ran; our contract draft was wrong, not the code
LunarShen/SECRET/secret/loss/triplet.py
code served (permissive licence) · get_code("61b46fd9c6762950")
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, 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

torch.manual_seed(0)

# Create two small tensors with distinct shapes
# x: (2, 4) - 2 samples, 4 dimensions
# y: (3, 4) - 3 samples, 4 dimensions
x = torch.randn(2, 4)
y = torch.randn(3, 4)

ARGS = {
    'x': x,
    'y': y,
}
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 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
pairwise_distance Ran
ran on a synthesized input
LunarShen/SECRET/secret/metrics/Partevaluators.py
code served (permissive licence) · get_code("dc611ab72c316d5a")
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, 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

torch.manual_seed(0)

# Create two small tensors with distinct shapes
# x: batch_size=2, feature_dim=4
# y: batch_size=3, feature_dim=4
x = torch.randn(2, 4)
y = torch.randn(3, 4)

ARGS = {
    "x": x,
    "y": y,
}
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 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
pairwise_distance Ran
ran on a synthesized input
LunarShen/SECRET/secret/metrics/evaluators.py
code served (permissive licence) · get_code("8c8730b34b301689")
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, shape (2, 2) 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

torch.manual_seed(0)

# Case 1: features is a dict of tensors (when query and gallery are None)
features_dict = {
    'feat_0': torch.randn(4),
    'feat_1': torch.randn(4),
}

# Case 2: query and gallery are lists of tuples (f, _, _)
# where f is a key in the features dict
query = [
    ('feat_0', None, None),
    ('feat_1', None, None),
]

gallery = [
    ('feat_0', None, None),
    ('feat_1', None, None),
]

ARGS = {
    'features': features_dict,
    'query': query,
    'gallery': gallery,
}
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 2, dtype family float, shape (2, 2) — shape (2, 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
swig_ptr_from_FloatTensor Ran
ran; our contract draft was wrong, not the code
LunarShen/SECRET/secret/cluster/faiss_utils.py
code served (permissive licence) · get_code("f295b8050ce2a4f1")
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 SwigPyObject. 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 faiss

torch.manual_seed(0)

# Create a small contiguous float32 tensor
x = torch.randn(2, 4, dtype=torch.float32).contiguous()

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SwigPyObject — a SwigPyObject output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SwigPyObject 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
evaluate_rank Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/metrics/rank_c.py
code served (permissive licence) · get_code("5ccfa5a0a17512f8")
How it ran

no invocation recorded.

extract_cnn_feature Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/metrics/evaluators.py
code served (permissive licence) · get_code("fbb5efeed7ebfd09")
How it ran

no invocation recorded.

extract_cnn_feature Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/metrics/Partevaluators.py
code served (permissive licence) · get_code("98a65e22d0766c72")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/metrics/Partevaluators.py
code served (permissive licence) · get_code("105493f93db8d70d")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/metrics/evaluators.py
code served (permissive licence) · get_code("9717a32e72af0af3")
How it ran

no invocation recorded.

resnet50 Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/models/resnet.py
code served (permissive licence) · get_code("a2a8b33eb2f6a944")
How it ran

no invocation recorded.

search_index_pytorch Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/cluster/faiss_utils.py
code served (permissive licence) · get_code("78ca4879f13cc9d5")
How it ran

no invocation recorded.

swig_ptr_from_LongTensor Not yet run
unverified (harvested, no recorded run)
LunarShen/SECRET/secret/cluster/faiss_utils.py
code served (permissive licence) · get_code("892aeccb03c9a237")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 5 later) and 8 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
conv1x1 431 other papers
168 dated earlier, 195 later, 67 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
103 dated earlier, 160 later, 48 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
extract_cnn_feature 6 other papers
2 dated earlier, 4 later
1807.09441 (2018-07)
Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net
2103.11568 (2021-03)
Cluster Contrast for Unsupervised Person Re-Identification
2311.10605 (2023-11)
CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification
and 3 more not named here
cosine_dist 4 other papers
2 dated earlier, 2 later
2001.01526 (2020-01)
Mutual Mean-Teaching: Pseudo Label Refinery for Unsupervised Domain Adaptation on Person Re-identification
2006.06525 (2020-06)
Attentive WaveBlock: Complementarity-enhanced Mutual Networks for Unsupervised Domain Adaptation in Person Re-identification and Beyond
2404.13788 (2024-04)
AnyPattern: Towards In-context Image Copy Detection
and 1 more not named here
swig_ptr_from_FloatTensor 4 other papers
3 dated earlier, 1 same year, order not determinable
1805.09501 (2018-05)
AutoAugment: Learning Augmentation Policies from Data
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
2004.10566 (2020-04)
Efficient Neighbourhood Consensus Networks via Submanifold Sparse Convolutions
and 1 more not named here
swig_ptr_from_LongTensor 4 other papers
3 dated earlier, 1 same year, order not determinable
1805.09501 (2018-05)
AutoAugment: Learning Augmentation Policies from Data
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
2004.10566 (2020-04)
Efficient Neighbourhood Consensus Networks via Submanifold Sparse Convolutions
and 1 more not named here
search_index_pytorch 3 other papers
2 dated earlier, 1 same year, order not determinable
1805.09501 (2018-05)
AutoAugment: Learning Augmentation Policies from Data
2004.10566 (2020-04)
Efficient Neighbourhood Consensus Networks via Submanifold Sparse Convolutions
2204.09826 (2022-04)
SimMC: Simple Masked Contrastive Learning of Skeleton Representations for Unsupervised Person Re-Identification
euclidean_dist 1 other paper
1 later
2410.22124 (2024-10)
RankUp: Boosting Semi-Supervised Regression with an Auxiliary Ranking Classifier

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

Unsupervised domain adaptive person re-identification aims at learning on an unlabeled target domain with only labeled data in source domain. Currently, the state-of-the-arts usually solve this problem by pseudo-label-based clustering and fine-tuning in target domain. However, the reason behind the noises of pseudo labels is not sufficiently explored, especially for the popular multi-branch models. We argue that the consistency between different feature spaces is the key to the pseudo labels' quality. Then a SElf-Consistent pseudo label RefinEmenT method, termed as SECRET, is proposed to improve consistency by mutually refining the pseudo labels generated from different feature spaces. The proposed SECRET gradually encourages the improvement of pseudo labels' quality during training process, which further leads to better cross-domain Re-ID performance. Extensive experiments on benchmark datasets show the superiority of our method. Specifically, our method outperforms the state-ofthe-arts by 6.3% in terms of mAP on the challenging dataset MSMT17. In the purely unsupervised setting, our method also surpasses existing works by a large margin. Code is available at https://github.com/LunarShen/SECRET.

For agents

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

get_harvested_code_for_paper("aaai_19970")
get_code_for_paper("aaai_19970")
have("aaai_19970")

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

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

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

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

Connect an agent — have() is free.