SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.02486 · 2021

Towards General Natural Language Understanding with Probabilistic Worldbuilding

arXiv · PDF · Open in the Atlas

Code that ran

8 of 14 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, 3 violated it and 0 have no contract verdict; 4 failures of our instrument; 6 no recorded run), measured 2026-11-21; 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/2105.02486.json · badge: /api/ran/2105.02486.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
asaparov/fictionalgeoqa canonical (classifier label)
classifier basis: census
8 ran · 6 no recorded run
FunctionStatusWhere it lives
get_free_variables Ran
ran; our contract draft was wrong, not the code
asaparov/fictionalgeoqa/drs.py
code served (permissive licence) · get_code("4aed7938784d3c59")
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 set. 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 torch.nn as nn
from typing import List, Set

torch.manual_seed(0)

# Define the DRS-related classes as provided
class DRSCondition(object):
    def __init__(self):
        return

class DRSTerm(object):
    def __init__(self):
        return

    def visit(self, visit):
        return

class DRSReference(DRSTerm):
    def __init__(self, referent_id):
        self.referent_id = referent_id

    def __eq__(self, other):
        return type(other) == DRSReference and self.referent_id == other.referent_id

    def __ne__(self, other):
        return type(other) != DRSReference or self.referent_id != other.referent_id

class DRSImplication(DRSCondition):
    def __init__(self, antecedent, consequent):
        self.antecedent = antecedent
        self.consequent = consequent

    def visit(self, visit):
        visit(self.antecedent)
        visit(self.consequent)

    def substitute(self, map):
        self.antecedent.substitute(map)
        self.consequent.substitute(map)

class DRS(object):
    def __init__(self, referents, conditions, presuppositions, parent):
        self.referents = referents
        self.conditions = conditions
        self.presuppositions = presuppositions
        self.parent = parent

    def visit(self, visit):
        for presupposition in self.presuppositions:
            visit(presupposition)
        for condition in self.conditions:
            visit(condition)

    def empty(self):
        return len(self.conditions) == 0 and len(self.presuppositions) == 0

    def substitute(self, map):
        for condition in self.conditions:
            condition.substitute(map)
        for presupposition in self.presuppositions:
            presupposition.substitute(map)

def get_declared_variables(drs):
    variables = list(drs.referents)
    for presupposition in drs.presuppositions:
        variables.extend(get_declared_variables(presupposition))
    return variables

def get_free_variables(drs):
    declared_referents = []
    free_variables = set()

    def visit(exp):
        nonlocal declared_referents
        if type(exp) == DRS:
            old_len = len(declared_referents)
            declared_referents.extend(get_declared_variables(exp))
            for presupposition in exp.presuppositions:
                presupposition.visit(visit)
            for condition in exp.conditions:
                visit(condition)
            declared_referents = declared_referents[:old_len]
        elif type(exp) == DRSReference:
            if exp.referent_id not in declared_referents:
                free_variables.add(exp.referent_id)
        elif type(exp) == DRSImplication:
            old_len = len(declared_referents)
            declared_referents.extend(get_declared_variables(exp.antecedent))
            exp.visit(visit)
            declared_referents = declared_referents[:old_len]
        else:
            exp.visit(visit)
    visit(drs)
    return free_variables

# Create a simple DRS structure to test the function
# Create referents
referents = ['x', 'y', 'z']

# Create some conditions with references
ref_x = DRSReference('x')
ref_free = DRSReference('w')  # free variable

# Create a simple condition class that has a visit method
class SimpleCondition(DRSCondition):
    def __init__(self, reference):
        self.reference = reference
    
    def visit(self, visit_func):
        visit_func(self.reference)
    
    def substitute(self, map):
        pass

conditions = [SimpleCondition(ref_x), SimpleCondition(ref_free)]

# Create presuppositions - nested DRS
nested_referents = ['a', 'b']
nested_ref = DRSReference('c')  # free in nested context
nested_condition = SimpleCondition(nested_ref)
nested_drs = DRS(nested_referents, [nested_condition], [], None)

presuppositions = [nested_drs]

# Create the main DRS
parent_drs = None
main_drs = DRS(referents, conditions, presuppositions, parent_drs)

