SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2011.03856 · EMNLP Findings · 2020

Learning to Model and Ignore Dataset Bias with Mixed Capacity Ensembles

Luke Zettlemoyer, Mark Yatskar, Christopher Clark

arXiv · PDF · Open in the Atlas

Code that ran

10 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 2 failures of our instrument; 8 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/2011.03856.json · badge: /api/ran/2011.03856.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
chrisc36/autobias marked official in Papers with Code
Papers with Code archive
10 ran · 8 no recorded run
FunctionStatusWhere it lives
ArgminFunction Ran
ran on a synthesized input · constructed an object; no result was computed
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("66d942a22936224d")
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, ArgminFunction: 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
import numpy as np
from torch import nn
from collections import OrderedDict

torch.manual_seed(0)

class ArgminFunction:
    """Minimal concrete implementation of ArgminFunction"""
    version = 0
    
    def __init__(self):
        pass
    
    def argmin_f(self, x, y, w=None, c=None) -> torch.Tensor:
        """Minimal implementation"""
        return torch.tensor([0])
    
    def _get_param_names(self):
        return []
    
    def get_config(self):
        return Configuration(self.__class__.__name__, self.version, {})


class Configuration:
    def __init__(self, name, version, params):
        self.name = name
        self.version = version
        self.params = params


ARGS = {}
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 ArgminFunction — 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 ArgminFunction 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
ClassifierEnsembleOutput Ran
ran on a synthesized input · constructed an object; no result was computed
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("1517452197d65b98")
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, ClassifierEnsembleOutput: 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
import torch.nn as nn

torch.manual_seed(0)

# Define the arguments
batch_size = 2
n_classes = 4
n_heads = 3

# logprobs: [batch, n_classes, n_heads] - log probabilities for predictions
logprobs = torch.randn(batch_size, n_classes, n_heads)

# head_names: [n_heads] - string names for each head
head_names = ["head_0", "head_1", "head_2"]

# prior: optional prior to be integrated into final predictions
# This can be a tensor or None based on the docstring saying "optional"
prior = torch.randn(n_classes)

ARGS = {
    "logprobs": logprobs,
    "head_names": head_names,
    "prior": prior
}
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 ClassifierEnsembleOutput — 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 ClassifierEnsembleOutput 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
Configuration Ran
ran on a synthesized input · constructed an object; no result was computed
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("4407441e018c9820")
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, Configuration: 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 numpy as np
from torch import nn
from collections import OrderedDict
import json

# Define a simple Configured subclass for testing
class SimpleConfigured(nn.Module):
    """A minimal Configured subclass"""
    version = 1
    
    def __init__(self, param_a=5, param_b="test"):
        super().__init__()
        self.param_a = param_a
        self.param_b = param_b
    
    @classmethod
    def _get_param_names(cls):
        return ['param_a', 'param_b']
    
    def get_config(self):
        return Configuration(
            self.__class__.__name__,
            self.version,
            {'param_a': self.param_a, 'param_b': self.param_b}
        )
    
    def get_params(self):
        out = OrderedDict()
        for key in self._get_param_names():
            v = getattr(self, key)
            out[key] = v
        return out

class Configuration:
    def __init__(self, name, version, params):
        self.name = name
        self.version = version
        self.params = params
    
    def to_json(self, indent=None):
        return json.dumps({
            'name': self.name,
            'version': self.version,
            'params': self.params
        }, indent=indent)

# Create test arguments for Configuration.__init__
ARGS = {
    'name': 'TestModel',
    'version': 2,
    'params': OrderedDict([
        ('learning_rate', 0.001),
        ('batch_size', 32),
        ('hidden_dim', 64),
        ('dropout', 0.1),
        ('model_type', 'transformer'),
        ('num_layers', [1, 2, 3]),
        ('config_dict', {'key1': 'value1', 'key2': 42})
    ])
}
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 Configuration — 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 Configuration 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
Layer Ran
ran on a synthesized input · constructed an object; no result was computed
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("1788407f38a54f42")
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, Layer: 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
import numpy as np
from torch import nn
from collections import OrderedDict

torch.manual_seed(0)

ARGS = {}
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 Layer — 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 Layer 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
TrainOutput Ran
ran on a synthesized input · constructed an object; no result was computed
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("329d6081e2b7090a")
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, TrainOutput: 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
import torch.nn as nn

torch.manual_seed(0)

# Create a small loss tensor (scalar)
loss = torch.tensor(1.5, requires_grad=True)

