SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1902.06965 · 2019

DEDPUL: Difference-of-Estimated-Densities-based Positive-Unlabeled Learning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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 9 have no contract verdict; 0 failures of our instrument; 2 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/1902.06965.json · badge: /api/ran/1902.06965.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
dimonenka/DEDPUL canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
all_convolution Ran
ran on a synthesized input
dimonenka/DEDPUL/NN_functions.py
code served (permissive licence) · get_code("2fc1e462fa17bf92")
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 Net. 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)

ARGS = {
    'inp_dim': (32, 32, 3),
    'out_dim': 1,
    'hid_dim_full': 128,
    'bayes': False,
    'bn': 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 Net — a Net output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Net 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
compute_best_rbf_kernel_width Ran
ran on a synthesized input
dimonenka/DEDPUL/KMPE.py
code served (permissive licence) · get_code("c7b90aa51789cfcf")
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 sample data
np.random.seed(0)

# X_mixture: N samples of dimension D
N = 3
D = 4
X_mixture = np.random.randn(N, D).astype(np.float64)

# X_component: M samples of dimension D
M = 2
X_component = np.random.randn(M, D).astype(np.float64)

ARGS = {
    "X_mixture": X_mixture,
    "X_component": X_component,
}
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
compute_log_likelihood Ran
ran on a synthesized input
dimonenka/DEDPUL/utils.py
code served (permissive licence) · get_code("de4c8b239a02d418")
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 float64, ndim 0, 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 numpy as np
from scipy.stats import gaussian_kde

np.random.seed(0)

# Create sample predictions (2 samples, 4 features)
preds = np.random.randn(4, 2)

# Create a KDE object trained on some data
# KDE expects shape (n_features, n_samples)
training_data = np.random.randn(4, 10)
kde = gaussian_kde(training_data)

# Default kde_outer_fun that calls kde on x
kde_outer_fun = lambda kde, x: kde(x)

ARGS = {
    "preds": preds,
    "kde": kde,
    "kde_outer_fun": kde_outer_fun
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
d_loss_standard Ran
ran on a synthesized input
dimonenka/DEDPUL/NN_functions.py
code served (permissive licence) · get_code("3362ee82dfdbe3e8")
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 as nn

torch.manual_seed(0)

# Create a simple discriminator that outputs a single value per input
class SimpleDiscriminator(nn.Module):
    def __init__(self, input_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, 1)
    
    def forward(self, x):
        return self.linear(x)

# Create small tensors
batch_size = 2
input_dim = 4

batch_mix = torch.randn(batch_size, input_dim)
batch_pos = torch.randn(batch_size, input_dim)

# Create discriminator
discriminator = SimpleDiscriminator(input_dim)

# Define ARGS dictionary
ARGS = {
    'batch_mix': batch_mix,
    'batch_pos': batch_pos,
    'discriminator': discriminator,
    'loss_function': 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 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
get_discriminator Ran
ran on a synthesized input
dimonenka/DEDPUL/NN_functions.py
code served (permissive licence) · get_code("fdf1ad5d8442958e")
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 Net. 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)

ARGS = {
    'inp_dim': 4,
    'out_dim': 1,
    'hid_dim': 32,
    'n_hid_layers': 1,
    'bayes': False,
    'bn': 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 Net — a Net output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Net 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
loguniform Ran
ran on a synthesized input
dimonenka/DEDPUL/utils.py
code served (permissive licence) · get_code("7116aa940a83577a")
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 ndarray, ndim 1, dtype family float, shape (5,) 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 numpy as np

np.random.seed(0)

ARGS = {
    "low": 0,
    "high": 1,
    "size": 5
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
low_c Ran
ran on a synthesized input
dimonenka/DEDPUL/TIcE.py
code served (permissive licence) · get_code("1ff62228d9b009fc")
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 float, 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 math
import torch
import numpy as np

class CountableData:
    """Stand-in class that implements count() method for bitwise operations."""
    def __init__(self, value):
        self.value = value
    
    def count(self):
        """Return the count of truthy elements."""
        if isinstance(self.value, (int, float)):
            return int(self.value) if self.value else 0
        return int(self.value)
    
    def __and__(self, other):
        """Bitwise AND operation."""
        if isinstance(other, CountableData):
            result_value = self.value & other.value if isinstance(self.value, int) else self.value * other.value
        else:
            result_value = self.value & other if isinstance(self.value, int) else self.value * other
        return CountableData(result_value)

# Create test data
torch.manual_seed(0)

# data: needs .count() method and & operator
data = CountableData(100)

# label: needs .count() method and & operator with data
label = CountableData(80)

# delta: float between 0 and 1 (used in denominator, so must be positive)
delta = 0.05

# minT: minimum threshold for T
minT = 50

# c: parameter for the formula (default 0.5)
c = 0.5

ARGS = {
    "data": data,
    "label": label,
    "delta": delta,
    "minT": minT,
    "c": c
}
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 float, 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
max_bepp Ran
ran on a synthesized input
dimonenka/DEDPUL/TIcE.py
code served (permissive licence) · get_code("8539d764f42cb41e")
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 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

def max_bepp(k):
    def fun(counts):
        return max(list(map(lambda T_P: 0 if T_P[0] == 0 else float(T_P[1]) / (T_P[0] + k), counts)))
    return fun

# The function max_bepp takes a parameter k (likely a smoothing constant)
# and returns a function that processes counts.
# The returned function expects counts to be an iterable of tuples (T_P)
# where each tuple has at least 2 elements: T_P[0] and T_P[1]

# Test with simple numeric tuples
k_value = 1.0
counts_data = [(2, 4), (0, 5), (3, 6), (1, 2)]

ARGS = {
    'k': k_value
}
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 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
pick_delta Ran
ran on a synthesized input
dimonenka/DEDPUL/TIcE.py
code served (permissive licence) · get_code("50b21e7e6829bc67")
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 float, 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 numpy as np

torch.manual_seed(0)

# Analyze the function: pick_delta(T) takes a single parameter T
# It performs arithmetic operations: max(0.025, 1 / (1 + 0.004 * T))
# T should be a numeric value (int or float)

T = 100

ARGS = {
    "T": T
}
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 float, 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
estimate_preds_cv_sklearn Not yet run
unverified (harvested, no recorded run)
dimonenka/DEDPUL/algorithms.py
code served (permissive licence) · get_code("e89d726f7cb1bfcd")
How it ran

no invocation recorded.

rolling_apply Not yet run
unverified (harvested, no recorded run)
dimonenka/DEDPUL/utils.py
code served (permissive licence) · get_code("a57fe4dd902f2b9a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 8 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
compute_best_rbf_kernel_width 1 other paper
1 dated earlier
1809.03207 (2018-09)
Beyond the Selected Completely At Random Assumption for Learning from Positive and Unlabeled Data
low_c 1 other paper
1 dated earlier
1809.03207 (2018-09)
Beyond the Selected Completely At Random Assumption for Learning from Positive and Unlabeled Data
pick_delta 1 other paper
1 dated earlier
1809.03207 (2018-09)
Beyond the Selected Completely At Random Assumption for Learning from Positive and Unlabeled Data

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

Positive-Unlabeled (PU) learning is an analog to supervised binary classification for the case when only the positive sample is clean, while the negative sample is contaminated with latent instances of positive class and hence can be considered as an unlabeled mixture. The objectives are to classify the unlabeled sample and train an unbiased PN classifier, which generally requires to identify the mixing proportions of positives and negatives first. Recently, unbiased risk estimation framework has achieved state-of-the-art performance in PU learning. This approach, however, exhibits two major bottlenecks. First, the mixing proportions are assumed to be identified, i.e. known in the domain or estimated with additional methods. Second, the approach relies on the classifier being a neural network. In this paper, we propose DEDPUL, a method that solves PU Learning without the aforementioned issues. The mechanism behind DEDPUL is to apply a computationally cheap post-processing procedure to the predictions of any classifier trained to distinguish positive and unlabeled data. Instead of assuming the proportions to be identified, DEDPUL estimates them alongside with classifying unlabeled sample. Experiments show that DEDPUL outperforms the current state-of-the-art in both proportion estimation and PU Classification.

For agents

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

get_harvested_code_for_paper("1902.06965")
get_code_for_paper("1902.06965")
have("1902.06965")

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

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

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

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

Connect an agent — have() is free.