SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.00605 · 2026

Auditing Forgetting in Limited Memory Language Models

Arya Raeesi, Hanna Roed

arXiv · PDF · Open in the Atlas

Code that ran

20 of 26 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, 4 violated it and 0 have no contract verdict; 15 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2607.00605.json · badge: /api/ran/2607.00605.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
raeesiarya/LMLMAudit community
Papers with Code archive
20 ran · 6 no recorded run
FunctionStatusWhere it lives
_default_retrieval_trace Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("bf84ec4bafaa142c")
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 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.

from enum import Enum

class DatabaseState(str, Enum):
    FULL = 'FULL'
    DEL_ON = 'DEL-ON'
    DEL_OFF = 'DEL-OFF'

def retrieval_enabled(state: DatabaseState) -> bool:
    return state is not DatabaseState.DEL_OFF

def _default_retrieval_trace(state: DatabaseState) -> dict:
    return {'state': state.value, 'retrieval_enabled': retrieval_enabled(state), 'lookup_query': None, 'threshold': None, 'all_candidates': [], 'deleted_candidates': [], 'retained_candidates': [], 'selected_candidate': None, 'selected_value': None, 'error': None}

ARGS = {
    'state': DatabaseState.FULL
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
_flatten_alias_values Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("9fd2a6d4256cac2e")
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
from typing import Any

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

# Test case 1: None value
test_none = None

# Test case 2: String value
test_string = "alias_value"

# Test case 3: List of strings
test_list = ["alias1", "alias2", "alias3"]

# Test case 4: Tuple of strings
test_tuple = ("alias_a", "alias_b")

# Test case 5: Set of strings
test_set = {"alias_x", "alias_y"}

# Test case 6: Nested list with mixed types
test_nested = ["string", 42, ["nested_alias", 3.14], ("tuple_item",)]

# Test case 7: Integer (will be converted to string)
test_int = 100

# Test case 8: Float (will be converted to string)
test_float = 3.14

# Test case 9: Complex nested structure
test_complex = [
    "top_level",
    ["nested_list", 999],
    ("nested_tuple", "value"),
    {1, 2, 3},
    None
]

ARGS = {
    "value": test_nested
}
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
_unique_preserving_order Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("d75287169d8f8eff")
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 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 re

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

ARGS = {
    "values": [
        "Hello",
        "World",
        "hello",
        "test-case",
        "3.14",
        "another",
        "Hello"
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
build_alias_set Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("10a3c23b4e022f14")
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 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 re
from typing import Any

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def build_alias_set(canonical: str, aliases: Any=None) -> tuple[str, ...]:
    return _unique_preserving_order([canonical, *_flatten_alias_values(aliases)])

ARGS = {
    "canonical": "primary-name",
    "aliases": ["alias-one", "alias-two", "alias-three"]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
candidate_supports_target_fact Ran
ran, violated the contract we drafted
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("b240caf9e4324995")
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 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 re
from typing import Any
from dataclasses import dataclass

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

@dataclass(frozen=True)
class TargetFact:
    fact_id: int | None
    subject: str
    subject_aliases: tuple[str, ...]
    relation: str
    relation_aliases: tuple[str, ...]
    object: str
    object_aliases: tuple[str, ...]

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

def build_alias_set(canonical: str, aliases: Any=None) -> tuple[str, ...]:
    return _unique_preserving_order([canonical, *_flatten_alias_values(aliases)])

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def values_equivalent(left: str, right: str, left_aliases: Any=None, right_aliases: Any=None) -> bool:
    left_values = build_alias_set(left, left_aliases)
    right_values = build_alias_set(right, right_aliases)
    left_normalized = {normalize_text(value) for value in left_values}
    right_normalized = {normalize_text(value) for value in right_values}
    return bool(left_normalized & right_normalized)

def candidate_supports_target_fact(triplet: tuple[str, str, str], target_fact: TargetFact) -> tuple[bool, bool, bool, bool]:
    subject, relation, obj = triplet
    matches_subject = values_equivalent(subject, target_fact.subject, right_aliases=target_fact.subject_aliases)
    matches_relation = values_equivalent(relation, target_fact.relation, right_aliases=target_fact.relation_aliases)
    matches_object = values_equivalent(obj, target_fact.object, right_aliases=target_fact.object_aliases)
    supports_target_fact = matches_subject and matches_relation and matches_object
    return (matches_subject, matches_relation, matches_object, supports_target_fact)

target_fact = TargetFact(
    fact_id=1,
    subject="Albert Einstein",
    subject_aliases=("Einstein", "A. Einstein"),
    relation="born in",
    relation_aliases=("birthplace",),
    object="Germany",
    object_aliases=("German Empire",)
)

triplet = ("Albert Einstein", "born in", "Germany")

ARGS = {
    "triplet": triplet,
    "target_fact": target_fact
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
choose_answer Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("2625b513a8784327")
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 torch
import re
import html

torch.manual_seed(0)

# Build arguments for choose_answer function
prompt_text = "What is the capital of France?"
processed_output = "Answer: Paris is the capital of France.\nQuestion: What else?"
lookup_values = ["Paris", "Lyon", "Marseille"]

ARGS = {
    "prompt_text": prompt_text,
    "processed_output": processed_output,
    "lookup_values": lookup_values
}
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 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
clean_answer Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("e78ccae7868d860d")
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 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 html
import re

DB_MARKUP_SPAN_PATTERN = re.compile('<\\|db_[^|]+\\|>.*?<\\|db_end\\|>', re.DOTALL)
DB_SPECIAL_TOKEN_PATTERN = re.compile('<\\|db_[^|]+\\|>')
HTML_TAG_PATTERN = re.compile('<[^>]+>')

def clean_answer(answer_text: str) -> str:
    answer_text = answer_text.strip()
    while answer_text.lower().startswith('answer:'):
        answer_text = answer_text[len('answer:'):].strip()
    for prefix in ('the answer is ', 'it is ', "it's "):
        if answer_text.lower().startswith(prefix):
            answer_text = answer_text[len(prefix):].strip()
            break
    stop_markers = ['\nQuestion:', '\nContext:', '\nFact:', '\nPrompt:', '\nAnswer:', '\n\n']
    for marker in stop_markers:
        if marker in answer_text:
            answer_text = answer_text.split(marker, 1)[0].strip()
    answer_text = html.unescape(answer_text)
    answer_text = DB_MARKUP_SPAN_PATTERN.sub(' ', answer_text)
    answer_text = DB_SPECIAL_TOKEN_PATTERN.sub(' ', answer_text)
    answer_text = HTML_TAG_PATTERN.sub(' ', answer_text)
    answer_text = re.sub('\\s+', ' ', answer_text).strip()
    answer_text = answer_text.strip(' \t\n\r"\'`')
    answer_text = re.split('(?<=[.!?])\\s+(?=[A-Z\\"\'])', answer_text, maxsplit=1)[0].strip()
    return answer_text.strip(' \t\n\r"\'`,;:.')

ARGS = {
    'answer_text': 'Answer: The answer is Paris. It is the capital of France. Question: What is the capital of France?'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
compute_generation_budget Ran
ran, honoured the contract we drafted
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("ab09f379e654b1e5")
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 MockTokenizer:
    def encode(self, text, add_special_tokens=False):
        # Simple mock: split by spaces and return token list
        # Each word becomes a token, so we get a list of length = word count
        tokens = text.split()
        return tokens

ARGS = {
    "tokenizer": MockTokenizer(),
    "prompt_text": "hello world this is a test prompt",
    "target_answer_tokens": 50
}
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
extract_lookup_query Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("0373bc411296aa7d")
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 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 re

LOOKUP_PATTERNS = ["\\[dblookup\\('((?:[^'\\\\]|\\\\.)+)',\\s*'((?:[^'\\\\]|\\\\.)+)'\\)\\s*->", "\\[dblookup\\('(.+?)',\\s*'(.+?)'\\)\\s*->", '<\\|db_entity\\|>(.+?)<\\|db_relationship\\|>(.+?)<\\|db_return\\|>']

def extract_lookup_query(prompt: str) -> tuple[str, str]:
    matches = {tuple(match) for pattern in LOOKUP_PATTERNS for match in re.findall(pattern, prompt)}
    if not matches:
        raise ValueError(f'No valid dblookup pattern found in prompt: {prompt}')
    if len(matches) > 1:
        raise ValueError(f'Multiple dblookup matches found: {matches} in prompt: {prompt}')
    entity, relationship = matches.pop()
    return (entity, relationship)

# Test case 1: Using the first pattern with escaped characters
prompt_1 = "[dblookup('user_id', 'has_account') ->"

# Test case 2: Using the third pattern with db_entity/db_relationship/db_return
prompt_2 = "<|db_entity|>customer<|db_relationship|>purchased<|db_return|>"

# Test case 3: Using the second pattern (simpler version)
prompt_3 = "[dblookup('product', 'belongs_to') ->"

ARGS = {
    "prompt": prompt_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
extract_lookup_values Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("9c4e338ec3112dee")
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 html
import re

DB_MARKUP_SPAN_PATTERN = re.compile('<\\|db_[^|]+\\|>.*?<\\|db_end\\|>', re.DOTALL)
DB_SPECIAL_TOKEN_PATTERN = re.compile('<\\|db_[^|]+\\|>')
HTML_TAG_PATTERN = re.compile('<[^>]+>')
LOOKUP_VALUE_PATTERN = re.compile('<\\|db_entity\\|>.*?<\\|db_relationship\\|>.*?<\\|db_return\\|>\\s*(.*?)\\s*<\\|db_end\\|>', re.DOTALL)

def clean_answer(answer_text: str) -> str:
    answer_text = answer_text.strip()
    while answer_text.lower().startswith('answer:'):
        answer_text = answer_text[len('answer:'):].strip()
    for prefix in ('the answer is ', 'it is ', "it's "):
        if answer_text.lower().startswith(prefix):
            answer_text = answer_text[len(prefix):].strip()
            break
    stop_markers = ['\nQuestion:', '\nContext:', '\nFact:', '\nPrompt:', '\nAnswer:', '\n\n']
    for marker in stop_markers:
        if marker in answer_text:
            answer_text = answer_text.split(marker, 1)[0].strip()
    answer_text = html.unescape(answer_text)
    answer_text = DB_MARKUP_SPAN_PATTERN.sub(' ', answer_text)
    answer_text = DB_SPECIAL_TOKEN_PATTERN.sub(' ', answer_text)
    answer_text = HTML_TAG_PATTERN.sub(' ', answer_text)
    answer_text = re.sub('\\s+', ' ', answer_text).strip()
    answer_text = answer_text.strip(' \t\n\r"\'`')
    answer_text = re.split('(?<=[.!?])\\s+(?=[A-Z\\"\'])', answer_text, maxsplit=1)[0].strip()
    return answer_text.strip(' \t\n\r"\'`,;:.')

def extract_lookup_values(raw_output: str) -> list[str]:
    values: list[str] = []
    seen: set[str] = set()
    for match in LOOKUP_VALUE_PATTERN.findall(raw_output):
        value = clean_answer(match)
        if value and value not in seen:
            values.append(value)
            seen.add(value)
    return values

raw_output_with_markup = """
<|db_entity|>Person<|db_relationship|>knows<|db_return|> John Smith <|db_end|>
<|db_entity|>Company<|db_relationship|>founded<|db_return|> TechCorp Inc <|db_end|>
<|db_entity|>Location<|db_relationship|>located_in<|db_return|> New York City <|db_end|>
"""

ARGS = {
    "raw_output": raw_output_with_markup
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
is_deleted_triplet Ran
ran, violated the contract we drafted
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("656b381216db2a07")
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 re
from typing import Any
from dataclasses import dataclass

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

@dataclass(frozen=True)
class TargetFact:
    fact_id: int | None
    subject: str
    subject_aliases: tuple[str, ...]
    relation: str
    relation_aliases: tuple[str, ...]
    object: str
    object_aliases: tuple[str, ...]

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

def build_alias_set(canonical: str, aliases: Any=None) -> tuple[str, ...]:
    return _unique_preserving_order([canonical, *_flatten_alias_values(aliases)])

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def values_equivalent(left: str, right: str, left_aliases: Any=None, right_aliases: Any=None) -> bool:
    left_values = build_alias_set(left, left_aliases)
    right_values = build_alias_set(right, right_aliases)
    left_normalized = {normalize_text(value) for value in left_values}
    right_normalized = {normalize_text(value) for value in right_values}
    return bool(left_normalized & right_normalized)

def is_deleted_triplet(triplet: tuple[str, str, str], target_fact: TargetFact) -> bool:
    subject, relation, obj = triplet
    return values_equivalent(subject, target_fact.subject, right_aliases=target_fact.subject_aliases) and values_equivalent(relation, target_fact.relation, right_aliases=target_fact.relation_aliases) and values_equivalent(obj, target_fact.object, right_aliases=target_fact.object_aliases)

target_fact = TargetFact(
    fact_id=1,
    subject="Albert Einstein",
    subject_aliases=("Einstein", "A. Einstein"),
    relation="born-in",
    relation_aliases=("birthplace",),
    object="Ulm",
    object_aliases=("Ulm Germany",)
)

triplet = ("Albert Einstein", "born-in", "Ulm")

ARGS = {
    "triplet": triplet,
    "target_fact": target_fact
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
normalize_text Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("c1f14f57e9136ea6")
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 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 re

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

ARGS = {
    "text": "Hello World! This is a test with numbers 3.14 and words like don't and mother-in-law."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
prepare_prompt Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("f7a44c18a1cf3b39")
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 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)

# The function prepare_prompt takes a single parameter: prompt_text (str)
# It simply calls .strip() on the string and returns it
# So we need to provide a string value

ARGS = {
    "prompt_text": "  Hello, this is a test prompt with whitespace.  "
}
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 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
prompt_row_aliases Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("23910038515b997b")
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 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 re
from typing import Any

PROMPT_ROW_ALIAS_KEYS = {'subject': ('subject_aliases',), 'relation': ('relation_aliases',), 'object': ('object_aliases', 'gold_object_aliases', 'answer_aliases')}

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def prompt_row_aliases(prompt_row: dict[str, Any], field_name: str) -> tuple[str, ...]:
    return _unique_preserving_order([alias for key in PROMPT_ROW_ALIAS_KEYS.get(field_name, ()) for alias in _flatten_alias_values(prompt_row.get(key))])

ARGS = {
    "prompt_row": {
        "subject_aliases": ["Alice", "Alice Smith"],
        "relation_aliases": ["knows", "is-acquainted-with"],
        "object_aliases": ["Bob"],
        "gold_object_aliases": ["Robert"],
        "answer_aliases": ["Bob Smith"],
        "other_field": "ignored"
    },
    "field_name": "subject"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
retrieval_enabled Ran
ran, violated the contract we drafted
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("09d4a1065936f6a3")
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.

from enum import Enum

class DatabaseState(str, Enum):
    FULL = 'FULL'
    DEL_ON = 'DEL-ON'
    DEL_OFF = 'DEL-OFF'

def retrieval_enabled(state: DatabaseState) -> bool:
    return state is not DatabaseState.DEL_OFF

ARGS = {
    'state': DatabaseState.FULL
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
retrieve_lookup_value Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("c5f599a0ba29237c")
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
import torch.nn as nn
from typing import Any

torch.manual_seed(0)

class MockDatabaseManager:
    def __init__(self, use_fallback=False, raise_on_normal=False):
        self.use_fallback = use_fallback
        self.raise_on_normal = raise_on_normal
    
    def retrieve_from_database(self, lookup_query: str, threshold: float = 0.0) -> str:
        if self.raise_on_normal and threshold >= 0.0:
            raise Exception("Normal query failed")
        return f"result_for_{lookup_query}"

class MockModel(nn.Module):
    def __init__(self, db_manager=None, fallback_policy='top1_anyway'):
        super().__init__()
        self.db_manager = db_manager
        self.fallback_policy = fallback_policy
    
    def forward(self, x):
        return x

# Test case 1: model with db_manager that succeeds
db_manager_1 = MockDatabaseManager(use_fallback=False, raise_on_normal=False)
model_1 = MockModel(db_manager=db_manager_1, fallback_policy='top1_anyway')
lookup_query_1 = "test_query"

# Test case 2: model without db_manager (should return 'unknown')
model_2 = MockModel(db_manager=None)
lookup_query_2 = "test_query"

# Test case 3: model with db_manager that fails on normal but succeeds on fallback
db_manager_3 = MockDatabaseManager(use_fallback=True, raise_on_normal=True)
model_3 = MockModel(db_manager=db_manager_3, fallback_policy='top1_anyway')
lookup_query_3 = "fallback_query"

ARGS = {
    'model': model_1,
    'lookup_query': lookup_query_1
}
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
retrieve_triplet_candidates Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("3daeab8516d2d741")
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 torch
import numpy as np
from typing import Any

# Create a minimal mock model that has an encode method
class MockSentenceTransformer:
    def encode(self, texts, convert_to_numpy=True, normalize_embeddings=True):
        # Return embeddings of shape (num_texts, embedding_dim)
        return np.random.randn(len(texts), 4).astype(np.float32)

# Create a minimal mock FAISS-like index
class MockFAISSIndex:
    def search(self, query_embedding, k):
        # Return (distances, indices) for k nearest neighbors
        # distances shape: (1, k), indices shape: (1, k)
        distances = np.random.randn(1, k).astype(np.float32)
        indices = np.array([[0, 1, 2, -1]], dtype=np.int64)
        return distances, indices

# Create the topk_retriever mock object
class MockTopkRetriever:
    def __init__(self):
        self.model = MockSentenceTransformer()
        self.index = MockFAISSIndex()
        self.top_k = 4
        self.default_threshold = 0.5
        # Map indices to triplets: (subject, relation, value)
        self.id_to_triplet = {
            0: ("subject_0", "relation_type_0", "value_0"),
            1: ("subject_1", "relation_type_1", "value_1"),
            2: ("subject_2", "relation_type_2", "value_2"),
        }
    
    def _normalize_text(self, text):
        # Simple normalization
        return text.lower().strip()

ARGS = {
    "topk_retriever": MockTopkRetriever(),
    "entity": "Person",
    "relation": "knows",
    "threshold": None,
}
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 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
target_fact_from_prompt_row Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("65fdf054022cc6b8")
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 TargetFact. 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 re
from typing import Any
from dataclasses import dataclass

PROMPT_ROW_ALIAS_KEYS = {'subject': ('subject_aliases',), 'relation': ('relation_aliases',), 'object': ('object_aliases', 'gold_object_aliases', 'answer_aliases')}

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

@dataclass(frozen=True)
class TargetFact:
    fact_id: int | None
    subject: str
    subject_aliases: tuple[str, ...]
    relation: str
    relation_aliases: tuple[str, ...]
    object: str
    object_aliases: tuple[str, ...]

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def prompt_row_aliases(prompt_row: dict[str, Any], field_name: str) -> tuple[str, ...]:
    return _unique_preserving_order([alias for key in PROMPT_ROW_ALIAS_KEYS.get(field_name, ()) for alias in _flatten_alias_values(prompt_row.get(key))])

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def target_fact_from_prompt_row(prompt_row: dict[str, Any]) -> TargetFact:
    return TargetFact(fact_id=prompt_row.get('fact_id'), subject=prompt_row['subject'], subject_aliases=prompt_row_aliases(prompt_row, 'subject'), relation=prompt_row['relation'], relation_aliases=prompt_row_aliases(prompt_row, 'relation'), object=prompt_row['gold_object'], object_aliases=prompt_row_aliases(prompt_row, 'object'))

ARGS = {
    'prompt_row': {
        'fact_id': 42,
        'subject': 'Albert Einstein',
        'subject_aliases': ['Einstein', 'Albert'],
        'relation': 'born_in',
        'relation_aliases': ['birthplace', 'origin'],
        'gold_object': 'Ulm',
        'object_aliases': ['Ulm Germany'],
        'gold_object_aliases': ['Ulm, Germany'],
        'answer_aliases': ['Ulm']
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 TargetFact — a TargetFact output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TargetFact 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
tokenize Ran
ran; our contract draft was wrong, not the code
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("56c931802f771660")
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 re

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

ARGS = {
    "text": "Hello world! This is a test with numbers like 3.14 and hyphenated-words and contractions like don't."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
values_equivalent Ran
ran, violated the contract we drafted
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("6d58c6065b37de13")
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
import re
from typing import Any

TOKEN_PATTERN = re.compile("\\d+\\.\\d+|\\w+(?:[-']\\w+)*", re.UNICODE)

def _flatten_alias_values(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, str):
        return [value]
    if isinstance(value, (list, tuple, set)):
        values: list[str] = []
        for item in value:
            values.extend(_flatten_alias_values(item))
        return values
    return [str(value)]

def _unique_preserving_order(values: list[str]) -> tuple[str, ...]:
    seen: set[str] = set()
    unique_values: list[str] = []
    for value in values:
        normalized = normalize_text(value)
        if not normalized or normalized in seen:
            continue
        seen.add(normalized)
        unique_values.append(value)
    return tuple(unique_values)

def build_alias_set(canonical: str, aliases: Any=None) -> tuple[str, ...]:
    return _unique_preserving_order([canonical, *_flatten_alias_values(aliases)])

def normalize_text(text: str) -> str:
    return ' '.join(tokenize(text))

def tokenize(text: str) -> list[str]:
    return TOKEN_PATTERN.findall(str(text).casefold())

def values_equivalent(left: str, right: str, left_aliases: Any=None, right_aliases: Any=None) -> bool:
    left_values = build_alias_set(left, left_aliases)
    right_values = build_alias_set(right, right_aliases)
    left_normalized = {normalize_text(value) for value in left_values}
    right_normalized = {normalize_text(value) for value in right_values}
    return bool(left_normalized & right_normalized)

ARGS = {
    "left": "hello-world",
    "right": "hello world",
    "left_aliases": ["greeting", "salutation"],
    "right_aliases": ["hi-world", "hello_world"],
}
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
AuditDatabaseManager Not yet run
unverified (harvested, no recorded run)
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("6ae72e492d22758d")
How it ran

no invocation recorded.

DatabaseState Not yet run
unverified (harvested, no recorded run)
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("5372af2c232205bf")
How it ran

no invocation recorded.

TargetFact Not yet run
unverified (harvested, no recorded run)
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("bef54e1f3b6ad335")
How it ran

no invocation recorded.

build_state_db_manager Not yet run
unverified (harvested, no recorded run)
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("a3789f0f9efa93ad")
How it ran

no invocation recorded.

generate_answer Not yet run
unverified (harvested, no recorded run)
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("1908bdfde38728bb")
How it ran

no invocation recorded.

run_prompt_audit Not yet run
unverified (harvested, no recorded run)
raeesiarya/LMLMAudit/src/lmlm-audit/run_audit.py
code served (permissive licence) · get_code("69563b95bc69fdff")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Limited Memory Language Models (LMLMs) externalize factual knowledge to a database to enable deletion-based unlearning without retraining. Existing evaluations measure post-deletion correctness in aggregate and cannot tell whether a deleted fact persists through residual parametric memory, alternative retrieval paths, or near-neighbor retrieval artifacts. We propose a causal auditing framework that holds the model fixed and varies the database state at inference time across three interventions: FULL, DEL-ON, and DEL-OFF. The framework decomposes postdeletion behavior into parametric leakage L(f ), retrieval-mediated correctness R(f ), and a retrieval artifact rate grounded in the inference-time retrieval trace. We apply it to 12,228 alias-closure deletions across thirteen databases, including four adversarial topologies (Base, Alias, Noise, Collision) we construct in three domains, and six prompt formulations. Parametric leakage is near zero in every variant and every prompt style: the model rarely returns the deleted answer in the absence of retrieval. The residual that does survive lives in the retrieval graph: retrieval-mediated correctness and the retrieval artifact rate match within rounding everywhere, so post-deletion correctness is, in our audit, predominantly reconstituted from near-neighbor retrieval. This residual ranges from 0.7% on the released LMLM database to 13.6% on the most adversarial variant, and prompt formulation does not independently control how much of a deleted fact survives. These results suggest that, for this class of LMLM and deletion procedure, the unlearning boundary is drawn primarily by the database administrator rather than by the model.

For agents

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

get_harvested_code_for_paper("2607.00605")
get_code_for_paper("2607.00605")
have("2607.00605")

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

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

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

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

Connect an agent — have() is free.