# Create a monitor dictionary with some scalar values
monitor = {
    'accuracy': 0.95,
    'precision': 0.92,
    'recall': 0.88,
    'f1_score': 0.90
}

ARGS = {
    'loss': loss,
    'monitor': monitor
}
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 TrainOutput — 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 TrainOutput 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
_get_param_names Ran
ran; our contract draft was wrong, not the code
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("c24ddaada1a1c755")
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
import torch.nn as nn
from inspect import signature, Parameter

class SimpleClass:
    def __init__(self, x, y):
        self.x = x
        self.y = y

class ClassWithKwargs:
    def __init__(self, a, *args):
        self.a = a

class ClassWithOnlyObjectInit:
    pass

class SimpleModule(nn.Module):
    def __init__(self, in_features, out_features):
        super().__init__()
        self.linear = nn.Linear(in_features, out_features)
    
    def forward(self, x):
        return self.linear(x)

ARGS = {
    'cls': SimpleClass
}
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
_to_py Ran
ran, violated the contract we drafted
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("01b501ef47ff7315")
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 int; 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

ARGS = {
    "obj": np.array([1, 2, 3, 4])
}
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 list, ndim 1, dtype family int — 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
compute_class_prior Ran
ran; our contract draft was wrong, not the code
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("3126bcabe72c01de")
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 (3,) 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
import torch

torch.manual_seed(0)

# Construct arguments for compute_class_prior
# The function takes labels (array-like of class indices) and n_classes (int)

# Create a small labels array with class indices
# Let's say we have 5 samples across 3 classes
labels = np.array([0, 1, 2, 0, 1], dtype=np.int64)

# Number of classes
n_classes = 3

ARGS = {
    "labels": labels,
    "n_classes": n_classes,
}
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 Tensor, ndim 1, dtype family float, shape (3,) — shape (3,) 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
cross_entropy Ran
ran, honoured the contract we drafted
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("fc370fba23e6b428")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the cross_entropy function
# batch_size=2, num_classes=4
logits = torch.randn(2, 4)
targets = torch.randint(0, 4, (2,))
weights = torch.tensor([0.3, 0.7])

ARGS = {
    'logits': logits,
    'targets': targets,
    'weights': weights,
}
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
weighted_mean Ran
ran, honoured the contract we drafted
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("94de706a508f6295")
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 small tensor for x
x = torch.randn(2, 4)

# Create weights tensor with same shape as x
weights = torch.randn(2, 4).abs()  # Use abs to ensure positive weights

ARGS = {
    "x": x,
    "weights": weights,
}
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
ArgminTransformFunction Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("1965ee4e5a5c3bab")
How it ran

no invocation recorded.

ClfArgminEnsemble Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("881087663bfb8da6")
How it ran

no invocation recorded.

ClfHead Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("9dccbb193bda0913")
How it ran

no invocation recorded.

Configured Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("4a2c1d211e8c974d")
How it ran

no invocation recorded.

Predictor Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("8b2698ce36b58c25")
How it ran

no invocation recorded.

_ConfiguredJSONEncoder Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("d9dc3b79245d226b")
How it ran

no invocation recorded.

config_to_json Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("44eeb9ee4b01368a")
How it ran

no invocation recorded.

get_configuration Not yet run
unverified (harvested, no recorded run)
chrisc36/autobias/autobias/modules/classifier_ensembles.py
code served (permissive licence) · get_code("be373e2a8ecbf2c4")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 18 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.

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 datasets have been shown to contain incidental correlations created by idiosyncrasies in the data collection process. For example, sentence entailment datasets can have spurious word-class correlations if nearly all contradiction sentences contain the word "not", and image recognition datasets can have telltale object-background correlations if dogs are always indoors. In this paper, we propose a method that can automatically detect and ignore these kinds of dataset-specific patterns, which we call dataset biases. Our method trains a lower capacity model in an ensemble with a higher capacity model. During training, the lower capacity model learns to capture relatively shallow correlations, which we hypothesize are likely to reflect dataset bias. This frees the higher capacity model to focus on patterns that should generalize better. We ensure the models learn non-overlapping approaches by introducing a novel method to make them conditionally independent. Importantly, our approach does not require the bias to be known in advance. We evaluate performance on synthetic datasets, and four datasets built to penalize models that exploit known biases on textual entailment, visual question answering, and image recognition tasks. We show improvement in all settings, including a 10 point gain on the visual question answering dataset.

For agents

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

get_harvested_code_for_paper("2011.03856")
get_code_for_paper("2011.03856")
have("2011.03856")

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

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

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

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

Connect an agent — have() is free.