SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.10875 · 2018

TensorFuzz: Debugging Neural Networks with Coverage-Guided Fuzzing

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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 7 have no contract verdict; 1 failure of our instrument; 4 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/1807.10875.json · badge: /api/ran/1807.10875.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
brain-research/tensorfuzz canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
dlshriver/tensorfuzz community (classifier label)
classifier basis not recorded on the link
7 ran · 4 no recorded run
FunctionStatusWhere it lives
all_logit_coverage_function Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/coverage_functions.py
code served (permissive licence) · get_code("fff6bfa97956f1cb")
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 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

# Create a small batch of logits
# Shape: (batch_size=2, features=4)
logits_batch = np.array([
    [1.5, -2.3, 0.8, -1.1],
    [-0.5, 3.2, -1.8, 0.9]
], dtype=np.float32)

# The function expects coverage_batches to be indexable and contain at least one element
# coverage_batches[0] is accessed in the function
coverage_batches = [logits_batch]

ARGS = {
    "coverage_batches": coverage_batches
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
do_basic_mutations Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/mutation_functions.py
code served (permissive licence) · get_code("662cd0653cfa5331")
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. 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 CorpusElement:
    def __init__(self, data, parent=None):
        self.data = data
        self.parent = parent
    
    def oldest_ancestor(self):
        current = self
        while current.parent is not None:
            current = current.parent
        return current, None

# Create a simple image (4D: batch=1, channels=3, height=4, width=5)
image = np.random.uniform(-0.5, 0.5, size=(1, 3, 4, 5)).astype(np.float32)
label = np.array([1], dtype=np.int32)

# Create a corpus element with image and label
corpus_element = CorpusElement([image, label])

# Create an ancestor corpus element for constraint testing
original_image = np.random.uniform(-0.5, 0.5, size=(1, 3, 4, 5)).astype(np.float32)
original_label = np.array([1], dtype=np.int32)
ancestor_element = CorpusElement([original_image, original_label])
corpus_element.parent = ancestor_element

ARGS = {
    "corpus_element": corpus_element,
    "mutations_count": 2,
    "constraint": 0.5,
    "a_min": -1.0,
    "a_max": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
metadata_function Ran
ran; our contract draft was wrong, not the code
brain-research/tensorfuzz/examples/dcgan/dcgan_fuzzer.py
code served (permissive licence) · get_code("0a8e1fe36f7ef1b3")
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) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects metadata_batches to be a tuple of (loss_batch, grad_batch)
# where loss_batch and grad_batch are tensors with a .shape[0] attribute
# and support indexing

loss_batch = torch.randn(2, 4)  # batch size 2, 4 features
grad_batch = torch.randn(2, 3)  # batch size 2, 3 features (distinct from loss)

metadata_batches = (loss_batch, grad_batch)

ARGS = {
    'metadata_batches': metadata_batches
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
raw_logit_coverage_function Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/coverage_functions.py
code served (permissive licence) · get_code("0b7efaa224c7baae")
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 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

# Construct a small batch of logits
# The function expects coverage_batches[0] to be a numpy array
# It iterates over the first dimension and builds a list
coverage_batch = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "coverage_batches": [coverage_batch]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
read32 Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/dataset.py
code served (permissive licence) · get_code("614450805ad8930b")
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 uint32, ndim 0, dtype family int, 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
import io

# Create a BytesIO object that acts as a bytestream
# containing 4 bytes that will be interpreted as an unsigned 32-bit integer
bytestream = io.BytesIO()
# Write a 32-bit unsigned integer (value 42) in big-endian format
bytestream.write(np.uint32(42).tobytes()[::-1])  # Reverse to big-endian
bytestream.seek(0)  # Reset to beginning so read() starts from the start

ARGS = {
    'bytestream': bytestream
}
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 uint32, ndim 0, dtype family int, 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
recent_sample_function Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/sample_functions.py
code served (permissive licence) · get_code("32a0c2d51e97db34")
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 CorpusElement. 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 random

class CorpusElement:
    def __init__(self, value):
        self.value = value
    
    def __repr__(self):
        return f"CorpusElement({self.value})"

class InputCorpus:
    def __init__(self, corpus):
        self.corpus = corpus

# Create a small corpus with distinct CorpusElement objects
corpus_elements = [
    CorpusElement("element_0"),
    CorpusElement("element_1"),
    CorpusElement("element_2"),
    CorpusElement("element_3"),
    CorpusElement("element_4"),
    CorpusElement("element_5"),
    CorpusElement("element_6"),
    CorpusElement("element_7"),
]

input_corpus = InputCorpus(corpus_elements)

ARGS = {
    "input_corpus": input_corpus
}
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 CorpusElement — a CorpusElement output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CorpusElement 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
seed_corpus_from_numpy_arrays Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/corpus.py
code served (permissive licence) · get_code("63f01cf6db93ebf5")
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 numpy as np

class CorpusElement(object):
    """Class representing a single element of a corpus."""

    def __init__(self, data, metadata, coverage, parent):
        self.data = data
        self.metadata = metadata
        self.parent = parent
        self.coverage = coverage

    def oldest_ancestor(self):
        """Returns the least recently created ancestor of this corpus item."""
        current_element = self
        generations = 0
        while current_element.parent is not None:
            current_element = current_element.parent
            generations += 1
        return (current_element, generations)

def seed_corpus_from_numpy_arrays(numpy_arrays, coverage_function, metadata_function, fetch_function):
    """Constructs a seed_corpus given numpy_arrays."""
    seed_corpus = []
    for input_array_list in numpy_arrays:
        input_batches = []
        for input_array in input_array_list:
            input_batches.append(np.expand_dims(input_array, axis=0))
        coverage_batches, metadata_batches = fetch_function(input_batches)
        coverage_list = coverage_function(coverage_batches)
        metadata_list = metadata_function(metadata_batches)
        new_element = CorpusElement(input_array_list, metadata_list[0], coverage_list[0], None)
        seed_corpus.append(new_element)
    return seed_corpus

# Setup code
numpy_arrays = [
    [np.random.randn(4, 3).astype(np.float32), np.random.randn(5, 2).astype(np.float32)],
    [np.random.randn(4, 3).astype(np.float32), np.random.randn(5, 2).astype(np.float32)],
]

def coverage_function(coverage_batches):
    # Returns a list of coverage objects, one per batch element
    return [f"coverage_{i}" for i in range(len(coverage_batches))]

def metadata_function(metadata_batches):
    # Returns a list of metadata objects, one per batch element
    return [{"info": f"metadata_{i}"} for i in range(len(metadata_batches))]

def fetch_function(input_batches):
    # Simulates fetching coverage and metadata from a runtime
    # input_batches is a list of batched arrays
    batch_size = input_batches[0].shape[0]
    coverage_batches = np.random.randn(batch_size, 6).astype(np.float32)
    metadata_batches = np.random.randn(batch_size, 8).astype(np.float32)
    return coverage_batches, metadata_batches

ARGS = {
    "numpy_arrays": numpy_arrays,
    "coverage_function": coverage_function,
    "metadata_function": metadata_function,
    "fetch_function": fetch_function,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family 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
uniform_sample_function Ran
ran on a synthesized input
dlshriver/tensorfuzz/tensorfuzz/sample_functions.py
code served (permissive licence) · get_code("f72e38544e9a194e")
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 CorpusElement. 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 random
import torch

# Define a CorpusElement class as a simple stand-in
class CorpusElement:
    def __init__(self, text):
        self.text = text
    
    def __repr__(self):
        return f"CorpusElement(text='{self.text}')"

# Define an InputCorpus class with a corpus attribute
class InputCorpus:
    def __init__(self, corpus):
        self.corpus = corpus

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

# Create sample corpus elements
corpus_elements = [
    CorpusElement("sample text 1"),
    CorpusElement("sample text 2"),
    CorpusElement("sample text 3"),
    CorpusElement("sample text 4"),
]

# Create the InputCorpus object
input_corpus = InputCorpus(corpus=corpus_elements)

# Define ARGS mapping
ARGS = {
    "input_corpus": input_corpus,
}
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 CorpusElement — a CorpusElement output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CorpusElement 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
build_feed_dict Not yet run
unverified (harvested, no recorded run)
dlshriver/tensorfuzz/tensorfuzz/fuzz_utils.py
code served (permissive licence) · get_code("f0c844600ff3617f")
How it ran

no invocation recorded.

dataset Not yet run
unverified (harvested, no recorded run)
dlshriver/tensorfuzz/tensorfuzz/dataset.py
code served (permissive licence) · get_code("164f1de8053b6538")
How it ran

no invocation recorded.

download Not yet run
unverified (harvested, no recorded run)
dlshriver/tensorfuzz/tensorfuzz/dataset.py
code served (permissive licence) · get_code("0d65e022d1e2371e")
How it ran

no invocation recorded.

get_tensors_from_checkpoint Not yet run
unverified (harvested, no recorded run)
dlshriver/tensorfuzz/tensorfuzz/fuzz_utils.py
code served (permissive licence) · get_code("01e04256351ed81e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 11 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
download 2 other papers
1 dated earlier, 1 later
1406.2572 (2014-06)
Identifying and attacking the saddle point problem in high-dimensional non-convex optimization
1904.01569 (2019-04)
Exploring Randomly Wired Neural Networks for Image Recognition

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

Machine learning models are notoriously difficult to interpret and debug. This is particularly true of neural networks. In this work, we introduce automated software testing techniques for neural networks that are well-suited to discovering errors which occur only for rare inputs. Specifically, we develop coverage-guided fuzzing (CGF) methods for neural networks. In CGF, random mutations of inputs to a neural network are guided by a coverage metric toward the goal of satisfying user-specified constraints. We describe how fast approximate nearest neighbor algorithms can provide this coverage metric. We then discuss the application of CGF to the following goals: finding numerical errors in trained neural networks, generating disagreements between neural networks and quantized versions of those networks, and surfacing undesirable behavior in character level language models. Finally, we release an open source library called TensorFuzz that implements the described techniques.

For agents

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

get_harvested_code_for_paper("1807.10875")
get_code_for_paper("1807.10875")
have("1807.10875")

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

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

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

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

Connect an agent — have() is free.