SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.08852 · 2020

Counterexample-Guided Learning of Monotonic Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

12 of 18 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 12 have no contract verdict; 0 failures of our instrument; 6 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/2006.08852.json · badge: /api/ran/2006.08852.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
AishwaryaSivaraman/COMET canonical (classifier label)
classifier basis: census
12 ran · 6 no recorded run
FunctionStatusWhere it lives
checkifFileExists Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Utils.py
code served (permissive licence) · get_code("6126c9f5417a26df")
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 bool, 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 os
import tempfile

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()
test_files = ["model_weights.pt", "config_file.json", "data_backup.csv"]
for file_name in test_files:
    file_path = os.path.join(temp_dir, file_name)
    with open(file_path, 'w') as f:
        f.write("test content")

ARGS = {
    "folder": temp_dir,
    "name": "model"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
compare Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Analysis.py
code served (permissive licence) · get_code("c72724f074b2fbcd")
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 str. 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

torch.manual_seed(0)

# Analyze the function:
# - dataset_task_type: a string that can be 'regression' or something else
# - upper: a numeric value that can be compared with >
# - lower: a numeric value that can be compared with >

ARGS = {
    'dataset_task_type': 'regression',
    'upper': 10,
    'lower': 5
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
evaluate Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Models/DeepModel_AutoMPG.py
code served (permissive licence) · get_code("549807c7945a40a1")
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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def evaluate(self, test_dataset, test_labels, verbose=0):
        # Simulate model.evaluate() returning [loss, accuracy] for classification
        # or [loss, metric] for regression
        loss = 0.5
        metric = 0.85
        return [loss, metric]

model = MockModel()

test_dataset = np.random.randn(2, 4).astype(np.float32)

test_labels = np.array([0, 1], dtype=np.int32)

isClassification = True

ARGS = {
    "model": model,
    "test_dataset": test_dataset,
    "test_labels": test_labels,
    "isClassification": isClassification
}
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
extractFeatures Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/AnalysisUtils.py
code served (permissive licence) · get_code("d98501d52e9358a9")
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 os
import tempfile

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()
test_files = ['file1.txt', 'file2.py', 'file3.csv']
for fname in test_files:
    open(os.path.join(temp_dir, fname), 'w').close()

ARGS = {
    'data_dir': temp_dir,
    'benchmark': 'test_benchmark'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
generate_data Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/ModelCalls.py
code served (permissive licence) · get_code("6d081ded071feb48")
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 torch
import numpy as np

torch.manual_seed(0)

def make_cv_data(configurations):
    """
    Stand-in function that generates cross-validation data.
    Returns train_data, train_labels, test_data, test_labels, min_max_dict
    """
    train_data = torch.randn(2, 4)
    train_labels = torch.randint(0, 2, (2,))
    test_data = torch.randn(2, 4)
    test_labels = torch.randint(0, 2, (2,))
    min_max_dict = {
        'feature_0': {'min': 0.0, 'max': 1.0},
        'feature_1': {'min': 0.0, 'max': 1.0},
        'feature_2': {'min': 0.0, 'max': 1.0},
        'feature_3': {'min': 0.0, 'max': 1.0},
    }
    return train_data, train_labels, test_data, test_labels, min_max_dict

configurations = {
    'num_features': 4,
    'num_classes': 2,
    'batch_size': 2,
}

ARGS = {
    'make_cv_data': make_cv_data,
    'configurations': configurations,
}
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 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
getEnvelopeResult_seq Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Envelope.py
code served (permissive licence) · get_code("eda1e0bd828f85b9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. 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
import pandas as pd
from unittest.mock import Mock

# Create a minimal NN model mock that has predict_classes method
class MinimalNNModel:
    def predict_classes(self, data):
        # Returns a 2D array matching input shape
        return np.array([[0]] * len(data))

# Create sample data
data_dict = {
    'col_0': [0.1, 0.2, 0.3],
    'col_1': [1.0, 2.0, 3.0],
    'col_2': [5.0, 6.0, 7.0],
    'col_3': [10.0, 11.0, 12.0],
}
data = pd.DataFrame(data_dict)

# Create sample labels
labels = pd.Series([0.5, 1.5, 2.5], name='label')

# Create NN model
NN_model = MinimalNNModel()

# Define output function that takes model and point and returns prediction
def output(model, point):
    if isinstance(point, pd.Series):
        point = point.values.reshape(1, -1)
    elif isinstance(point, pd.DataFrame):
        point = point.values
    else:
        point = np.array(point).reshape(1, -1)
    # Return a 2D array with single prediction
    return np.array([[0.7]])

# monotonic_index
monotonic_index = 0

# fold identifier
fold = 1

# Counter example generator function
def counter_example_generator(data_point, monotonic_indices, label, weights_directory, 
                             layers, monotonicity_direction, min_dict, max_dict, 
                             column_types, logging, tmp_prefix, is_classification):
    # Returns (counter_example, elapsed_time, violation)
    # counter_example can be None or an array
    return (None, 0.05, 0.1)

# output function (already defined above)

# configurations dict
configurations = {
    'weight_files': '/tmp/weights',
    'layers': [4, 8, 1],
    'monotonicity_directions': '1',
    'monotonic_indices': [0],
    'column_names': ['col_0', 'col_1', 'col_2', 'col_3'],
    'min_max_values': {
        'col_0': [0.0, 1.0],
        'col_1': [0.0, 10.0],
        'col_2': [0.0, 10.0],
        'col_3': [0.0, 20.0],
    },
    'column_types': ['numeric', 'numeric', 'numeric', 'numeric'],
    'tmp_prefix': '/tmp/test',
    'is_classification': False,
}

# direction
direction = 'upper'

ARGS = {
    'data': data,
    'labels': labels,
    'NN_model': NN_model,
    'monotonic_index': monotonic_index,
    'fold': fold,
    'counter_example_generator': counter_example_generator,
    'output': output,
    'configurations': configurations,
    'direction': direction,
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getLatestDir Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/AnalysisUtils.py
code served (permissive licence) · get_code("58dbacea7c442757")
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 str. 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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_base = tempfile.mkdtemp()
folder_name = "test_folder"
folder_path = os.path.join(temp_base, folder_name)
os.makedirs(folder_path, exist_ok=True)

# Create some subdirectories with different modification times
subdir1 = os.path.join(folder_path, "subdir1")
subdir2 = os.path.join(folder_path, "subdir2")
subdir3 = os.path.join(folder_path, "subdir3")

os.makedirs(subdir1, exist_ok=True)
os.makedirs(subdir2, exist_ok=True)
os.makedirs(subdir3, exist_ok=True)

# Touch files to set modification times (subdir3 will be most recent)
import time
time.sleep(0.01)
open(os.path.join(subdir1, "file.txt"), "w").close()
time.sleep(0.01)
open(os.path.join(subdir2, "file.txt"), "w").close()
time.sleep(0.01)
open(os.path.join(subdir3, "file.txt"), "w").close()

ARGS = {
    "dir": temp_base,
    "folder": folder_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_batch Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/ModelCalls.py
code served (permissive licence) · get_code("b557ba3cf03add5e")
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. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:27Z. 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

torch.manual_seed(0)

# Create small training data tensor
# Shape: (10 samples, 4 features)
train_data = torch.randn(10, 4)

# Create small training labels tensor
# Shape: (10 labels)
train_labels = torch.randint(0, 2, (10,))

# Create configurations dict with batch_size parameter
configurations = {
    'model_parameters': {
        'batch_size': 3
    }
}

ARGS = {
    'train_data': train_data,
    'train_labels': train_labels,
    'configurations': configurations
}
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 list — a list output has no array shape of its own; none is stated
Environment
image syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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_data Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Models/DeepModel_AutoMPG.py
code served (permissive licence) · get_code("fb8cc214bc192416")
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 os
import sys
import pandas as pd
import tempfile

# Create temporary directory and CSV files
temp_dir = tempfile.mkdtemp()

# Create train_data.csv
train_data = {
    'MPG': [18.0, 15.0, 18.0, 16.0, 17.0],
    'Cylinders': [8, 8, 8, 8, 8],
    'Displacement': [307.0, 350.0, 318.0, 304.0, 302.0],
    'Horsepower': [130.0, 165.0, 150.0, 150.0, 140.0],
    'Weight': [3504, 3693, 3436, 3520, 3461],
    'Acceleration': [12.0, 11.5, 11.0, 12.5, 10.8],
    'Model Year': [70, 70, 70, 70, 70],
    'Origin': [1, 1, 1, 1, 1]
}
train_df = pd.DataFrame(train_data)
train_df.index.name = 'index'
train_path = os.path.join(temp_dir, 'train_data.csv')
train_df.to_csv(train_path)

# Create test_data.csv
test_data = {
    'MPG': [24.0, 22.0],
    'Cylinders': [4, 4],
    'Displacement': [113.0, 140.0],
    'Horsepower': [95.0, 92.0],
    'Weight': [2372, 2408],
    'Acceleration': [15.0, 14.5],
    'Model Year': [81, 81],
    'Origin': [3, 3]
}
test_df = pd.DataFrame(test_data)
test_df.index.name = 'index'
test_path = os.path.join(temp_dir, 'test_data.csv')
test_df.to_csv(test_path)

# Build configurations dict
configurations = {
    'model_dir': temp_dir,
    'feature_names': ['Cylinders', 'Displacement', 'Horsepower', 'Weight', 'Acceleration', 'Model Year', 'Origin']
}

ARGS = {
    'configurations': configurations
}
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
readConfigurations Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Utils.py
code served (permissive licence) · get_code("ca8dfacbccad4fc4")
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 tempfile
import os

# Create a temporary config file with the required content
config_content = """name = test_benchmark
model_dir = /tmp/model_dir
feature_names = feature1,feature2,feature3
feature_types = numeric,numeric,numeric
layers = 3
monotonicity_direction = 1
re-run = 0
n_folds = 5
solve_separate = 1
number_of_epochs = 100
column_names = col1,col2,col3
column_types = type1,type2,type3
monotonic_indices = 0,1
indices = 0,2
mon_dir = 1,1
model_parameters = {'layer_size': [10, 20, 10], 'activation': 'relu'}
min_max_values = {'feature1': [0, 1], 'feature2': [0, 10]}
use_validation = True
"""

# Write to a temporary file
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    f.write(config_content)
    config_file_path = f.name

try:
    ARGS = {
        'config_file': config_file_path
    }
finally:
    # Clean up will happen after function execution
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
readModelConfigurations Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Utils.py
code served (permissive licence) · get_code("5c6c64fb9d5c3b45")
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 tempfile
import os

# Create a temporary config file with valid Python literal syntax
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, "test_config.txt")

with open(config_file, 'w') as f:
    f.write("learning_rate = 0.001\n")
    f.write("batch_size = 32\n")
    f.write("epochs = 10\n")
    f.write("hidden_dim = 128\n")
    f.write("dropout = 0.5\n")
    f.write("layers = [64, 128, 256]\n")
    f.write("use_cuda = False\n")
    f.write("model_name = 'transformer'\n")

ARGS = {
    'config_file': config_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
update_batch Ran
ran on a synthesized input
AishwaryaSivaraman/COMET/src/Models/DeepModel_AutoMPG.py
code served (permissive licence) · get_code("dc50c2c0ed7d0815")
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 SimpleModel. 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 tempfile
import os

# Create a minimal Keras-like model that satisfies the function's requirements
class SimpleModel:
    def __init__(self, layer_size=2):
        self.layer_size = layer_size
        self.layers = []
        # Create dummy layers with weights and biases
        for i in range(layer_size):
            self.layers.append(SimpleLayer(input_dim=4, output_dim=3))
    
    def fit(self, batch_data, batch_label, epochs=1, batch_size=32, validation_split=0.2, verbose=0):
        # Return a history object that the function doesn't actually use
        return {"loss": 0.5}

class SimpleLayer:
    def __init__(self, input_dim=4, output_dim=3):
        self.weights = np.random.randn(input_dim, output_dim).astype(np.float32)
        self.bias = np.random.randn(output_dim).astype(np.float32)
    
    def get_weights(self):
        return [self.weights, self.bias]

# Create temporary directory for saving weights
temp_dir = tempfile.mkdtemp()

# Construct arguments
model = SimpleModel(layer_size=2)
layer_size = 2
batch_data = np.random.randn(8, 4).astype(np.float32)  # 8 samples, 4 features
batch_label = np.random.randint(0, 2, (8, 1)).astype(np.float32)  # 8 labels
data_dir = temp_dir
batch_size = 4

ARGS = {
    "model": model,
    "layer_size": layer_size,
    "batch_data": batch_data,
    "batch_label": batch_label,
    "data_dir": data_dir,
    "batch_size": batch_size
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
evaluate_model Not yet run
unverified (harvested, no recorded run)
AishwaryaSivaraman/COMET/src/ModelCalls.py
code served (permissive licence) · get_code("357f326cc7f53e40")
How it ran

no invocation recorded.

getEnvelopeMetrics Not yet run
unverified (harvested, no recorded run)
AishwaryaSivaraman/COMET/src/Envelope.py
code served (permissive licence) · get_code("60d472e5ddd0c881")
How it ran

no invocation recorded.

getEnvelopeResult Not yet run
unverified (harvested, no recorded run)
AishwaryaSivaraman/COMET/src/Envelope.py
code served (permissive licence) · get_code("65b30414cc2195e5")
How it ran

no invocation recorded.

nn_encoding Not yet run
unverified (harvested, no recorded run)
AishwaryaSivaraman/COMET/src/Solver_OptiMathSat.py
code served (permissive licence) · get_code("31f33897c324b00c")
How it ran

no invocation recorded.

processLogFile Not yet run
unverified (harvested, no recorded run)
AishwaryaSivaraman/COMET/src/AnalysisUtils.py
code served (permissive licence) · get_code("837cc71177275abb")
How it ran

no invocation recorded.

verifier Not yet run
unverified (harvested, no recorded run)
AishwaryaSivaraman/COMET/src/Solver_OptiMathSat.py
code served (permissive licence) · get_code("964128c1f0039c12")
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

The widespread adoption of deep learning is often attributed to its automatic feature construction with minimal inductive bias. However, in many real-world tasks, the learned function is intended to satisfy domain-specific constraints. We focus on monotonicity constraints, which are common and require that the function's output increases with increasing values of specific input features. We develop a counterexample-guided technique to provably enforce monotonicity constraints at prediction time. Additionally, we propose a technique to use monotonicity as an inductive bias for deep learning. It works by iteratively incorporating monotonicity counterexamples in the learning process. Contrary to prior work in monotonic learning, we target general ReLU neural networks and do not further restrict the hypothesis space. We have implemented these techniques in a tool called COMET. Experiments on real-world datasets demonstrate that our approach achieves state-of-the-art results compared to existing monotonic learners, and can improve the model quality compared to those that were trained without taking monotonicity constraints into account.

For agents

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

get_harvested_code_for_paper("2006.08852")
get_code_for_paper("2006.08852")
have("2006.08852")

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

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

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

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

Connect an agent — have() is free.