SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.08830 · NeurIPS · 2020

MESA: Boost Ensemble Imbalanced Learning with MEta-SAmpler

Wei Cao, Jing Jiang, Zhining Liu, Pengfei Wei, Jiang Bian, Yi Chang

arXiv · PDF · Open in the Atlas

Code that ran

15 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 7 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2010.08830.json · badge: /api/ran/2010.08830.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
ZhiningLiu1998/mesa canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
NeurIPS2020AnonymousSubmission/mesa community
Papers with Code archive
12 ran · 3 no recorded run
FunctionStatusWhere it lives
DeterministicPolicy Ran
ran on a synthesized input · constructed an object; no result was computed
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("56013393aeafd8da")
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, DeterministicPolicy: 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 minimal action_space mock object
class ActionSpace:
    def __init__(self):
        self.high = torch.tensor([1.0, 1.0, 1.0])
        self.low = torch.tensor([-1.0, -1.0, -1.0])

action_space = ActionSpace()

ARGS = {
    "num_inputs": 4,
    "num_actions": 3,
    "hidden_dim": 8,
    "action_space": action_space,
}
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 DeterministicPolicy — 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 DeterministicPolicy 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
Ensemble Ran
ran on a synthesized input · constructed an object; no result was computed
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("c1ebf5a998d2091f")
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, Ensemble: 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
import sklearn
from sklearn.tree import DecisionTreeClassifier

# Create a minimal sklearn classifier as the base estimator
base_estimator = DecisionTreeClassifier(max_depth=2, random_state=0)

ARGS = {
    "base_estimator": base_estimator
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Ensemble — 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 Ensemble 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
GaussianPolicy Ran
ran on a synthesized input · constructed an object; no result was computed
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("3393f1e0da810f3f")
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, GaussianPolicy: 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
import numpy as np

torch.manual_seed(0)

# Create a simple stand-in action space object
class ActionSpace:
    def __init__(self, low, high):
        self.low = low
        self.high = high

# Define dimensions with distinct values
num_inputs = 4
num_actions = 3
hidden_dim = 8

# Create action space (low and high must be numpy arrays or lists)
action_space = ActionSpace(
    low=np.array([-1.0, -1.0, -1.0]),
    high=np.array([1.0, 1.0, 1.0])
)

ARGS = {
    'num_inputs': num_inputs,
    'num_actions': num_actions,
    'hidden_dim': hidden_dim,
    'action_space': action_space
}
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 GaussianPolicy — 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 GaussianPolicy 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
QNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("ff10fc4473be092a")
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, QNetwork: 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)

ARGS = {
    'num_inputs': 4,
    'num_actions': 3,
    'hidden_dim': 8
}

# Test the QNetwork instantiation
q_network = nn.Module.__new__(nn.Module)

# Verify the network can be instantiated and run
from torch import nn as nn_module

def weights_init_(m):
    if isinstance(m, nn.Linear):
        torch.nn.init.xavier_uniform_(m.weight, gain=1)
        torch.nn.init.constant_(m.bias, 0)

class QNetwork(nn.Module):

    def __init__(self, num_inputs, num_actions, hidden_dim):
        super(QNetwork, self).__init__()
        self.linear1 = nn.Linear(num_inputs + num_actions, hidden_dim)
        self.linear2 = nn.Linear(hidden_dim, hidden_dim)
        self.linear3 = nn.Linear(hidden_dim, 1)
        self.linear4 = nn.Linear(num_inputs + num_actions, hidden_dim)
        self.linear5 = nn.Linear(hidden_dim, hidden_dim)
        self.linear6 = nn.Linear(hidden_dim, 1)
        self.apply(weights_init_)

    def forward(self, state, action):
        import torch.nn.functional as F
        xu = torch.cat([state, action], 1)
        x1 = F.relu(self.linear1(xu))
        x1 = F.relu(self.linear2(x1))
        x1 = self.linear3(x1)
        x2 = F.relu(self.linear4(xu))
        x2 = F.relu(self.linear5(x2))
        x2 = self.linear6(x2)
        return (x1, x2)

# Create instance to verify
q_net = QNetwork(**ARGS)

# Test forward pass with tiny tensors
batch_size = 2
state = torch.randn(batch_size, ARGS['num_inputs'])
action = torch.randn(batch_size, ARGS['num_actions'])
output = q_net(state, action)

ARGS = {
    'num_inputs': 4,
    'num_actions': 3,
    'hidden_dim': 8
}
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 QNetwork — 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 QNetwork 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
Rater Ran
ran on a synthesized input · constructed an object; no result was computed
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("da0436c9be63db03")
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, Rater: 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

# Construct test data for the Rater class
np.random.seed(0)

# Create ground truth labels (binary: 0 or 1)
y_true = np.array([0, 1, 1, 0, 1, 0, 1, 1])

