SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1810.04374 · 2018

On the Approximation Properties of Random ReLU Features

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1810.04374.json · badge: /api/ran/1810.04374.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
syitong/randrelu canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
gamma_est Ran
ran on a synthesized input
syitong/randrelu/depth_sep/librf.py
code served (permissive licence) · get_code("3f03fa3888a0173c")
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 float32, 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

# Create a small numpy array with distinct dimensions
# Shape: (5, 3) - 5 data points in 3D space
X = np.random.randn(5, 3).astype(np.float32)

# Define the arguments dictionary
ARGS = {
    "X": X,
    "portion": 0.3
}
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 float32, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_train_test_data Ran
ran; our contract draft was wrong, not the code
syitong/randrelu/depth_sep/libmnist.py
code served (permissive licence) · get_code("4d56f8ece9741bf8")
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
from sklearn.preprocessing import StandardScaler
import os
import tempfile
import struct

# Create temporary directory and mock MNIST files
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, 'data'), exist_ok=True)

# Create mock train-images.idx3-ubyte file
# Format: magic number (4 bytes), num images (4 bytes), num rows (4 bytes), num cols (4 bytes), then image data
train_images_path = os.path.join(temp_dir, 'data', 'train-images.idx3-ubyte')
with open(train_images_path, 'wb') as f:
    # Magic number for images: 0x00000803 (3 = 3D array, 08 = unsigned byte)
    f.write(struct.pack('>I', 0x00000803))
    # Number of images: 100
    f.write(struct.pack('>I', 100))
    # Number of rows: 28
    f.write(struct.pack('>I', 28))
    # Number of columns: 28
    f.write(struct.pack('>I', 28))
    # Image data (100 * 28 * 28 = 78400 bytes)
    image_data = np.random.randint(0, 256, 100 * 28 * 28, dtype=np.uint8)
    f.write(image_data.tobytes())

# Create mock train-labels.idx1-ubyte file
train_labels_path = os.path.join(temp_dir, 'data', 'train-labels.idx1-ubyte')
with open(train_labels_path, 'wb') as f:
    # Magic number for labels: 0x00000801 (1 = 1D array)
    f.write(struct.pack('>I', 0x00000801))
    # Number of labels: 100
    f.write(struct.pack('>I', 100))
    # Label data
    label_data = np.random.randint(0, 10, 100, dtype=np.uint8)
    f.write(label_data.tobytes())

# Create mock test-images.idx3-ubyte file
test_images_path = os.path.join(temp_dir, 'data', 't10k-images.idx3-ubyte')
with open(test_images_path, 'wb') as f:
    f.write(struct.pack('>I', 0x00000803))
    f.write(struct.pack('>I', 20))
    f.write(struct.pack('>I', 28))
    f.write(struct.pack('>I', 28))
    image_data = np.random.randint(0, 256, 20 * 28 * 28, dtype=np.uint8)
    f.write(image_data.tobytes())

# Create mock test-labels.idx1-ubyte file
test_labels_path = os.path.join(temp_dir, 'data', 't10k-labels.idx1-ubyte')
with open(test_labels_path, 'wb') as f:
    f.write(struct.pack('>I', 0x00000801))
    f.write(struct.pack('>I', 20))
    label_data = np.random.randint(0, 10, 20, dtype=np.uint8)
    f.write(label_data.tobytes())

# Change to temp directory so relative paths work
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'train_size': 50,
    'test_size': 10,
}
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
mollify Ran
ran on a synthesized input
syitong/randrelu/depth_sep/generate_data.py
code served (permissive licence) · get_code("f46af98a4d946ad1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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

class MockMol:
    def __init__(self):
        self.a = 8
        self.min_gap = 2.0
        self.value = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.4, 0.3, 0.2, 0.1, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75])

idx_list = [2, 5, 10]
g = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0])
mol = MockMol()

