SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.11471 · NeurIPS · 2024

Generalizable Person Re-identification via Balancing Alignment and Uniformity

Jae Kim, Yoonki Cho, Jaeyoon Woo, Junsik Jung, Sung-Eui Yoon

arXiv · PDF · Open in the Atlas

Code that ran

8 of 15 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 5 failures of our instrument; 7 no recorded run), measured 2026-11-24; 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/2411.11471.json · badge: /api/ran/2411.11471.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
yoonkicho/BAU canonical (classifier label)
classifier basis: census
4 ran · 5 no recorded run
yoonkicho/bau community
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
Block Ran
ran on a synthesized input
yoonkicho/bau/bau/models/vit.py
code served (permissive licence) · get_code("acbaef74d8464c1e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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

INIT_ARGS = {
    "dim": 4,
    "num_heads": 2,
    "mlp_ratio": 2.0,
    "qkv_bias": False,
    "qk_scale": None,
    "drop": 0.0,
    "attn_drop": 0.0,
    "drop_path": 0.1,
    "act_layer": nn.GELU,
    "norm_layer": nn.LayerNorm,
}

ARGS = {
    "x": torch.randn(2, 3, 4)  # batch=2, sequence=3, dim=4
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PatchEmbed_overlap Ran
ran on a synthesized input
yoonkicho/bau/bau/models/vit.py
code served (permissive licence) · get_code("0cc8f535193de4c0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 225, 32) 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
import math
from itertools import repeat
from collections import abc as container_abcs

def _ntuple(n):
    def parse(x):
        if isinstance(x, container_abcs.Iterable):
            return x
        return tuple(repeat(x, n))
    return parse

to_2tuple = _ntuple(2)

class PatchEmbed_overlap(nn.Module):
    """ Image to Patch Embedding with overlapping patches
    """

    def __init__(self, img_size=224, patch_size=16, stride_size=20, in_chans=3, embed_dim=768):
        super().__init__()
        img_size = to_2tuple(img_size)
        patch_size = to_2tuple(patch_size)
        stride_size_tuple = to_2tuple(stride_size)
        self.num_x = (img_size[1] - patch_size[1]) // stride_size_tuple[1] + 1
        self.num_y = (img_size[0] - patch_size[0]) // stride_size_tuple[0] + 1
        print('using stride: {}, and patch number is num_y{} * num_x{}'.format(stride_size, self.num_y, self.num_x))
        num_patches = self.num_x * self.num_y
        self.img_size = img_size
        self.patch_size = patch_size
        self.num_patches = num_patches
        self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=stride_size)
        for m in self.modules():
            if isinstance(m, nn.Conv2d):
                n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
                m.weight.data.normal_(0, math.sqrt(2.0 / n))
            elif isinstance(m, nn.BatchNorm2d):
                m.weight.data.fill_(1)
                m.bias.data.zero_()
            elif isinstance(m, nn.InstanceNorm2d):
                m.weight.data.fill_(1)
                m.bias.data.zero_()

    def forward(self, x):
        B, C, H, W = x.shape
        assert H == self.img_size[0] and W == self.img_size[1], f"Input image size ({H}*{W}) doesn't match model ({self.img_size[0]}*{self.img_size[1]})."
        x = self.proj(x)
        x = x.flatten(2).transpose(1, 2)
        return x


INIT_ARGS = {
    'img_size': 64,
    'patch_size': 8,
    'stride_size': 4,
    'in_chans': 3,
    'embed_dim': 32,
}

ARGS = {
    'x': torch.randn(2, 3, 64, 64),
}

if __name__ == '__main__':
    model = PatchEmbed_overlap(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected num_patches: {model.num_patches}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float, shape (2, 225, 32) — shape (2, 225, 32) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_ntuple Ran
ran; our contract draft was wrong, not the code
yoonkicho/bau/bau/models/vit.py
code served (permissive licence) · get_code("251bb5809692264f")
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 function. 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 numpy as np
from itertools import repeat
from collections import abc as container_abcs

torch.manual_seed(0)

# The function _ntuple takes a single parameter 'n' which is an integer
# It returns a parse function that either returns an iterable as-is,
# or repeats a scalar value n times into a tuple

ARGS = {
    "n": 3
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
yoonkicho/BAU/bau/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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yoonkicho/BAU/bau/models/vit.py
code served (permissive licence) · get_code("39eace7e2822504f")
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 4, dtype family float, shape (2, 4, 3, 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 a small tensor for testing
# Shape: (batch_size=2, channels=4, height=3, width=3) - 4D tensor
x = torch.randn(2, 4, 3, 3, dtype=torch.float32)

ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": True,
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
yoonkicho/BAU/bau/loss/triplet.py
code served (permissive licence) · get_code("c78a1ab3340ee330")
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, honoured the contract we drafted
yoonkicho/BAU/bau/evaluators.py
code served (permissive licence) · get_code("b6d5887f94b1db25")
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
import numpy as np

torch.manual_seed(0)

# Case 1: query=None and gallery=None
# The function expects features to be a dict where values() returns tensors
# that can be concatenated. n = len(features), and each tensor should be viewable as a vector.
features_dict = {
    'feat_0': torch.randn(4),  # 4-dim feature vector
    'feat_1': torch.randn(4),  # 4-dim feature vector
}

# Case 2: query and gallery are provided
# They are lists of tuples where each tuple is (feature_id, ..., ...)
# The function accesses features[f] for f being the first element of each tuple
query_list = [
    ('feat_0', 'label_0', 'cam_0'),
    ('feat_1', 'label_1', 'cam_1'),
]

gallery_list = [
    ('feat_0', 'label_0', 'cam_0'),
    ('feat_1', 'label_1', 'cam_1'),
]

# For the case with query and gallery, we need features dict with the feature ids
features_dict_case2 = {
    'feat_0': torch.randn(4),
    'feat_1': torch.randn(4),
}

# Test both cases by creating two different ARGS configurations
# We'll go with case 1 (query=None, gallery=None) as the primary setup
ARGS = {
    'features': features_dict,
    'query': None,
    'gallery': None,
}
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, 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
resize_pos_embed Ran
ran; our contract draft was wrong, not the code
yoonkicho/bau/bau/models/vit.py
code served (permissive licence) · get_code("1dff045c2db5ebe1")
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 3, dtype family float, shape (1, 37, 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 math
import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Analyze the function:
# - posemb: tensor that gets indexed and reshaped
# - posemb_new: tensor whose shape[1] is accessed
# - hight: int used for interpolation size
# - width: int used for interpolation size

# The function:
# 1. Takes posemb with shape (batch, tokens, dim)
# 2. Extracts first token and remaining grid tokens
# 3. Reshapes grid into (1, gs_old, gs_old, dim) where gs_old = sqrt(grid_tokens)
# 4. Interpolates to (hight, width)
# 5. Returns reshaped result

# Create posemb: (1, 26, 8) - 1 class token + 25 grid tokens (5x5), 8 dims
posemb = torch.randn(1, 26, 8)

# Create posemb_new with desired shape: (1, 37, 8) - 1 class token + 36 grid tokens (6x6), 8 dims
posemb_new = torch.randn(1, 37, 8)

# hight and width should match the new grid size
hight = 6
width = 6

ARGS = {
    "posemb": posemb,
    "posemb_new": posemb_new,
    "hight": hight,
    "width": width,
}
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 3, dtype family float, shape (1, 37, 8) — shape (1, 37, 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
HybridEmbed Not yet run
unverified (harvested, no recorded run)
yoonkicho/bau/bau/models/vit.py
code served (permissive licence) · get_code("90ee1b670c35177f")
How it ran

no invocation recorded.

TransReID Not yet run
unverified (harvested, no recorded run)
yoonkicho/bau/bau/models/vit.py
code served (permissive licence) · get_code("fc806e8aca38c861")
How it ran

no invocation recorded.

extract_cnn_feature Not yet run
unverified (harvested, no recorded run)
yoonkicho/BAU/bau/evaluators.py
code served (permissive licence) · get_code("fbb5efeed7ebfd09")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
yoonkicho/BAU/bau/evaluators.py
code served (permissive licence) · get_code("67f354d0d3d81d43")
How it ran

no invocation recorded.

mobilenetv2_x1_0 Not yet run
unverified (harvested, no recorded run)
yoonkicho/BAU/bau/models/mobilenetv2.py
code served (permissive licence) · get_code("534e30dca5b8079f")
How it ran

no invocation recorded.

mobilenetv2_x1_4 Not yet run
unverified (harvested, no recorded run)
yoonkicho/BAU/bau/models/mobilenetv2.py
code served (permissive licence) · get_code("d4a186f812485b7e")
How it ran

no invocation recorded.

vit_base_patch16_224_TransReID Not yet run
unverified (harvested, no recorded run)
yoonkicho/BAU/bau/models/vit.py
code served (permissive licence) · get_code("88a1d44120682a0e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 1 the same month, 3 later) and 7 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
drop_path
brick of this paper's assembly: helper
224 other papers
186 dated earlier, 6 the same month, 24 later, 7 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
Block
brick of this paper's assembly: model
12 other papers
11 dated earlier, 1 later · 4 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2101.11986 (2021-01)
Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
2103.10455 (2021-03)
3D Human Pose Estimation with Spatial and Temporal Transformers
and 9 more not named here
pairwise_distance 7 other papers
5 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 4 more not named here
HybridEmbed
brick of this paper's assembly: model
6 other papers
5 dated earlier, 1 later · 3 only as an assembly brick
2105.14432 (2021-05)
TransMatcher: Deep Image Matching Through Transformers for Generalizable Person Re-identification
2106.02034 (2021-06)
DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification
2303.13755 (2023-03)
Sparsifiner: Learning Sparse Instance-Dependent Attention for Efficient Vision Transformers
and 3 more not named here
extract_cnn_feature 6 other papers
5 dated earlier, 1 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
aaai_19970 (2022 (year only))
SECRET: Self-Consistent Pseudo Label Refinement for Unsupervised Domain Adaptive Person Re-identification
and 3 more not named here
_ntuple
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 3 only as an assembly brick
2304.14636 (2023-04)
PreNAS: Preferred One-Shot Learning Towards Efficient Neural Architecture Search
2308.03322 (2023-08)
Part-Aware Transformer for Generalizable Person Re-identification
2310.16898 (2023-10)
MCUFormer: Deploying Vision Transformers on Microcontrollers with Limited Memory
and 1 more not named here
cosine_dist 4 other papers
4 dated earlier
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
aaai_19970 (2022 (year only))
SECRET: Self-Consistent Pseudo Label Refinement for Unsupervised Domain Adaptive Person Re-identification
and 1 more not named here
PatchEmbed_overlap
brick of this paper's assembly: model
1 other paper
1 dated earlier
2308.03322 (2023-08)
Part-Aware Transformer for Generalizable Person Re-identification

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Domain generalizable person re-identification (DG re-ID) aims to learn discriminative representations that are robust to distributional shifts. While data augmentation is a straightforward solution to improve generalization, certain augmentations exhibit a polarized effect in this task, enhancing in-distribution performance while deteriorating out-of-distribution performance. In this paper, we investigate this phenomenon and reveal that it leads to sparse representation spaces with reduced uniformity. To address this issue, we propose a novel framework, Balancing Alignment and Uniformity (BAU), which effectively mitigates this effect by maintaining a balance between alignment and uniformity. Specifically, BAU incorporates alignment and uniformity losses applied to both original and augmented images and integrates a weighting strategy to assess the reliability of augmented samples, further improving the alignment loss. Additionally, we introduce a domain-specific uniformity loss that promotes uniformity within each source domain, thereby enhancing the learning of domain-invariant features. Extensive experimental results demonstrate that BAU effectively exploits the advantages of data augmentation, which previous studies could not fully utilize, and achieves state-of-the-art performance without requiring complex training procedures. The code is available at https://github.com/yoonkicho/BAU.

For agents

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

get_harvested_code_for_paper("2411.11471")
get_code_for_paper("2411.11471")
have("2411.11471")

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

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

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

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

Connect an agent — have() is free.