# Create predicted probabilities (values between 0 and 1)
y_pred = np.array([0.1, 0.9, 0.8, 0.2, 0.7, 0.3, 0.6, 0.85])

# Test with different metrics
ARGS = {
    'metric': 'aucprc',
    'threshold': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Rater — 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 Rater 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
ReplayMemory Ran
ran on a synthesized input · constructed an object; no result was computed
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("c4cf549ba24993c4")
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, ReplayMemory: 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
import random

class ReplayMemory:

    def __init__(self, capacity):
        self.capacity = capacity
        self.buffer = []
        self.position = 0

    def push(self, state, action, reward, next_state, done):
        if len(self.buffer) < self.capacity:
            self.buffer.append(None)
        self.buffer[self.position] = (state, action, reward, next_state, done)
        self.position = (self.position + 1) % self.capacity

    def sample(self, batch_size):
        batch = random.sample(self.buffer, batch_size)
        state, action, reward, next_state, done = map(np.stack, zip(*batch))
        return (state, action, reward, next_state, done)

    def __len__(self):
        return len(self.buffer)


# Set seed for reproducibility
random.seed(42)
np.random.seed(42)

# Create a ReplayMemory instance with capacity
capacity = 10

ARGS = {
    "capacity": capacity
}
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 ReplayMemory — 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 ReplayMemory 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_log_gaussian Ran
ran; our contract draft was wrong, not the code
ZhiningLiu1998/mesa/sac_src/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from roythuly/ompo, is pointer only (licence: NONE) · get_code("2526cfd8d5bf5d06")
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 roythuly/ompo, 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.

gaussian_prob Ran
ran, honoured the contract we drafted
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("636cc3cc12cdfb01")
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, 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 numpy as np

# Define arguments for gaussian_prob function
x = 0.5
mu = 0.0
sigma = 1.0

ARGS = {
    "x": x,
    "mu": mu,
    "sigma": sigma,
}
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 float64, 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
histogram_error_distribution Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("c17d6156cdefefee")
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 int, 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

# Set random seed for reproducibility
np.random.seed(0)

# Create sample data for y_true and y_pred
# Both should be 1D arrays of the same length
n_samples = 50
y_true = np.random.rand(n_samples) * 10  # Random values between 0 and 10
y_pred = np.random.rand(n_samples) * 10  # Random predicted values between 0 and 10

# Number of bins for the histogram
bins = 5

# Construct the arguments dictionary
ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "bins": bins
}
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 int, 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
imbalance_train_test_split Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("4e4775be095c5d65")
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

# Set random seed for reproducibility
np.random.seed(0)

# Create a small imbalanced dataset
# 10 samples of class 0, 5 samples of class 1
X_class_0 = np.random.randn(10, 4)
X_class_1 = np.random.randn(5, 4)
X = np.vstack([X_class_0, X_class_1])

y_class_0 = np.zeros(10, dtype=int)
y_class_1 = np.ones(5, dtype=int)
y = np.concatenate([y_class_0, y_class_1])

