SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2208.04619 · ECCV · 2022

RDA: Reciprocal Distribution Alignment for Robust Semi-supervised Learning

Luping Zhou, Lei Wang, Yinghuan Shi, Lei Qi, Yue Duan

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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, 1 violated it and 0 have no contract verdict; 2 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/2208.04619.json · badge: /api/ran/2208.04619.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
NJUyued/RDA4RobustSSL community
Papers with Code archive
3 ran · 2 no recorded run
FunctionStatusWhere it lives
ce_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NJUyued/RDA4RobustSSL/models/rda/rda.py
code served (permissive licence) · get_code("0c1d927c0e848f5c")
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, shape (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 torch.nn.functional as F

torch.manual_seed(0)

# Test case 1: use_hard_labels=True
# logits: [batch_size=2, num_classes=4]
# targets: [batch_size=2] with integer class indices
logits_hard = torch.randn(2, 4)
targets_hard = torch.tensor([0, 2])

# Test case 2: use_hard_labels=False
# logits: [batch_size=2, num_classes=4]
# targets: [batch_size=2, num_classes=4] with soft labels (probabilities)
logits_soft = torch.randn(2, 4)
targets_soft = F.softmax(torch.randn(2, 4), dim=-1)

# Build ARGS dict with hard labels case
ARGS = {
    'logits': logits_hard,
    'targets': targets_hard,
    'use_hard_labels': True,
    'reduction': 'none'
}
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, shape (2,) — shape (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
consistency_loss_rda Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NJUyued/RDA4RobustSSL/models/rda/rda.py
code served (permissive licence) · get_code("d147c98c13255f14")
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, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Define small tensors with distinct dimensions
batch_size = 2
num_classes = 4

# logits_x_ulb_w_reverse: [batch_size, num_classes]
logits_x_ulb_w_reverse = torch.randn(batch_size, num_classes)

# logits_x_ulb_s_reverse: [batch_size, num_classes]
logits_x_ulb_s_reverse = torch.randn(batch_size, num_classes)

# logits_w: [batch_size, num_classes]
logits_w = torch.randn(batch_size, num_classes)

# logits_s: [batch_size, num_classes]
logits_s = torch.randn(batch_size, num_classes)

# distri: [batch_size, num_classes] - distribution tensor
distri = torch.softmax(torch.randn(batch_size, num_classes), dim=-1)

# distri_reverse: [batch_size, num_classes] - reverse distribution tensor
distri_reverse = torch.softmax(torch.randn(batch_size, num_classes), dim=-1)

ARGS = {
    'logits_x_ulb_w_reverse': logits_x_ulb_w_reverse,
    'logits_x_ulb_s_reverse': logits_x_ulb_s_reverse,
    'logits_w': logits_w,
    'logits_s': logits_s,
    'distri': distri,
    'distri_reverse': distri_reverse,
    'name': 'ce',
    'T': 1.0,
}
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, ndim 1, dtype family float — a tuple 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
normalize_d Ran
ran, violated the contract we drafted
NJUyued/RDA4RobustSSL/models/rda/rda.py
code served (permissive licence) · get_code("06ceba58aa686c7d")
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, 4) 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 to normalize
x = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                   [5.0, 6.0, 7.0, 8.0]])

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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
RDA Not yet run
unverified (harvested, no recorded run)
NJUyued/RDA4RobustSSL/models/rda/rda.py
code served (permissive licence) · get_code("bb4a3c253adcda2c")
How it ran

no invocation recorded.

TotalNet Not yet run
unverified (harvested, no recorded run)
NJUyued/RDA4RobustSSL/models/rda/rda.py
code served (permissive licence) · get_code("79e3e0c9332e3dbd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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
ce_loss
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 3 only as an assembly brick
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2304.14738 (2023-04)
Cost-Sensitive Self-Training for Optimizing Non-Decomposable Metrics
2308.08872 (2023-08)
Towards Semi-supervised Learning with Non-random Missing Labels
normalize_d
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2308.08872 (2023-08)
Towards Semi-supervised Learning with Non-random Missing Labels

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

In this work, we propose Reciprocal Distribution Alignment (RDA) to address semi-supervised learning (SSL), which is a hyperparameter-free framework that is independent of confidence threshold and works with both the matched (conventionally) and the mismatched class distributions. Distribution mismatch is an often overlooked but more general SSL scenario where the labeled and the unlabeled data do not fall into the identical class distribution. This may lead to the model not exploiting the labeled data reliably and drastically degrade the performance of SSL methods, which could not be rescued by the traditional distribution alignment. In RDA, we enforce a reciprocal alignment on the distributions of the predictions from two classifiers predicting pseudo-labels and complementary labels on the unlabeled data. These two distributions, carrying complementary information, could be utilized to regularize each other without any prior of class distribution. Moreover, we theoretically show that RDA maximizes the input-output mutual information. Our approach achieves promising performance in SSL under a variety of scenarios of mismatched distributions, as well as the conventional matched SSL setting. Our code is available at: https://github.com/NJUyued/RDA4RobustSSL.

For agents

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

get_harvested_code_for_paper("2208.04619")
get_code_for_paper("2208.04619")
have("2208.04619")

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

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

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

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

Connect an agent — have() is free.