SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.11280 · ICML · 2020

Self-PU: Self Boosted and Calibrated Positive-Unlabeled Training

Tianlong Chen, Zhangyang Wang, Ye Yuan, Xuxi Chen, Wuyang Chen, Chen Gong, Kewei Chen

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 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 9 have no contract verdict; 1 failure of our instrument; 1 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/2006.11280.json · badge: /api/ran/2006.11280.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
TAMU-VITA/Self-PU canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran on a synthesized input
TAMU-VITA/Self-PU/evaluation.py
code served (permissive licence) · get_code("cef805581fe303e5")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# Create a minimal args object with a gpu attribute
class Args:
    def __init__(self):
        self.gpu = 0

args = Args()

# Create sample tensors for output and target
# output: model predictions (binary, flattened to 1D)
# target: ground truth labels (binary)
output = torch.tensor([1, 0, 1, 1], dtype=torch.float32)
target = torch.tensor([1, 0, 1, 0], dtype=torch.float32)

ARGS = {
    'output': output,
    'target': target
}
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
all_np Ran
ran on a synthesized input
TAMU-VITA/Self-PU/cifar_datasets.py
code served (permissive licence) · get_code("34af99b20768b442")
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 dict. 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 numpy as np

# The function all_np takes a single parameter 'arr' which should be array-like
# It converts it to a numpy array, finds unique values, counts occurrences of each

# Create a simple test array with some repeated values
test_array = [1, 2, 2, 3, 3, 3, 1, 1, 4]

ARGS = {
    "arr": test_array
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
binarize_cifar_class Ran
ran on a synthesized input
TAMU-VITA/Self-PU/cifar_datasets.py
code served (permissive licence) · get_code("d09e61188cf9beba")
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 numpy as np

# Create sample label arrays for CIFAR-like classification
# The function expects arrays of class labels (integers)
_trainY = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1], dtype=np.int32)
_testY = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=np.int32)

ARGS = {
    "_trainY": _trainY,
    "_testY": _testY,
}
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 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
binarize_mnist_class Ran
ran on a synthesized input
TAMU-VITA/Self-PU/datasets.py
code served (permissive licence) · get_code("971b15d61f9e214c")
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 numpy as np

# Analyze the function: it takes two parameters, _trainY and _testY
# Both are expected to be array-like objects with len() and % operator support
# The function checks if elements are odd/even using modulo
# It creates output arrays of the same length with dtype=np.int32

# Create small sample label arrays (simulating MNIST class labels 0-9)
_trainY = np.array([0, 1, 2, 3, 4, 5], dtype=np.int32)
_testY = np.array([0, 1, 2, 3], dtype=np.int32)

ARGS = {
    "_trainY": _trainY,
    "_testY": _testY
}
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 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
boolean_string Ran
ran, violated the contract we drafted
TAMU-VITA/Self-PU/evaluation.py
pointer only (licence: MIT); the stored copy get_code serves, from PruneTruong/GOCor, is pointer only (licence: NOASSERTION) · get_code("b1f9cebf0d177140")
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 PruneTruong/GOCor, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

decode_params Ran
ran on a synthesized input
TAMU-VITA/Self-PU/functions.py
code served (permissive licence) · get_code("e9ae7b09751b4912")
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 list, 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

torch.manual_seed(0)

def decode_params(input_params):
    params = input_params[0]
    out_params = []
    _start = 0
    _end = 0
    for i in range(len(params)):
        if params[i] == ',':
            out_params.append(float(params[_start:_end]))
            _start = _end + 1
        _end += 1
    out_params.append(float(params[_start:_end]))
    return out_params

ARGS = {
    "input_params": ["1.5,2.3,3.7,4.2"]
}
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 list, ndim 1, dtype family float — a list 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
make_cifar_dataset Ran
ran on a synthesized input
TAMU-VITA/Self-PU/cifar_datasets.py
code served (permissive licence) · get_code("7b168938d2cbecc0")
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 numpy as np

# Create small synthetic CIFAR-like binary dataset
# Each image is a small array (uint8), and we need binary labels (0 and 1)
np.random.seed(0)

# Create training data: 20 samples, small image size (4x4x3 like CIFAR)
train_x = np.random.randint(0, 256, size=(20, 4, 4, 3), dtype=np.uint8)
train_y = np.array([0, 1] * 10, dtype=np.int32)  # Binary labels: 0 and 1

# Create test data: 10 samples
test_x = np.random.randint(0, 256, size=(10, 4, 4, 3), dtype=np.uint8)
test_y = np.array([0, 1] * 5, dtype=np.int32)

# Package as tuple of tuples as expected by the function
dataset = ((train_x, train_y), (test_x, test_y))

