SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.16005 · NeurIPS · 2023

MLFMF: Data Sets for Machine Learning for Mathematical Formalization

Andrej Bauer, Matej Petković, Ljupčo Todorovski

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2310.16005.json · badge: /api/ran/2310.16005.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
ul-fmf/mlfmf-data canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
eliorc/node2vec canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
FunctionStatusWhere it lives
load_entries Ran
ran; our contract draft was wrong, not the code
ul-fmf/mlfmf-data/light_weight_data_loader.py
code served (permissive licence) · get_code("b62bba421eb2c1ca")
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 tempfile
import os

# Create a temporary directory with test .dag files
temp_dir = tempfile.mkdtemp()

# Create a simple test .dag file
# Format: node_id\tnode_type\tnode_description\tchildren_ids
dag_content = """id\ttype\tdescription\tchildren
0\t:root\tRoot Node\t[1, 2]
1\t:name\tEntry Name\t[3]
2\t:category\tCategory\t[4]
3\t:item\tItem 1\t[]
4\t:item\tItem 2\t[]
"""

dag_file = os.path.join(temp_dir, "test_entry.dag")
with open(dag_file, 'w', encoding='utf-8') as f:
    f.write(dag_content)

# Create another test file to ensure multiple entries are loaded
dag_content2 = """id\ttype\tdescription\tchildren
0\t:root\tRoot Node 2\t[1]
1\t:name\tEntry Name 2\t[]
"""

dag_file2 = os.path.join(temp_dir, "test_entry2.dag")
with open(dag_file2, 'w', encoding='utf-8') as f:
    f.write(dag_content2)

ARGS = {
    'entry_dir': temp_dir,
    'optimized': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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
load_entry Ran
ran; our contract draft was wrong, not the code
ul-fmf/mlfmf-data/light_weight_data_loader.py
code served (permissive licence) · get_code("cf6710c9a0d5d184")
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 Entry. 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 entry file for testing
temp_dir = tempfile.mkdtemp()
entry_file = os.path.join(temp_dir, "test_entry.txt")

# Create a valid entry file with tab-separated values
# Format: node_id\tnode_type\tnode_description\tnode_children
with open(entry_file, 'w', encoding='utf-8') as f:
    f.write("id\ttype\tdescription\tchildren\n")
    # Root node (id=0) with children [1, 2]
    f.write("0\t:root\troot_desc\t[1, 2]\n")
    # Child node 1 (id=1) with child [3]
    f.write("1\t:branch\tbranch1\t[3]\n")
    # Child node 2 (id=2) with no children
    f.write("2\t:name\tentry_name\t[]\n")
    # Grandchild node 3 (id=3) with no children
    f.write("3\t:leaf\tleaf_desc\t[]\n")

ARGS = {
    "entry_file": entry_file,
    "optimized": False
}
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 Entry — a Entry output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Entry 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
parallel_generate_walks Ran
ran; our contract draft was wrong, not the code
eliorc/node2vec/node2vec/parallel.py
code served (permissive licence) · get_code("2677dd8e78ce9f62")
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 random
from collections import defaultdict

# Set seed for reproducibility
random.seed(0)

# Construct d_graph: a dict where each node maps to a dict containing:
# - 'neighbors': list of neighbor nodes
# - 'first_travel_key': probabilities for first step
# - 'probabilities_key': dict mapping previous nodes to probability distributions
d_graph = {
    'node_0': {
        'neighbors': ['node_1', 'node_2'],
        'first_travel_key': [0.5, 0.5],
        'transition_probs': {
            'node_1': [0.3, 0.7],
            'node_2': [0.6, 0.4],
        }
    },
    'node_1': {
        'neighbors': ['node_0', 'node_2'],
        'first_travel_key': [0.4, 0.6],
        'transition_probs': {
            'node_0': [0.5, 0.5],
            'node_2': [0.2, 0.8],
        }
    },
    'node_2': {
        'neighbors': ['node_0', 'node_1'],
        'first_travel_key': [0.7, 0.3],
        'transition_probs': {
            'node_0': [0.4, 0.6],
            'node_1': [0.9, 0.1],
        }
    },
}

# Construct sampling_strategy: for each source node, specify walk parameters
sampling_strategy = {
    'node_0': {
        'num_walks': 2,
        'walk_length': 4,
    },
    'node_1': {
        'num_walks': 1,
        'walk_length': 3,
    },
}

ARGS = {
    'd_graph': d_graph,
    'global_walk_length': 5,
    'num_walks': 2,
    'cpu_num': 1,
    'sampling_strategy': sampling_strategy,
    'num_walks_key': 'num_walks',
    'walk_length_key': 'walk_length',
    'neighbors_key': 'neighbors',
    'probabilities_key': 'transition_probs',
    'first_travel_key': 'first_travel_key',
    'quiet': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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
load_entry_optimized Not yet run
unverified (harvested, no recorded run)
ul-fmf/mlfmf-data/light_weight_data_loader.py
code served (permissive licence) · get_code("55319c3a809b2006")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 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 4 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-21.

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 introduce MLFMF, a collection of data sets for benchmarking recommendation systems used to support formalization of mathematics with proof assistants. These systems help humans identify which previous entries (theorems, constructions, datatypes, and postulates) are relevant in proving a new theorem or carrying out a new construction. Each data set is derived from a library of formalized mathematics written in proof assistants Agda or Lean. The collection includes the largest Lean 4 library Mathlib, and some of the largest Agda libraries: the standard library, the library of univalent mathematics Agda-unimath, and the TypeTopology library. Each data set represents the corresponding library in two ways: as a heterogeneous network, and as a list of s-expressions representing the syntax trees of all the entries in the library. The network contains the (modular) structure of the library and the references between entries, while the s-expressions give complete and easily parsed information about every entry. We report baseline results using standard graph and word embeddings, tree ensembles, and instance-based learning algorithms. The MLFMF data sets provide solid benchmarking support for further investigation of the numerous machine learning approaches to formalized mathematics. The methodology used to extract the networks and the s-expressions readily applies to other libraries, and is applicable to other proof assistants. With more than 250 000 entries in total, this is currently the largest collection of formalized mathematical knowledge in machine learnable format.

For agents

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

get_harvested_code_for_paper("2310.16005")
get_code_for_paper("2310.16005")
have("2310.16005")

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

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

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

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

Connect an agent — have() is free.