ARGS = {
    'drs': main_drs
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
is_var_declared Ran
ran, violated the contract we drafted
asaparov/fictionalgeoqa/drs.py
code served (permissive licence) · get_code("bfd24c92f563b40d")
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.

class MockDRS:
    def __init__(self, referents=None, presuppositions=None):
        self.referents = referents if referents is not None else set()
        self.presuppositions = presuppositions if presuppositions is not None else []

# Create a simple DRS structure for testing
# Test case 1: variable declared in referents
drs_with_var = MockDRS(
    referents={'x', 'y', 'z'},
    presuppositions=[]
)

# Test case 2: variable in nested presuppositions
nested_drs = MockDRS(
    referents={'a', 'b'},
    presuppositions=[]
)

parent_drs = MockDRS(
    referents={'c'},
    presuppositions=[nested_drs]
)

# Test case 3: deeply nested presuppositions
deeply_nested = MockDRS(
    referents={'deep_var'},
    presuppositions=[]
)

mid_level = MockDRS(
    referents={'mid_var'},
    presuppositions=[deeply_nested]
)

top_level = MockDRS(
    referents={'top_var'},
    presuppositions=[mid_level]
)

# Use the first test case: looking for 'x' in drs_with_var
ARGS = {
    'drs': drs_with_var,
    'var': 'x'
}
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
isfloat Ran
ran, violated the contract we drafted
asaparov/fictionalgeoqa/run_boxer.py
code served (permissive licence) · get_code("2f8e524a282482b9")
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 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 torch

torch.manual_seed(0)

ARGS = {
    "value": "3.14"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
line_split Ran
ran; our contract draft was wrong, not the code
asaparov/fictionalgeoqa/drs.py
code served (permissive licence) · get_code("d1627808332b9f0f")
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 re

def line_split(line):
    return re.findall('[^"\\s]\\S*|".+?"', line)

# The function takes a single parameter 'line' which should be a string
# It uses re.findall to split the line by whitespace while respecting quoted strings

ARGS = {
    'line': 'hello world "quoted string" another'
}
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
max_variable Ran
ran, honoured the contract we drafted
asaparov/fictionalgeoqa/fol.py
code served (permissive licence) · get_code("e387ba048ca4dca1")
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 int, 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 torch
import numpy as np

class FOLFormula(object):
    def __init__(self):
        return

class FOLForAll(FOLFormula):
    def __init__(self, variable, operand):
        self.variable = variable
        self.operand = operand

    def __eq__(self, other):
        if type(other) != FOLForAll:
            return False
        return self.variable == other.variable and self.operand == other.operand

    def __ne__(self, other):
        if type(other) != FOLForAll:
            return True
        return self.variable != other.variable or self.operand != other.operand

    def apply(self, func):
        return FOLForAll(self.variable, func(self.operand))

    def visit(self, visit):
        visit(self.operand)

class FOLExists(FOLFormula):
    def __init__(self, variable, operand):
        self.variable = variable
        self.operand = operand

    def __eq__(self, other):
        if type(other) != FOLExists:
            return False
        return self.variable == other.variable and self.operand == other.operand

    def __ne__(self, other):
        if type(other) != FOLExists:
            return True
        return self.variable != other.variable or self.operand != other.operand

    def apply(self, func):
        return FOLExists(self.variable, func(self.operand))

    def visit(self, visit):
        visit(self.operand)

class FOLTerm(object):
    def __init__(self):
        return

class FOLVariable(FOLTerm):
    def __init__(self, variable):
        self.variable = variable

    def __eq__(self, other):
        if type(other) != FOLVariable:
            return False
        return self.variable == other.variable

    def __ne__(self, other):
        if type(other) != FOLVariable:
            return True
        return self.variable != other.variable

    def apply(self, func):
        return FOLVariable(self.variable)

    def visit(self, visit):
        return

def max_variable(formula):
    max_var = 0

    def max_variable_visit(f):
        nonlocal max_var
        if type(f) == FOLVariable or type(f) == FOLForAll or type(f) == FOLExists:
            max_var = max(max_var, f.variable)
        f.visit(max_variable_visit)
    formula.visit(max_variable_visit)
    return max_var

# Construct test arguments
var1 = FOLVariable(3)
var2 = FOLVariable(5)
formula = FOLForAll(7, FOLExists(2, var1))

ARGS = {
    "formula": formula
}
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 int, 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
number_symbol Ran
ran; our contract draft was wrong, not the code
asaparov/fictionalgeoqa/run_thm_prover.py
code served (permissive licence) · get_code("da98c9c9bf67c4c7")
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

torch.manual_seed(0)

def number_symbol(num):
    return 'num' + str(num).replace('.', '_')

ARGS = {
    'num': 42
}
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 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
substitute Ran
ran; our contract draft was wrong, not the code
asaparov/fictionalgeoqa/fol.py
code served (permissive licence) · get_code("c2b629a510d86b77")
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 Formula. 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 torch.nn as nn

# Define a simple formula class that has an apply method
class Formula:
    def __init__(self, value):
        self.value = value
    
    def apply(self, func):
        # Apply the function to self and return result
        return func(self)
    
    def __eq__(self, other):
        if isinstance(other, Formula):
            return self.value == other.value
        return False
    
    def __repr__(self):
        return f"Formula({self.value})"

# Create source and destination formulas
src = Formula("x")
dst = Formula("y")

# Create a formula tree structure
formula = Formula("x")

ARGS = {
    "formula": formula,
    "src": src,
    "dst": dst
}
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 Formula — a Formula output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Formula 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
test_candidate Ran
ran, violated the contract we drafted
asaparov/fictionalgeoqa/check_fictionalgeoqa_answers.py
code served (permissive licence) · get_code("8754e2105529b75a")
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 torch

# Construct arguments for test_candidate function
candidate = "amazon"
actual_answers = ["amazon", "amazon river", "river amazon"]

ARGS = {
    "candidate": candidate,
    "actual_answers": actual_answers,
}
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 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
contains Not yet run
unverified (harvested, no recorded run)
asaparov/fictionalgeoqa/fol.py
code served (permissive licence) · get_code("a9a77c2802d0328e")
How it ran

no invocation recorded.

first_orderize Not yet run
unverified (harvested, no recorded run)
asaparov/fictionalgeoqa/run_thm_prover.py
code served (permissive licence) · get_code("44aeeda0c80091ad")
How it ran

no invocation recorded.

normalize_names_and_numbers Not yet run
unverified (harvested, no recorded run)
asaparov/fictionalgeoqa/run_boxer.py
code served (permissive licence) · get_code("af19d0c837ca4218")
How it ran

no invocation recorded.

normalize_names_and_numbers Not yet run
unverified (harvested, no recorded run)
asaparov/fictionalgeoqa/run_neural_drs.py
code served (permissive licence) · get_code("97ebbc514e594629")
How it ran

no invocation recorded.

remove_lambda_variable Not yet run
unverified (harvested, no recorded run)
asaparov/fictionalgeoqa/run_boxer.py
code served (permissive licence) · get_code("14fc87515d8d0d84")
How it ran

no invocation recorded.

remove_lambda_variable Not yet run
unverified (harvested, no recorded run)
asaparov/fictionalgeoqa/run_neural_drs.py
code served (permissive licence) · get_code("9aad33af40531699")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 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 13 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
isfloat 4 other papers
3 dated earlier, 1 later
1712.07629 (2017-12)
SuperPoint: Self-Supervised Interest Point Detection and Description
2002.12920 (2020-02)
Automatic Perturbation Analysis for Scalable Certified Robustness and Beyond
2008.06081 (2020-08)
Adversarial Training and Provable Robustness: A Tale of Two Objectives
and 1 more not named here

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 the Probabilistic Worldbuilding Model (PWM), a new fully-symbolic Bayesian model of semantic parsing and reasoning, as a first step in a research program toward more domain- and task-general NLU and AI. Humans create internal mental models of their observations which greatly aid in their ability to understand and reason about a large variety of problems. In PWM, the meanings of sentences, acquired facts about the world, and intermediate steps in reasoning are all expressed in a human-readable formal language, with the design goal of interpretability. PWM is Bayesian, designed specifically to be able to generalize to new domains and new tasks. We derive and implement an inference algorithm that reads sentences by parsing and abducing updates to its latent world model that capture the semantics of those sentences, and evaluate it on two out-of-domain question-answering datasets: (1) ProofWriter and (2) a new dataset we call FictionalGeoQA, designed to be more representative of real language but still simple enough to focus on evaluating reasoning ability, while being robust against heuristics. Our method outperforms baselines on both, thereby demonstrating its value as a proof-of-concept.

For agents

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

get_harvested_code_for_paper("2105.02486")
get_code_for_paper("2105.02486")
have("2105.02486")

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

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

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

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

Connect an agent — have() is free.