ARGS = {
    "X": X,
    "y": y,
    "test_size": 0.3,
    "random_state": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
load_dataset Ran
ran on a synthesized input
ZhiningLiu1998/mesa/utils.py
code served (permissive licence) · get_code("13155842a3eda501")
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 pandas as pd
import os
import tempfile

# Create a temporary directory and CSV files for testing
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create sample train CSV
train_data = pd.DataFrame({
    'feature1': [1.0, 2.0, 3.0],
    'feature2': [4.0, 5.0, 6.0],
    'feature3': [7.0, 8.0, 9.0],
    'label': [0, 1, 0]
})
train_data.to_csv(os.path.join(data_dir, 'my_dataset_train.csv'), index=False)

# Create sample valid CSV
valid_data = pd.DataFrame({
    'feature1': [1.5, 2.5],
    'feature2': [4.5, 5.5],
    'feature3': [7.5, 8.5],
    'label': [1, 0]
})
valid_data.to_csv(os.path.join(data_dir, 'my_dataset_valid.csv'), index=False)

# Create sample test CSV
test_data = pd.DataFrame({
    'feature1': [1.2, 2.2],
    'feature2': [4.2, 5.2],
    'feature3': [7.2, 8.2],
    'label': [0, 1]
})
test_data.to_csv(os.path.join(data_dir, 'my_dataset_test.csv'), index=False)

# Change to temp directory so relative path works
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'dataset_name': 'my_dataset'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
logsumexp Ran
ran; our contract draft was wrong, not the code
ZhiningLiu1998/mesa/sac_src/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from roythuly/ompo, is pointer only (licence: NONE) · get_code("09556d56c8b73050")
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 roythuly/ompo, 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.

memory_init_fulfill Ran
ran; our contract draft was wrong, not the code
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("4258a828fc4e901c")
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 MockMemory. 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

class MockMemory:
    """Mock memory class that implements the push method."""
    def __init__(self):
        self.buffer = []
    
    def push(self, state, action, reward, next_state, done):
        """Store a transition in memory."""
        self.buffer.append((state, action, reward, next_state, done))

class MockArgs:
    """Mock args class with required attributes."""
    def __init__(self):
        self.num_bins = 4
        self.replay_size = 12
        self.reward_coefficient = 2.0

ARGS = {
    'args': MockArgs(),
    'memory': MockMemory()
}
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 MockMemory — a MockMemory output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockMemory 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
meta_sampling Ran
ran; our contract draft was wrong, not the code
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("8b9d66c120aa4db4")
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 DataFrame. 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
import pandas as pd

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data
n_samples = 10
n_features = 4

# Generate synthetic predictions (probabilities between 0 and 1)
y_pred = np.array([0.2, 0.8, 0.3, 0.9, 0.1, 0.7, 0.4, 0.6, 0.5, 0.85])

# Generate synthetic ground truth labels (0 or 1)
y_true = np.array([0, 1, 0, 1, 0, 1, 0, 1, 1, 1])

# Generate synthetic feature data
X = np.random.randn(n_samples, n_features)

# Number of undersamples (must be <= n_samples)
n_under_samples = 5

# Gaussian parameters
mu = 0.5
sigma = 0.2

# Random state for reproducibility
random_state = 42

ARGS = {
    'y_pred': y_pred,
    'y_true': y_true,
    'X': X,
    'n_under_samples': n_under_samples,
    'mu': mu,
    'sigma': sigma,
    'random_state': random_state,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
state_scale Ran
ran, violated the contract we drafted
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("52edf1fa0ae5a2aa")
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 (4,) 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)

# state_scale expects:
# - state: a tensor that has a .sum() method and supports division
# - scale: a numeric value

state = torch.tensor([1.0, 2.0, 3.0, 4.0])
scale = 2.5

ARGS = {
    "state": state,
    "scale": scale,
}
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 (4,) — shape (4,) 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
EnsembleTrainingEnv Not yet run
unverified (harvested, no recorded run)
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("a1cae9d58f3c469f")
How it ran

no invocation recorded.

Mesa Not yet run
unverified (harvested, no recorded run)
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("312c199e2cf3845b")
How it ran

no invocation recorded.

SAC Not yet run
unverified (harvested, no recorded run)
NeurIPS2020AnonymousSubmission/mesa/mesa.py
code served (permissive licence) · get_code("2eade89a5f8f0440")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 3 later) and 14 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
logsumexp 9 other papers
3 dated earlier, 1 the same month, 5 later
1906.02771 (2019-06)
Improving Exploration in Soft-Actor-Critic with Normalizing Flows Policies
1911.02256 (2019-11)
A Divergence Minimization Perspective on Imitation Learning Methods
2004.14451 (2020-04)
Pragmatic Issue-Sensitive Image Captioning
and 6 more not named here
create_log_gaussian 7 other papers
1 dated earlier, 1 the same month, 5 later
1906.02771 (2019-06)
Improving Exploration in Soft-Actor-Critic with Normalizing Flows Policies
2010.09163 (2020-10)
D2RL: Deep Dense Architectures in Reinforcement Learning
2305.05760 (2023-05)
Reducing the Cost of Cycle-Time Tuning for Real-World Policy Optimization
and 4 more not named here
QNetwork
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 2 only as an assembly brick
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor
2201.11927 (2022-01)
Constrained Variational Policy Optimization for Safe Reinforcement Learning
DeterministicPolicy
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor

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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Imbalanced learning (IL), i.e., learning unbiased models from class-imbalanced data, is a challenging problem. Typical IL methods including resampling and reweighting were designed based on some heuristic assumptions. They often suffer from unstable performance, poor applicability, and high computational cost in complex tasks where their assumptions do not hold. In this paper, we introduce a novel ensemble IL framework named MESA. It adaptively resamples the training set in iterations to get multiple classifiers and forms a cascade ensemble model. MESA directly learns the sampling strategy from data to optimize the final metric beyond following random heuristics. Moreover, unlike prevailing meta-learning-based IL solutions, we decouple the model-training and meta-training in MESA by independently train the meta-sampler over task-agnostic meta-data. This makes MESA generally applicable to most of the existing learning models and the meta-sampler can be efficiently applied to new tasks. Extensive experiments on both synthetic and realworld tasks demonstrate the effectiveness, robustness, and transferability of MESA. Our code is available at https://github.com/ZhiningLiu1998/mesa. Preprint. Under review.

For agents

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

get_harvested_code_for_paper("2010.08830")
get_code_for_paper("2010.08830")
have("2010.08830")

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

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

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

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

Connect an agent — have() is free.