SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.14430 · ICLR · 2024

Robust Training of Federated Models with Extremely Label Deficiency

Bo Han, Tongliang Liu, Yonggang Zhang, Xinmei Tian, Zhiqin Yang, Nannan Wang

arXiv · PDF · Open in the Atlas

Code that ran

12 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 11 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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.14430.json · badge: /api/ran/2402.14430.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
tmlr-group/Twin-sight canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
visitworld123/Twin-sight canonical (classifier label)
classifier basis: classifier_2025
0 ran · 3 no recorded run
tmlr-group/twin-sight reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AutoContrast Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxH1996/FedXDS, is pointer only (licence: NONE) · get_code("c6e7c3451c85404f")
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 MaxH1996/FedXDS, 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.

Brightness Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxH1996/FedXDS, is pointer only (licence: NONE) · get_code("0d1a8d6ce2015fc7")
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 MaxH1996/FedXDS, 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.

Color Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxH1996/FedXDS, is pointer only (licence: NONE) · get_code("32cb3f5760fa593e")
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 MaxH1996/FedXDS, 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.

D Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/ssl_model/SimSiam.py
code served (permissive licence) · get_code("dc05a6f71458b31e")
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 0, dtype family float, shape () 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)

# The function D takes two parameters: p and z
# It computes -F.cosine_similarity(p, z.detach(), dim=-1).mean()
# Both p and z need to be tensors with a last dimension to compute cosine similarity
# They should have the same shape for cosine_similarity to work

p = torch.randn(2, 4)  # batch_size=2, dim=4
z = torch.randn(2, 4)  # batch_size=2, dim=4

ARGS = {
    "p": p,
    "z": z,
}
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 0, dtype family float, shape () — shape () 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
ResNet18 Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/model/SSFL_ResNet18.py
code served (permissive licence) · get_code("47e6829098b5f441")
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 ResNet. 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)

# Create a minimal args object
class Args:
    def __init__(self):
        self.some_attr = None

args = Args()

