SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.04481 · 2018

But How Does It Work in Theory? Linear SVM with Random Features

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/1809.04481.json · badge: /api/ran/1809.04481.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/randfourier canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
FunctionStatusWhere it lives
get_train_test_data Ran
ran; our contract draft was wrong, not the code
syitong/randfourier/mnist/Mnist.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
read_MNIST_data Ran
ran, honoured the contract we drafted
syitong/randfourier/mnist/Mnist.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
unit_circle Ran
ran; our contract draft was wrong, not the code
syitong/randfourier/syndata/datagen.py
code served (permissive licence) · get_code("ba59a6df9422e159")
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

ARGS = {
    'datarange': 0.3,
    'overlap': 0.5,
    'samplesize': 10
}
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 — 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
unit_circle_ideal Ran
ran; our contract draft was wrong, not the code
syitong/randfourier/syndata/datagen.py
code served (permissive licence) · get_code("1b759e82eff1465b")
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(42)

# Define arguments for unit_circle_ideal function
ARGS = {
    "gap": 0.5,           # gap parameter controlling the annulus width
    "label_prob": 0.8,    # probability for label assignment
    "samplesize": 10      # number of samples to generate
}
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 — 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
unit_interval Ran
ran, honoured the contract we drafted
syitong/randfourier/syndata/datagen.py
code served (permissive licence) · get_code("b07ded9753f86907")
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 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    'leftend': 0.2,
    'rightend': 0.7,
    'samplesize': 100
}
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 2, 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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 later
1810.04374 (2018-10)
On the Approximation Properties of Random ReLU Features
read_MNIST_data 1 other paper
1 later
1810.04374 (2018-10)
On the Approximation Properties of Random ReLU 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 prove that, under low noise assumptions, the support vector machine with $N\ll m$ random features (RFSVM) can achieve the learning rate faster than $O(1/\sqrt{m})$ on a training set with $m$ samples when an optimized feature map is used. Our work extends the previous fast rate analysis of random features method from least square loss to 0-1 loss. We also show that the reweighted feature selection method, which approximates the optimized feature map, helps improve the performance of RFSVM in experiments on a synthetic data set.

For agents

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

get_harvested_code_for_paper("1809.04481")
get_code_for_paper("1809.04481")
have("1809.04481")

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

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

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

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

Connect an agent — have() is free.