ARGS = {
    'dataset': dataset,
    'n_labeled': 5,
    'n_unlabeled': 15,
    'mode': 'train',
    'pn': False,
    'seed': 42
}
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 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
softmax_kl_loss Ran
ran on a synthesized input
TAMU-VITA/Self-PU/mean_teacher/losses.py
code served (permissive licence) · get_code("4b6074d01efc94cc")
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)

# Create small tensors for input and target logits
# Batch size: 2, Number of classes: 4
batch_size = 2
num_classes = 4

input_logits = torch.randn(batch_size, num_classes)
target_logits = torch.randn(batch_size, num_classes)

ARGS = {
    "input_logits": input_logits,
    "target_logits": target_logits,
}
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
softmax_mse_loss Ran
ran on a synthesized input
TAMU-VITA/Self-PU/mean_teacher/losses.py
code served (permissive licence) · get_code("151e679b55203c9e")
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)

# Create small tensors for input and target logits
# Batch size: 2, Number of classes: 4
batch_size = 2
num_classes = 4

input_logits = torch.randn(batch_size, num_classes)
target_logits = torch.randn(batch_size, num_classes)

ARGS = {
    "input_logits": input_logits,
    "target_logits": target_logits,
    "reduce": True,
}
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
symmetric_mse_loss Ran
ran on a synthesized input
TAMU-VITA/Self-PU/mean_teacher/losses.py
code served (permissive licence) · get_code("d75345cece6fcc81")
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

torch.manual_seed(0)

# Create two small tensors with the same shape
# batch_size=2, num_classes=4
input1 = torch.randn(2, 4, requires_grad=True)
input2 = torch.randn(2, 4, requires_grad=True)

ARGS = {
    "input1": input1,
    "input2": input2,
}
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
to_var Ran
ran; our contract draft was wrong, not the code
TAMU-VITA/Self-PU/meta_models.py
pointer only (licence: MIT); the stored copy get_code serves, from xjtushujun/cmw-net, is pointer only (licence: NONE) · get_code("a2f6a25906e664c5")
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 xjtushujun/cmw-net, 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.

make_dataset Not yet run
unverified (harvested, no recorded run)
TAMU-VITA/Self-PU/datasets.py
code served (permissive licence) · get_code("e02ed376dff8b120")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 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
to_var 17 other papers
3 dated earlier, 1 the same month, 13 later · 4 only as an assembly brick
1606.04474 (2016-06)
Learning to learn by gradient descent by gradient descent
1902.07379 (2019-02)
Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting
2003.10780 (2020-03)
Rethinking Class-Balanced Methods for Long-Tailed Visual Recognition from a Domain Adaptation Perspective
and 14 more not named here
boolean_string 10 other papers
2 dated earlier, 8 later
1908.09355 (2019-08)
Patient Knowledge Distillation for BERT Model Compression
1912.05524 (2019-12)
GLU-Net: Global-Local Universal Network for Dense Flow and Correspondences
2007.00295 (2020-07)
Belief Propagation Neural Networks
and 7 more not named here
symmetric_mse_loss 2 other papers
2 dated earlier
1904.04717 (2019-04)
Label Propagation for Deep Semi-supervised Learning
2001.06001 (2020-01)
Curriculum Labeling: Revisiting Pseudo-Labeling for Semi-Supervised Learning
decode_params 1 other paper
1 later
2205.13282 (2022-05)
On the Eigenvalues of Global Covariance Pooling for Fine-grained Visual Recognition
softmax_kl_loss 1 other paper
1 dated earlier
1904.04717 (2019-04)
Label Propagation for Deep Semi-supervised 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

Many real-world applications have to tackle the Positive-Unlabeled (PU) learning problem, i.e., learning binary classifiers from a large amount of unlabeled data and a few labeled positive examples. While current state-of-the-art methods employ importance reweighting to design various risk estimators, they ignored the learning capability of the model itself, which could have provided reliable supervision. This motivates us to propose a novel Self-PU learning framework, which seamlessly integrates PU learning and self-training. Self-PU highlights three "self"oriented building blocks: a self-paced training algorithm that adaptively discovers and augments confident positive/negative examples as the training proceeds; a self-calibrated instance-aware loss; and a self-distillation scheme that introduces teacher-students learning as an effective regularization for PU learning. We demonstrate the state-of-the-art performance of Self-PU on common PU learning benchmarks (MNIST and CIFAR-10), which compare favorably against the latest competitors. Moreover, we study a realworld application of PU learning, i.e., classifying brain images of Alzheimer's Disease. Self-PU obtains significantly improved results on the renowned Alzheimer's Disease Neuroimaging Initiative (ADNI) database over existing methods. The code is publicly available at: https: //github.com/TAMU-VITA/Self-PU.

For agents

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

get_harvested_code_for_paper("2006.11280")
get_code_for_paper("2006.11280")
have("2006.11280")

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

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

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

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

Connect an agent — have() is free.