ARGS = {
    "args": args,
    "num_classes": 10,
    "image_size": 32,
    "model_input_channels": 3,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
ResNet34 Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/model/SSFL_ResNet18.py
code served (permissive licence) · get_code("1b648d9508676e89")
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 ResNet. 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 SimpleArgs:
    def __init__(self):
        self.learning_rate = 0.1
        self.epochs = 10
        self.batch_size = 2

args = SimpleArgs()

ARGS = {
    'args': args,
    'num_classes': 10,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
ResNet50 Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/model/SSFL_ResNet18.py
code served (permissive licence) · get_code("f6ba97e49fa19762")
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 ResNet. 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 DummyArgs:
    pass

ARGS = {
    'args': DummyArgs(),
    'num_classes': 10,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
SemiFed Ran
ran on a synthesized input · constructed an object; no result was computed
tmlr-group/twin-sight/model/SemiFed.py
code served (permissive licence) · get_code("5a4ab382570a4acf")
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 an instance of its own class, SemiFed: the run constructed the object and did not call it, so no result was computed. 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)

class SimpleUnsupModel(nn.Module):
    def __init__(self, output_dim=128):
        super().__init__()
        self.encoder = nn.Linear(3 * 32 * 32, output_dim)
        self.projector = nn.Linear(output_dim, 64)
    
    def forward(self, image1, image2=None):
        batch_size = image1.shape[0]
        flat1 = image1.view(batch_size, -1)
        
        f1 = self.encoder(flat1)
        logits1 = self.projector(f1)
        
        if image2 is not None:
            flat2 = image2.view(batch_size, -1)
            f2 = self.encoder(flat2)
            logits2 = self.projector(f2)
            loss = torch.tensor(0.1)
            return (f1, logits2, loss)
        
        return (f1, logits1)


class SimpleSupModel(nn.Module):
    def __init__(self, num_class=10):
        super().__init__()
        self.encoder = nn.Linear(3 * 32 * 32, 128)
        self.classifier = nn.Linear(128, num_class)
    
    def forward(self, x):
        batch_size = x.shape[0]
        flat_x = x.view(batch_size, -1)
        f = self.encoder(flat_x)
        logits = self.classifier(f)
        return (f, logits)


class ArgsConfig:
    def __init__(self, model='SemiFed_SimSiam'):
        self.model = model


unsup_model = SimpleUnsupModel(output_dim=128)
sup_model = SimpleSupModel(num_class=10)
args = ArgsConfig(model='SemiFed_SimSiam')

ARGS = {
    'unsup_model': unsup_model,
    'sup_model': sup_model,
    'args': args,
    'image_size': 32,
    'num_class': 10,
    'input_channel': 3,
}
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 SemiFed — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SemiFed 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
byol_loss_fn Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/ssl_model/BYOL.py
code served (permissive licence) · get_code("b0757c8d725098fd")
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)

# Create small tensors for x and y
# The function normalizes them and computes a loss based on their dot product
# Shape: (batch_size, feature_dim)
x = torch.randn(2, 4)
y = torch.randn(2, 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 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
create_data_loaders_from_arrays Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmlr-group/Twin-sight/ssl_model/ssl_utils.py
code served (permissive licence) · get_code("8647d7081db43caa")
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 DataLoader. 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

torch.manual_seed(0)

# Create small numpy arrays
X = np.random.randn(2, 4).astype(np.float32)  # 2 samples, 4 features
y = np.random.randint(0, 3, size=(2,)).astype(np.int64)  # 2 labels

batch_size = 2

ARGS = {
    "X": X,
    "y": y,
    "batch_size": batch_size,
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
create_loss Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/loss_fn/build.py
code served (permissive licence) · get_code("4aab447e9b17254e")
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 CrossEntropyLoss. 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 Args:
    def __init__(self):
        self.loss_fn = 'CrossEntropy'
        self.client_index = 0

ARGS = {
    'args': Args(),
    'device': 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 CrossEntropyLoss — a CrossEntropyLoss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CrossEntropyLoss 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
info_nce_loss Ran
ran; our contract draft was wrong, not the code
tmlr-group/Twin-sight/ssl_model/ssl_utils.py
code served (permissive licence) · get_code("973aed3b1cfc39d1")
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. 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.functional as F

torch.manual_seed(0)

# Construct the arguments
batch_size = 2
n_views = 2
temperature = 0.07
device = "cpu"

# features should be a tensor of shape (batch_size * n_views, feature_dim)
# With batch_size=2 and n_views=2, shape should be (4, feature_dim)
# Let's use feature_dim=8
feature_dim = 8
features = torch.randn(batch_size * n_views, feature_dim)

ARGS = {
    "features": features,
    "batch_size": batch_size,
    "device": device,
    "n_views": n_views,
    "temperature": temperature,
}
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 — a tuple output has no array shape of its own; none is 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
ce_loss Not yet run
unverified (harvested, no recorded run)
visitworld123/Twin-sight/trainers/normal_trainer.py
code served (permissive licence) · get_code("5623e1ae3f61cea9")
How it ran

no invocation recorded.

consistency_loss_fixmatch Not yet run
unverified (harvested, no recorded run)
visitworld123/Twin-sight/trainers/normal_trainer.py
code served (permissive licence) · get_code("edfc3ae1e2a6b64f")
How it ran

no invocation recorded.

consistency_loss_freematch Not yet run
unverified (harvested, no recorded run)
visitworld123/Twin-sight/trainers/normal_trainer.py
code served (permissive licence) · get_code("9229f6f3c7be844f")
How it ran

no invocation recorded.

inference_by_SSFL_model Not yet run
unverified (harvested, no recorded run)
tmlr-group/Twin-sight/ssl_model/ssl_utils.py
code served (permissive licence) · get_code("282e9cf7f7cb5b2b")
How it ran

no invocation recorded.

transform_pseudo_label Not yet run
unverified (harvested, no recorded run)
tmlr-group/Twin-sight/data_aug.py
code served (permissive licence) · get_code("1e5307996bddff3a")
How it ran

no invocation recorded.

transform_pseudo_label_fedConsis Not yet run
unverified (harvested, no recorded run)
tmlr-group/Twin-sight/data_aug.py
code served (permissive licence) · get_code("a6df40c07d6e8a99")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 3 later) and 12 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
AutoContrast 19 other papers
10 dated earlier, 1 the same month, 5 later, 3 same year, order not determinable
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2003.10580 (2020-03)
Meta Pseudo Labels
2104.07713 (2021-04)
Contrastive Learning with Stronger Augmentations
and 16 more not named here
Brightness 19 other papers
10 dated earlier, 1 the same month, 5 later, 3 same year, order not determinable
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2003.10580 (2020-03)
Meta Pseudo Labels
2104.07713 (2021-04)
Contrastive Learning with Stronger Augmentations
and 16 more not named here
Color 18 other papers
10 dated earlier, 1 the same month, 5 later, 2 same year, order not determinable
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2003.10580 (2020-03)
Meta Pseudo Labels
2104.07713 (2021-04)
Contrastive Learning with Stronger Augmentations
and 15 more not named here
ce_loss 7 other papers
7 dated earlier · 5 only as an assembly brick
2110.08263 (2021-10)
FlexMatch: Boosting Semi-Supervised Learning with Curriculum Pseudo Labeling
2203.02533 (2022-03)
BoostMIS: Boosting Medical Image Semi-supervised Learning with Adaptive Pseudo Labeling and Informative Active Annotation
2205.07246 (2022-05)
FreeMatch: Self-adaptive Thresholding for Semi-supervised Learning
and 4 more not named here
D 1 other paper
1 dated earlier
2011.10566 (2020-11)
Exploring Simple Siamese Representation Learning
create_loss 1 other paper
1 dated earlier
2310.05077 (2023-10)
FedFed: Feature Distillation against Data Heterogeneity in Federated Learning

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

Federated semi-supervised learning (FSSL) has emerged as a powerful paradigm for collaboratively training machine learning models using distributed data with label deficiency. Advanced FSSL methods predominantly focus on training a single model on each client. However, this approach could lead to a discrepancy between the objective functions of labeled and unlabeled data, resulting in gradient conflicts. To alleviate gradient conflict, we propose a novel twin-model paradigm, called Twin-sight, designed to enhance mutual guidance by providing insights from different perspectives of labeled and unlabeled data. In particular, Twin-sight concurrently trains a supervised model with a supervised objective function while training an unsupervised model using an unsupervised objective function. To enhance the synergy between these two models, Twin-sight introduces a neighbourhood-preserving constraint, which encourages the preservation of the neighbourhood relationship among data features extracted by both models. Our comprehensive experiments on four benchmark datasets provide substantial evidence that Twin-sight can significantly outperform state-of-the-art methods across various experimental settings, demonstrating the efficacy of the proposed Twin-sight. The code is publicly available at: github.com/tmlr-group/Twin-sight.

For agents

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

get_harvested_code_for_paper("2402.14430")
get_code_for_paper("2402.14430")
have("2402.14430")

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

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

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

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

Connect an agent — have() is free.