SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.31191 · 2026

ISM: Self-Improving Strategy Memory for Continual Mathematical Reasoning

Tim Oates, Prakhar Dixit

arXiv · PDF · Open in the Atlas

Code that ran

16 of 20 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; 16 failures of our instrument; 4 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/2606.31191.json · badge: /api/ran/2606.31191.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
pdx97/ISM canonical (classifier label)
classifier basis: census
16 ran · 4 no recorded run
FunctionStatusWhere it lives
call_llm Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/feature_extractor_llm.py
code served (permissive licence) · get_code("eb146e366a08a7c5")
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
from unittest.mock import Mock, MagicMock

# Create a mock OpenAI client that implements the required interface
mock_client = Mock()

# Create a mock response object with the structure expected by the function
mock_message = Mock()
mock_message.content = "This is a test response from the LLM."

mock_choice = Mock()
mock_choice.message = mock_message

mock_response = Mock()
mock_response.choices = [mock_choice]

# Set up the mock client to return the mock response when chat.completions.create is called
mock_client.chat.completions.create = MagicMock(return_value=mock_response)

# Define the arguments dictionary
ARGS = {
    'prompt': 'What is the capital of France?',
    'model': mock_client,
    'model_name': 'gpt-4o-mini'
}
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
cosine_sim Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/baseline_rag_examples.py
code served (permissive licence) · get_code("29d3697dff1ffa09")
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 float, 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 numpy as np

# Create two simple numpy arrays
a = np.array([1.0, 2.0, 3.0, 4.0])
b = np.array([2.0, 3.0, 4.0, 5.0])

ARGS = {
    "a": a,
    "b": b,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
cumulative_accuracy Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/error_analysis_math_updated.py
code served (permissive licence) · get_code("ec873038750f553a")
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 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.

import numpy as np

# Construct logs: a dict where each key maps to a list of episode dicts
# Each episode dict must have a 'correct' field
logs = {
    'system_a': [
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 1},
    ],
    'system_b': [
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
    ]
}

