SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.19863 · NeurIPS · 2024

DeNetDM: Debiasing by Network Depth Modulation

Abhra Chaudhuri, Anjan Dutta, Silpa Sreelatha, Adarsh Kappiyath

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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 1 has no contract verdict; 5 failures of our instrument; 1 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/2403.19863.json · badge: /api/ran/2403.19863.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
kadarsh22/DeNetDM canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
kadarsh22/denetdm canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
FunctionStatusWhere it lives
CMNISTDeNetDMModel Ran
ran on a synthesized input
kadarsh22/denetdm/module/model.py
code served (permissive licence) · get_code("ba06abc2128df627")
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 2, 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
from collections import OrderedDict

class MLPHiddenlayers(nn.Module):

    def __init__(self, num_layers=1):
        super(MLPHiddenlayers, self).__init__()
        self.hidden_layers = nn.ModuleList()
        for _ in range(num_layers):
            self.hidden_layers.append(nn.Linear(100, 100))
        self.act = nn.ReLU()

    def forward(self, x):
        for layer in self.hidden_layers:
            x = self.act(layer(x))
        return x

class CMNISTDeNetDMModel(nn.Module):

    def __init__(self, debias_hidden_layers=3, bias_hidden_layers=5, num_classes=10, stage='1'):
        super(CMNISTDeNetDMModel, self).__init__()
        if stage == '1':
            self.debias_branch = nn.Sequential(OrderedDict([('c1', nn.Linear(3 * 28 * 28, 100)), ('r1', nn.ReLU()), ('s1', MLPHiddenlayers(num_layers=debias_hidden_layers - 2))]))
        elif stage == '2':
            self.debias_branch = nn.Sequential(OrderedDict([('c2', nn.Linear(3 * 28 * 28, 100)), ('r2', nn.ReLU()), ('s2', MLPHiddenlayers(num_layers=bias_hidden_layers - 2))]))
        self.bias_branch = nn.Sequential(nn.Linear(3 * 28 * 28, 100), nn.ReLU(), MLPHiddenlayers(num_layers=bias_hidden_layers - 2))
        self.classifier = nn.Linear(100, num_classes)

    def forward(self, x, debias_weight=1, bias_weight=1):
        x = x.view(x.size(0), -1)
        x_debias = self.debias_branch(x)
        x_bias = self.bias_branch(x)
        feat = debias_weight * x_debias + bias_weight * x_bias
        x = self.classifier(feat)
        return x

INIT_ARGS = {
    'debias_hidden_layers': 2,
    'bias_hidden_layers': 2,
    'num_classes': 10,
    'stage': '1'
}

ARGS = {
    'x': torch.randn(2, 3, 28, 28),
    'debias_weight': 1.0,
    'bias_weight': 1.0
}

if __name__ == '__main__':
    model = CMNISTDeNetDMModel(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
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 2, 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)
add_identifier_to_keys Ran
ran; our contract draft was wrong, not the code
kadarsh22/DeNetDM/util.py
code served (permissive licence) · get_code("fea144976d1a147e")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for add_identifier_to_keys
# The function takes:
# 1. dictionary: a dict to modify
# 2. identifier: a string to prepend to keys

dictionary = {
    'loss': 0.5,
    'accuracy': 0.95,
    'embeddings': torch.randn(2, 4),
    'config': {'lr': 0.001}
}

identifier = 'model'

ARGS = {
    'dictionary': dictionary,
    'identifier': identifier
}
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 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
make_attr_labels Ran
ran; our contract draft was wrong, not the code
kadarsh22/DeNetDM/make_dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from alinlab/LfF, is pointer only (licence: NONE) · get_code("d1527cbc2296cba6")
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 alinlab/LfF, 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.

resnet20 Ran
ran; our contract draft was wrong, not the code
kadarsh22/DeNetDM/module/resnet.py
code served (permissive licence) · get_code("01565f5f63507277")
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)

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
resnet20_skip Ran
ran; our contract draft was wrong, not the code
kadarsh22/DeNetDM/module/resnet.py
code served (permissive licence) · get_code("3ea7f840d5efc012")
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 ResNetSkip. 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 = {
    '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 ResNetSkip — a ResNetSkip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNetSkip 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
resnet32_skip Ran
ran; our contract draft was wrong, not the code
kadarsh22/DeNetDM/module/resnet.py
code served (permissive licence) · get_code("804e38b5b5a88fcf")
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 ResNetSkip. 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 = {
    "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 ResNetSkip — a ResNetSkip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNetSkip 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
MLPHiddenlayers Not yet run
unverified (harvested, no recorded run)
kadarsh22/denetdm/module/model.py
code served (permissive licence) · get_code("b92241b06a390bc5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 5 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
make_attr_labels 2 other papers
1 dated earlier, 1 later
2007.02561 (2020-07)
Learning from Failure: Training Debiased Classifier from Biased Classifier
2407.07544 (2024-07)
Disentangling Masked Autoencoders for Unsupervised Domain Generalization
resnet20 2 other papers
2 dated earlier
1909.08174 (2019-09)
Gate Decorator: Global Filter Pruning Method for Accelerating Deep Convolutional Neural Networks
2305.18497 (2023-05)
Collaborative Learning via Prediction Consensus

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

Neural networks trained on biased datasets tend to inadvertently learn spurious correlations, hindering generalization. We formally prove that (1) samples that exhibit spurious correlations lie on a lower rank manifold relative to the ones that do not; and (2) the depth of a network acts as an implicit regularizer on the rank of the attribute subspace that is encoded in its representations. Leveraging these insights, we present DeNetDM, a novel debiasing method that uses network depth modulation as a way of developing robustness to spurious correlations. Using a training paradigm derived from Product of Experts, we create both biased and debiased branches with deep and shallow architectures and then distill knowledge to produce the target debiased model. Our method requires no bias annotations or explicit data augmentation while performing on par with approaches that require either or both. We demonstrate that DeNetDM outperforms existing debiasing techniques on both synthetic and real-world datasets by 5%. The project page is available at https://vssilpa.github.io/denetdm/.

For agents

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

get_harvested_code_for_paper("2403.19863")
get_code_for_paper("2403.19863")
have("2403.19863")

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

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

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

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

Connect an agent — have() is free.