ARGS = {
    "idx_list": idx_list,
    "g": g,
    "mol": mol,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
print_params Ran
ran on a synthesized input
syitong/randrelu/depth_sep/result_show.py
code served (permissive licence) · get_code("cf5a764013dc7b9e")
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 tempfile
import os

# Create a temporary file with valid content that print_params will read
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_filename = temp_file.name

# The file should contain a tuple: (result, params)
# result is a list of lists where first row is headers, subsequent rows are data
# params is a dict with at least 'task' key

result = [
    ['Method', 'logGamma_1', 'logGamma_2', 'logGamma_3'],
    ['lograte_1', 0.5, 0.3, 0.8],
    ['lograte_2', 0.6, 0.2, 0.9],
    ['lograte_3', 0.7, 0.1, 0.4]
]

params = {
    'task': 'classification',
    'learning_rate': 0.001,
    'batch_size': 32,
    'nested': {
        'param1': 10,
        'param2': 20
    }
}

# Write the tuple as a string representation to the file
content = f"({result}, {params})"
temp_file.write(content)
temp_file.close()

ARGS = {
    'filename': temp_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, 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
print_test_results Ran
ran on a synthesized input
syitong/randrelu/depth_sep/result_show.py
code served (permissive licence) · get_code("1484361003ebf8c8")
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 file with test results
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False)

# Construct the data that will be written to the file
result = {
    'accuracy': 0.95,
    'loss': 0.05,
    'nested_metrics': {
        'precision': 0.92,
        'recall': 0.88
    }
}

model_params = {
    'layers': 3,
    'hidden_dim': 128,
    'architecture': {
        'activation': 'relu',
        'dropout': 0.1
    }
}

fit_params = {
    'epochs': 10,
    'batch_size': 32,
    'optimizer': {
        'name': 'adam',
        'lr': 0.001
    }
}

# Write the tuple representation to the temp file
file_content = repr((result, None, model_params, fit_params))
temp_file.write(file_content)
temp_file.close()

ARGS = {
    'filename': temp_file.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 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
read_MNIST_data Ran
ran, honoured the contract we drafted
syitong/randrelu/depth_sep/libmnist.py
code served (permissive licence) · get_code("39db295096d110b1")
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 2, dtype family float, shape (5, 784) 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 struct
import tempfile
import os

# Create a minimal valid MNIST-like binary file
def create_mnist_like_file():
    """Create a minimal MNIST-like binary file for testing"""
    with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.bin') as f:
        filepath = f.name
        
        # MNIST magic number format: 4 bytes
        # Byte 0-1: always 0
        # Byte 2: data type (8=unsigned byte, 9=signed byte, 10=short, etc.)
        # Byte 3: number of dimensions
        magic = bytearray([0, 0, 8, 2])  # 8 = unsigned byte, 2 dimensions
        
        # Write magic
        f.write(magic)
        
        # Write dimension sizes (big-endian 4-byte integers)
        num_samples = 10
        sample_size = 28 * 28  # MNIST-like
        f.write(struct.pack('>I', num_samples))  # First dimension
        f.write(struct.pack('>I', sample_size))  # Second dimension
        
        # Write data: num_samples * sample_size bytes
        data = np.random.randint(0, 256, size=(num_samples, sample_size), dtype=np.uint8)
        f.write(data.tobytes())
        
        return filepath

# Create the test file
test_filepath = create_mnist_like_file()

# Define arguments
ARGS = {
    'filepath': test_filepath,
    'obs': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 784) — shape (5, 784) 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
read_params Ran
ran on a synthesized input
syitong/randrelu/depth_sep/experiments.py
code served (permissive licence) · get_code("fcfe2c47d08ce41c")
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 file with valid Python dict content
temp_dir = tempfile.mkdtemp()
params_file = os.path.join(temp_dir, 'params')

# Write a valid params file
with open(params_file, 'w') as f:
    f.write("{'learning_rate': 0.001, 'batch_size': 32, 'epochs': 10}")

ARGS = {
    'filename': params_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
validate Ran
ran on a synthesized input
syitong/randrelu/depth_sep/experiments.py
code served (permissive licence) · get_code("880bb8bd1dc9f8c3")
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 numpy as np
from sklearn.linear_model import LogisticRegression

# Create sample data
np.random.seed(0)
n_samples = 20
n_features = 4
data = np.random.randn(n_samples, n_features).astype(np.float32)
labels = np.random.randint(0, 2, n_samples)

# Define a minimal model class that has fit() and score() methods
class MinimalModel:
    def __init__(self, param1=1):
        self.param1 = param1
        self.coef_ = None
    
    def fit(self, X, y, **kwargs):
        # Simple fit: just store the mean
        self.coef_ = np.mean(X, axis=0)
        return self
    
    def score(self, X, y):
        # Simple score: random accuracy between 0 and 1
        return np.random.rand()

ARGS = {
    "data": data,
    "labels": labels,
    "val_size": 15,
    "model_type": MinimalModel,
    "model_params": {"param1": 42},
    "fit_params": {},
    "folds": 5,
    "holdout": True,
}
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 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
validate Ran
ran on a synthesized input
syitong/randrelu/pycode/experiments.py
code served (permissive licence) · get_code("c0b8a1ed11eed7c1")
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 numpy as np
from functools import partial


class SimpleModel:
    """Minimal sklearn-like model for testing"""
    def __init__(self, param1=1):
        self.param1 = param1
        self.coef_ = None
    
    def fit(self, X, y, epochs=1):
        # Simple fit: just store mean of data
        self.coef_ = np.mean(X, axis=0)
        return self
    
    def score(self, X, y):
        # Simple score: return correlation-like metric
        pred = X @ self.coef_
        return float(np.corrcoef(pred, y)[0, 1]) if len(pred) > 1 else 0.5


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

# Create small dataset: 20 samples, 4 features
data = np.random.randn(20, 4).astype(np.float32)
labels = np.random.randint(0, 2, 20)

# Define arguments for validate function
ARGS = {
    "data": data,
    "labels": labels,
    "val_size": 16,
    "model_type": SimpleModel,
    "model_params": {"param1": 2},
    "fit_params": {"epochs": 5},
    "folds": 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 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
clip_by_maxnorm Not yet run
unverified (harvested, no recorded run)
syitong/randrelu/depth_sep/librf.py
code served (permissive licence) · get_code("289b03842b400880")
How it ran

no invocation recorded.

mkdir Not yet run
unverified (harvested, no recorded run)
syitong/randrelu/depth_sep/lib/utils.py
code served (permissive licence) · get_code("d6b9558bc0e2c5a9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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
get_train_test_data 1 other paper
1 dated earlier
1809.04481 (2018-09)
But How Does It Work in Theory? Linear SVM with Random Features
read_MNIST_data 1 other paper
1 dated earlier
1809.04481 (2018-09)
But How Does It Work in Theory? Linear SVM with Random Features

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

We study the approximation properties of random ReLU features through their reproducing kernel Hilbert space (RKHS). We first prove a universality theorem for the RKHS induced by random features whose feature maps are of the form of nodes in neural networks. The universality result implies that the random ReLU features method is a universally consistent learning algorithm. We prove that despite the universality of the RKHS induced by the random ReLU features, composition of functions in it generates substantially more complicated functions that are harder to approximate than those functions simply in the RKHS. We also prove that such composite functions can be efficiently approximated by multi-layer ReLU networks with bounded weights. This depth separation result shows that the random ReLU features models suffer from the same weakness as that of shallow models. We show in experiments that the performance of random ReLU features is comparable to that of random Fourier features and, in general, has a lower computational cost. We also demonstrate that when the target function is the composite function as described in the depth separation theorem, 3-layer neural networks indeed outperform both random ReLU features and 2-layer neural networks.

For agents

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

get_harvested_code_for_paper("1810.04374")
get_code_for_paper("1810.04374")
have("1810.04374")

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

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

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

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

Connect an agent — have() is free.