ARGS = {
    'logs': logs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
domain_transition_analysis Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/error_analysis_olympiad.py
code served (permissive licence) · get_code("2b1882d2468172de")
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 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.

import numpy as np

# Construct test data for domain_transition_analysis
# The function expects a dict where keys are identifiers and values are lists of episode dicts
# Each episode dict must have 'task' (domain name) and 'correct' (0 or 1) keys

logs = {
    'agent_1': [
        {'task': 'domain_a', 'correct': 1},
        {'task': 'domain_a', 'correct': 1},
        {'task': 'domain_a', 'correct': 0},
        {'task': 'domain_a', 'correct': 1},
        {'task': 'domain_a', 'correct': 1},
        {'task': 'domain_b', 'correct': 0},
        {'task': 'domain_b', 'correct': 0},
        {'task': 'domain_b', 'correct': 1},
        {'task': 'domain_b', 'correct': 1},
        {'task': 'domain_b', 'correct': 1},
        {'task': 'domain_a', 'correct': 1},
        {'task': 'domain_a', 'correct': 1},
        {'task': 'domain_a', 'correct': 1},
    ],
    'agent_2': [
        {'task': 'domain_x', 'correct': 1},
        {'task': 'domain_x', 'correct': 0},
        {'task': 'domain_y', 'correct': 0},
        {'task': 'domain_y', 'correct': 1},
        {'task': 'domain_y', 'correct': 1},
    ]
}

ARGS = {
    'logs': logs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
error_patterns_by_block Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/error_analysis_olympiad.py
code served (permissive licence) · get_code("7263003b60d40fbc")
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 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.

import numpy as np

# Construct the logs dictionary
# The function iterates over logs.items() and accesses episodes
# For each episode, it reads ep['correct'] as an int

logs = {
    'agent_1': [
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
    ],
    'agent_2': [
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
    ]
}

ARGS = {
    'logs': logs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
error_patterns_by_domain Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/error_analysis_math_updated.py
code served (permissive licence) · get_code("7c8a0a58308c684a")
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 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.

import torch
from collections import defaultdict

torch.manual_seed(0)

# Construct the logs argument
# The function expects a dict where:
# - keys are identifiers (e.g., "run_1", "run_2")
# - values are lists of episodes
# - each episode is a dict with 'task' (domain name) and 'correct' (boolean)

logs = {
    "run_1": [
        {"task": "navigation", "correct": True},
        {"task": "navigation", "correct": False},
        {"task": "manipulation", "correct": True},
        {"task": "manipulation", "correct": True},
        {"task": "dialogue", "correct": False},
    ],
    "run_2": [
        {"task": "navigation", "correct": True},
        {"task": "manipulation", "correct": False},
        {"task": "dialogue", "correct": True},
        {"task": "dialogue", "correct": True},
    ]
}

ARGS = {
    "logs": logs
}
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 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
extract_features_llm Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/feature_extractor_llm.py
code served (permissive licence) · get_code("14db695d17239254")
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 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.

import json
from unittest.mock import Mock, MagicMock


# Create a mock LLM client that simulates OpenAI API
class MockLLMClient:
    def __init__(self):
        self._default_model = "gpt-4o-mini"
        self.model = "gpt-4o-mini"
        self.chat = Mock()
        
        # Mock response structure
        mock_message = Mock()
        mock_message.content = json.dumps({
            "operator": "algebraic",
            "seed_schema": "Algebra",
            "structure_top2": ["find_missing"],
            "heuristics": ["introduce_variable", "decompose"],
            "quantities": {
                "has_rate": False,
                "has_time": False,
                "has_constraint": False,
                "num_values": 2,
                "n_unknown": 1
            },
            "confidence": 0.90
        })
        
        mock_choice = Mock()
        mock_choice.message = mock_message
        
        mock_response = Mock()
        mock_response.choices = [mock_choice]
        
        self.chat.completions.create = Mock(return_value=mock_response)


ARGS = {
    "problem_text": "If 2x + 3 = 11, find x.",
    "model": MockLLMClient(),
    "model_name": "gpt-4o-mini"
}
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 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
find_candidates Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/qualitative_case_study.py
code served (permissive licence) · get_code("c6ce799718e8d6a7")
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 torch
import numpy as np

# Build the logs dict structure
logs = {
    'ism': {
        'ep_0': {
            'correct': True,
            'schema': 'CustomSchema1',
            'task': 'Solve x + 2 = 5',
            'pred': '\\boxed{3}',
            'gold': '3'
        },
        'ep_1': {
            'correct': True,
            'schema': 'CustomSchema2',
            'task': 'Solve y - 1 = 4',
            'pred': '\\boxed{5}',
            'gold': '5'
        },
        'ep_2': {
            'correct': True,
            'schema': 'Algebra',
            'task': 'Solve z + 3 = 7',
            'pred': '\\boxed{4}',
            'gold': '4'
        },
        'ep_3': {
            'correct': True,
            'schema': 'CustomSchema3',
            'task': 'Solve a * 2 = 8',
            'pred': '\\boxed{4}',
            'gold': '4'
        },
        'ep_4': {
            'correct': False,
            'schema': 'CustomSchema4',
            'task': 'Solve b / 2 = 3',
            'pred': '\\boxed{5}',
            'gold': '6'
        }
    },
    'vanilla': {
        'ep_0': {'correct': False, 'pred': '2'},
        'ep_1': {'correct': False, 'pred': '4'},
        'ep_2': {'correct': True, 'pred': '4'},
        'ep_3': {'correct': False, 'pred': '3'},
        'ep_4': {'correct': False, 'pred': '5'}
    },
    'reflexion': {
        'ep_0': {'correct': False, 'pred': '2'},
        'ep_1': {'correct': False, 'pred': '6'},
        'ep_2': {'correct': True, 'pred': '4'},
        'ep_3': {'correct': False, 'pred': '2'},
        'ep_4': {'correct': False, 'pred': '5'}
    },
    'rag': {
        'ep_0': {'correct': False, 'pred': '1'},
        'ep_1': {'correct': False, 'pred': '3'},
        'ep_2': {'correct': True, 'pred': '4'},
        'ep_3': {'correct': False, 'pred': '5'},
        'ep_4': {'correct': False, 'pred': '5'}
    },
    'static': {
        'ep_0': {'correct': False, 'pred': '4'},
        'ep_1': {'correct': False, 'pred': '2'},
        'ep_2': {'correct': True, 'pred': '4'},
        'ep_3': {'correct': False, 'pred': '1'},
        'ep_4': {'correct': False, 'pred': '5'}
    },
    'passive': {
        'ep_0': {'correct': False, 'pred': '1'},
        'ep_1': {'correct': False, 'pred': '5'},
        'ep_2': {'correct': True, 'pred': '4'},
        'ep_3': {'correct': False, 'pred': '2'},
        'ep_4': {'correct': False, 'pred': '5'}
    }
}

# Build the bank dict
bank = {
    'CustomSchema1': {
        'success_rate': 0.75
    },
    'CustomSchema2': {
        'success_rate': 0.65
    },
    'CustomSchema3': {
        'success_rate': 0.8
    }
}

ARGS = {
    'logs': logs,
    'bank': bank
}
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 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_bank Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/qualitative_case_study.py
code served (permissive licence) · get_code("4246e13c1e853b17")
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 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.

import os
import json
import tempfile
import shutil

# Create a temporary directory for results
temp_dir = tempfile.mkdtemp()

# Create the ism_analysis.json file with valid data
ism_data = {
    "bank_snapshot": [
        {"name": "model_1", "value": 0.95},
        {"name": "model_2", "value": 0.87},
        {"name": "model_3", "value": 0.92}
    ]
}

results_file = os.path.join(temp_dir, 'ism_analysis.json')
with open(results_file, 'w') as f:
    json.dump(ism_data, f)

ARGS = {
    'results_dir': temp_dir
}
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 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
load_lift_log Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/plot_results.py
code served (permissive licence) · get_code("896bb0abf755cab1")
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 json
from pathlib import Path
import tempfile
import os

# Create a temporary directory to simulate results_dir
temp_dir = tempfile.mkdtemp()

# Create a sample ism_lift_log.json file
sample_lift_log = [
    {"schema": "schema_1", "lift": 0.85, "audit_point": 0},
    {"schema": "schema_2", "lift": 0.92, "audit_point": 1},
    {"schema": "schema_3", "lift": 0.78, "audit_point": 2},
]

log_file_path = Path(temp_dir) / 'ism_lift_log.json'
with open(log_file_path, 'w') as f:
    json.dump(sample_lift_log, f)

ARGS = {
    'results_dir': temp_dir,
}
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
load_logs Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/plot_results.py
code served (permissive licence) · get_code("2742cbcb630d6851")
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 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.

import json
import tempfile
from pathlib import Path

# Create temporary directory with test JSON files
temp_dir = tempfile.mkdtemp()
results_dir = Path(temp_dir)

# Create sample JSON files for each system
sample_logs = {
    'static_llm': [
        {'episode': 0, 'score': 10, 'steps': 5},
        {'episode': 1, 'score': 15, 'steps': 7}
    ],
    'neural_memory': [
        {'episode': 0, 'score': 12, 'steps': 6},
        {'episode': 1, 'score': 18, 'steps': 8}
    ],
    'schema_memory': [
        {'episode': 0, 'score': 11, 'steps': 5},
        {'episode': 1, 'score': 16, 'steps': 7}
    ],
    'ism': [
        {'episode': 0, 'score': 13, 'steps': 6},
        {'episode': 1, 'score': 19, 'steps': 8}
    ]
}

# Write JSON files to temp directory
for key, data in sample_logs.items():
    path = results_dir / f'{key}.json'
    with open(path, 'w') as f:
        json.dump(data, f)

# Define ARGS with the required parameter
ARGS = {
    'results_dir': str(results_dir)
}
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 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
load_logs Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/qualitative_case_study.py
code served (permissive licence) · get_code("9f4d444f18a67841")
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 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.

import argparse
import json
import os
import sys
import tempfile
import shutil

# Create a temporary directory for results
temp_dir = tempfile.mkdtemp()

# Create sample log files
BASELINES = ['vanilla', 'reflexion', 'rag', 'static', 'passive']

# Create sample episode data
sample_episodes = [
    {'episode': 0, 'reward': 1.0, 'steps': 10},
    {'episode': 1, 'reward': 2.0, 'steps': 15},
]

# Write log files for each baseline and ism
for key in ['ism'] + BASELINES:
    log_path = os.path.join(temp_dir, f'{key}.json')
    with open(log_path, 'w') as f:
        json.dump(sample_episodes, f)

ARGS = {
    'results_dir': temp_dir
}
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 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
load_summary Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/plot_results.py
code served (permissive licence) · get_code("d0fdb3a2a93e3fd9")
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 json
import tempfile
from pathlib import Path

# Create a temporary directory with a summary.json file
temp_dir = tempfile.mkdtemp()
summary_data = [
    {"epoch": 1, "loss": 0.5, "accuracy": 0.95},
    {"epoch": 2, "loss": 0.3, "accuracy": 0.97}
]

summary_path = Path(temp_dir) / 'summary.json'
with open(summary_path, 'w') as f:
    json.dump(summary_data, f)

ARGS = {
    'results_dir': temp_dir
}
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
rolling_accuracy Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/error_analysis_math_updated.py
code served (permissive licence) · get_code("abacc2673b5c8e80")
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 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.

import numpy as np

# Construct valid arguments for rolling_accuracy
logs = {
    'train': [
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
    ],
    'val': [
        {'correct': 1},
        {'correct': 1},
        {'correct': 0},
        {'correct': 1},
    ]
}

window = 5

ARGS = {
    'logs': logs,
    'window': window
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
solve_problem Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/run_comparison.py
code served (permissive licence) · get_code("cdbf677180934ef8")
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

torch.manual_seed(0)

# Stand-in system classes with solve() methods
class RAGSystem:
    def solve(self, problem_text: str, schema: dict) -> str:
        return f"RAG solution for: {problem_text}"

class ReflexionSystem:
    def solve(self, problem_text: str, schema: dict) -> str:
        return f"Reflexion solution for: {problem_text}"

class VanillaSystem:
    def solve(self, problem_text: str) -> str:
        return f"Vanilla solution for: {problem_text}"

class GenericSystem:
    pass

# Mock hard_reset_call function (since it's called in the else branch)
def hard_reset_call(problem_text: str, schema: dict, model: str) -> str:
    return f"Hard reset call with model {model}"

# Build ARGS dict with all parameters
ARGS = {
    "system_key": "rag",
    "system": RAGSystem(),
    "problem_text": "What is the capital of France?",
    "schema": {"type": "question", "domain": "geography"},
    "model": "gpt-3.5-turbo"
}
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
validate_features Ran
ran; our contract draft was wrong, not the code
pdx97/ISM/feature_extractor_llm.py
code served (permissive licence) · get_code("2f3d88410e0be289")
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 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.

import re
from typing import Any, Dict, Optional

FEATURE_SCHEMA = {'operator': ['algebraic', 'number_theory', 'geometric', 'combinatoric', 'probability', 'calculus'], 'structure': ['two_agents_combined', 'part_whole', 'before_after', 'comparison', 'optimization', 'existence_count', 'construction', 'evaluate_expression', 'find_missing'], 'heuristics': ['decompose', 'work_backwards', 'introduce_variable', 'find_pattern', 'change_representation', 'examine_special_cases', 'use_symmetry', 'argue_by_contradiction', 'apply_theorems', 'visualize']}

OPERATOR_TO_SEED_SCHEMA = {'algebraic': 'Algebra', 'number_theory': 'Number Theory', 'geometric': 'Geometry', 'combinatoric': 'Combinatorics', 'probability': 'Probability', 'calculus': 'Calculus and Analysis'}

def validate_features(f: Dict[str, Any]) -> Dict[str, Any]:
    if not isinstance(f, dict):
        raise ValueError('Features must be a dict')
    if f.get('operator') not in FEATURE_SCHEMA['operator']:
        raise ValueError('Invalid operator')
    expected_seed = OPERATOR_TO_SEED_SCHEMA[f['operator']]
    provided_seed = f.get('seed_schema')
    if provided_seed and str(provided_seed).strip() != expected_seed:
        raise ValueError('seed_schema inconsistent with operator')
    f['seed_schema'] = expected_seed
    raw_struct = f.get('structure_top2', f.get('structure', []))
    if isinstance(raw_struct, str):
        raw_struct = [raw_struct]
    if not isinstance(raw_struct, list):
        raw_struct = []
    struct = [s for s in raw_struct if s in FEATURE_SCHEMA['structure']]
    if not struct:
        raise ValueError('Invalid structure')
    f['structure_top2'] = struct[:2]
    f['structure'] = f['structure_top2'][0]
    heur = f.get('heuristics', [])
    if not isinstance(heur, list):
        heur = []
    f['heuristics'] = [h for h in heur if h in FEATURE_SCHEMA['heuristics']][:3]
    q = f.get('quantities', {})
    if not isinstance(q, dict):
        q = {}

    def _as_bool(x) -> bool:
        if isinstance(x, bool):
            return x
        if isinstance(x, (int, float)):
            return bool(x)
        if isinstance(x, str):
            return x.strip().lower() in ('true', '1', 'yes', 'y')
        return False

    def _as_int(x) -> int:
        if isinstance(x, bool):
            return int(x)
        if isinstance(x, int):
            return x
        if isinstance(x, float):
            return int(x)
        if isinstance(x, str):
            m = re.search('-?\\d+', x)
            return int(m.group(0)) if m else 0
        return 0
    f['quantities'] = {'has_rate': _as_bool(q.get('has_rate', False)), 'has_time': _as_bool(q.get('has_time', False)), 'has_constraint': _as_bool(q.get('has_constraint', False)), 'num_values': max(0, _as_int(q.get('num_values', 0))), 'n_unknown': max(0, _as_int(q.get('n_unknown', 1)))}
    conf = f.get('confidence', 0.0)
    try:
        conf_f = float(conf)
    except Exception:
        conf_f = 0.0
    f['confidence'] = min(1.0, max(0.0, conf_f))
    return f

# Construct valid arguments for validate_features
ARGS = {
    'f': {
        'operator': 'algebraic',
        'structure': 'part_whole',
        'heuristics': ['decompose', 'work_backwards'],
        'quantities': {
            'has_rate': True,
            'has_time': False,
            'has_constraint': True,
            'num_values': 5,
            'n_unknown': 2
        },
        'confidence': 0.85
    }
}
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 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
build_systems Not yet run
unverified (harvested, no recorded run)
pdx97/ISM/run_comparison.py
code served (permissive licence) · get_code("2b73664cc397cc79")
How it ran

no invocation recorded.

load_dataset_for_comparison Not yet run
unverified (harvested, no recorded run)
pdx97/ISM/run_comparison.py
code served (permissive licence) · get_code("a150e25676155a1e")
How it ran

no invocation recorded.

retrieve_schema Not yet run
unverified (harvested, no recorded run)
pdx97/ISM/schema_memory_agentic.py
code served (permissive licence) · get_code("a5126e6d7c40a3c3")
How it ran

no invocation recorded.

score_hook Not yet run
unverified (harvested, no recorded run)
pdx97/ISM/schema_memory_agentic.py
code served (permissive licence) · get_code("559f6a6cac84a86f")
How it ran

no invocation recorded.

Also present in other papers' code

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

We propose Intelligent Schema Memory (ISM), a self-evolving memory-augmented system that improves mathematical reasoning for a frozen LLM under continual learning with hard episodic resets. ISM maintains a compact, self-refined bank of strategy schemas learned from both successful and failed episodes, with symbolic tools that check intermediate steps and certify answers. Without updating model parameters, ISM outperforms passive, retrieval, and reflection baselines on MATH-Hard and OlympiadBench, using 64% and 86% fewer schemas respectively than the strongest passive baseline. These results show that small, actively maintained, and verified strategy memories can support reliable continual mathematical reasoning under strict episodic isolation. The codebase is available at https://github.com/pdx97/ISM.

For agents

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

get_harvested_code_for_paper("2606.31191")
get_code_for_paper("2606.31191")
have("2606.31191")

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

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

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

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

Connect an agent — have() is free.