SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.19026 · 2024

Learning Commonality, Divergence and Variety for Unsupervised Visible-Infrared Person Re-identification

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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; 4 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/2402.19026.json · badge: /api/ran/2402.19026.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
shijiangming1/pclhd canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
cm Ran
ran; our contract draft was wrong, not the code
shijiangming1/pclhd/clustercontrast/models/cm.py
code served (permissive licence) · get_code("10ba7332fd4a54eb")
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
from torch import nn, autograd

torch.manual_seed(0)

# Parameters for the cm function:
# - inputs: a tensor that will be matrix-multiplied with features.t()
# - indexes: target indices for updating features
# - features: a feature matrix that gets updated in backward
# - momentum: scalar momentum value

# Create small tensors with distinct dimensions
batch_size = 2
feature_dim = 4
num_features = 3

inputs = torch.randn(batch_size, feature_dim, requires_grad=True)
indexes = torch.tensor([0, 2], dtype=torch.long)
features = torch.randn(num_features, feature_dim, requires_grad=False)

# Normalize features as expected by the backward pass
features = features / features.norm(dim=1, keepdim=True)

momentum = 0.5

ARGS = {
    "inputs": inputs,
    "indexes": indexes,
    "features": features,
    "momentum": momentum,
}
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
cm_hard Ran
ran; our contract draft was wrong, not the code
shijiangming1/pclhd/clustercontrast/models/cm.py
code served (permissive licence) · get_code("8c2547d1f72a804b")
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, 6) 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 numpy as np
import collections
from torch import nn, autograd

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
feature_dim = 4
num_classes = 3
num_instances = 2

# inputs: batch_size x feature_dim
inputs = torch.randn(batch_size, feature_dim, requires_grad=True)

# indexes: batch_size, contains class indices
indexes = torch.tensor([0, 1], dtype=torch.long)

# features: (num_classes * num_instances) x feature_dim
# This is the feature bank used in the backward pass
features = torch.randn(num_classes * num_instances, feature_dim)

# momentum: scalar value
momentum = 0.5

ARGS = {
    "inputs": inputs,
    "indexes": indexes,
    "features": features,
    "momentum": momentum,
    "num_instances": num_instances,
}
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 Tensor, ndim 2, dtype family float, shape (2, 6) — shape (2, 6) 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
cm_hybrid Ran
ran; our contract draft was wrong, not the code
shijiangming1/pclhd/clustercontrast/models/cm.py
code served (permissive licence) · get_code("16b921762cbeb63a")
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, 6) 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 collections
import numpy as np

torch.manual_seed(0)

# The function cm_hybrid takes:
# - inputs: tensor of shape (batch_size, feature_dim)
# - indexes: tensor of class indices for each sample in batch
# - features: tensor of shape (num_classes * 2, feature_dim) - stores both centers and hard examples
# - momentum: scalar for exponential moving average

batch_size = 2
feature_dim = 4
num_classes = 3

# inputs: batch of feature vectors
inputs = torch.randn(batch_size, feature_dim)

# indexes: class labels for each sample in batch
indexes = torch.tensor([0, 1], dtype=torch.long)

# features: stores both centers (first num_classes rows) and hard examples (second num_classes rows)
# Shape is (2 * num_classes, feature_dim)
features = torch.randn(2 * num_classes, feature_dim)
# Normalize features as the function expects normalized vectors
features = features / features.norm(dim=1, keepdim=True)

# momentum: scalar for moving average update
momentum = 0.5

ARGS = {
    'inputs': inputs,
    'indexes': indexes,
    'features': features,
    'momentum': momentum
}
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 Tensor, ndim 2, dtype family float, shape (2, 6) — shape (2, 6) 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
fliplr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
shijiangming1/pclhd/clustercontrast/evaluators.py
pointer only (licence: MIT); the stored copy get_code serves, from BJTUJia/person_reID_DualNorm, is pointer only (licence: NONE) · get_code("e324277ab874fc3a")
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 BJTUJia/person_reID_DualNorm, 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.

agw Not yet run
unverified (harvested, no recorded run)
shijiangming1/pclhd/clustercontrast/models/agw.py
code served (permissive licence) · get_code("5f70b73097c326d0")
How it ran

no invocation recorded.

extract_cnn_feature Not yet run
unverified (harvested, no recorded run)
shijiangming1/pclhd/clustercontrast/evaluators.py
code served (permissive licence) · get_code("5d2252473890de81")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
shijiangming1/pclhd/clustercontrast/evaluators.py
code served (permissive licence) · get_code("0357ccf76f61b05e")
How it ran

no invocation recorded.

label_generator_kmeans Not yet run
unverified (harvested, no recorded run)
shijiangming1/pclhd/clustercontrast/models/kmeans.py
code served (permissive licence) · get_code("4560dc753fea5981")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 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
cm 6 other papers
4 dated earlier, 2 same year, order not determinable
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
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
and 3 more not named here
label_generator_kmeans 6 other papers
4 dated earlier, 2 same year, order not determinable
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
136740192 (2022 (year only))
PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification
and 3 more not named here
fliplr 4 other papers
4 dated earlier
1904.07223 (2019-04)
Joint Discriminative and Generative Learning for Person Re-identification
1905.03422 (2019-05)
Frustratingly Easy Person Re-Identification: Generalizing Person Re-ID in Practice
2002.12186 (2020-02)
University-1652: A Multi-view Multi-source Benchmark for Drone-based Geo-localization
and 1 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

Unsupervised visible-infrared person re-identification (USVI-ReID) aims to match specified people in infrared images to visible images without annotations, and vice versa. USVI-ReID is a challenging yet under-explored task. Most existing methods address the USVI-ReID using cluster-based contrastive learning, which simply employs the cluster center as a representation of a person. However, the cluster center primarily focuses on commonality, overlooking divergence and variety. To address the problem, we propose a Progressive Contrastive Learning with Hard and Dynamic Prototypes method for USVI-ReID. In brief, we generate the hard prototype by selecting the sample with the maximum distance from the cluster center. We theoretically show that the hard prototype is used in the contrastive loss to emphasize divergence. Additionally, instead of rigidly aligning query images to a specific prototype, we generate the dynamic prototype by randomly picking samples within a cluster. The dynamic prototype is used to encourage the variety. Finally, we introduce a progressive learning strategy to gradually shift the model's attention towards divergence and variety, avoiding cluster deterioration. Extensive experiments conducted on the publicly available SYSU-MM01 and RegDB datasets validate the effectiveness of the proposed method.

For agents

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

get_harvested_code_for_paper("2402.19026")
get_code_for_paper("2402.19026")
have("2402.19026")

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

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

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

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

Connect an agent — have() is free.