SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.04363 · 2024

AriGraph: Learning Knowledge Graph World Models with Episodic Memory for LLM Agents

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2407.04363.json · badge: /api/ran/2407.04363.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
airi-institute/arigraph canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
gather Ran
ran, honoured the contract we drafted
airi-institute/arigraph/src/dist_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/contriever, is pointer only (licence: NOASSERTION) · get_code("9fb6e57668661c38")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/contriever, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gather_nograd Ran
ran, honoured the contract we drafted
airi-institute/arigraph/src/dist_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from agwaBom/TPOUR, is pointer only (licence: NONE) · get_code("01971cc37e6fe583")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from agwaBom/TPOUR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_answer Ran
ran; our contract draft was wrong, not the code
airi-institute/arigraph/musique_test_big.py
code served (permissive licence) · get_code("d7983fb0733e663e")
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)

class MockAgent(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def generate(self, prompt):
        # Returns a list with one generated text response
        return [
            "CoT: The question asks about a specific topic. Based on the facts and texts provided, I can reason through this step by step.\nDirect answer: Yes"
        ]

agent = MockAgent()
question = "What is the capital of France?"
subgraph = "France -> hasCapital -> Paris; Paris -> isLocatedIn -> Europe"
episodic = "Paris is a major city in France known for the Eiffel Tower and its cultural heritage."

ARGS = {
    "agent": agent,
    "question": question,
    "subgraph": subgraph,
    "episodic": episodic
}
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
get_data Ran
ran; our contract draft was wrong, not the code
airi-institute/arigraph/musique_test_big.py
code served (permissive licence) · get_code("ee84e2fc82bb7e55")
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 numpy as np
import tempfile
import os

# Create temporary directory and mock data files
temp_dir = tempfile.mkdtemp()
qa_data_dir = os.path.join(temp_dir, 'qa_data')
os.makedirs(qa_data_dir, exist_ok=True)

# Create mock musique data file
musique_file = os.path.join(qa_data_dir, 'musique_ans_v1.0_dev.jsonl')
with open(musique_file, 'w') as f:
    for i in range(300):
        record = {
            'id': f'musique_{i}',
            'question': f'What is the answer to question {i}?',
            'answer': f'Answer {i}',
            'paragraphs': [{'idx': 0, 'title': f'Title {i}', 'paragraph_text': f'Text {i}'}]
        }
        f.write(json.dumps(record) + '\n')

# Create mock hotpotqa data file
hotpotqa_file = os.path.join(qa_data_dir, 'hotpot_dev_distractor_v1.json')
hotpot_data = []
for i in range(300):
    record = {
        'question': f'Question {i}',
        'answer': f'Answer {i}',
        'context': [
            [f'sentence_0_{i}', f'sentence_1_{i}'],
            [f'sentence_2_{i}', f'sentence_3_{i}'],
            [f'sentence_4_{i}', f'sentence_5_{i}']
        ]
    }
    hotpot_data.append(record)

with open(hotpotqa_file, 'w') as f:
    json.dump(hotpot_data, f)

# Change to temp directory so relative paths work
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'task_name': 'musique'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
set_optim Ran
ran; our contract draft was wrong, not the code
airi-institute/arigraph/src/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from 2282588541a/hirag, is pointer only (licence: NONE) · get_code("c1874f704c39221a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from 2282588541a/hirag, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

varsize_gather_nograd Ran
ran, honoured the contract we drafted
airi-institute/arigraph/src/dist_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/contriever, is pointer only (licence: NOASSERTION) · get_code("b1ad8cd3a7168b7f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/contriever, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load Not yet run
unverified (harvested, no recorded run)
airi-institute/arigraph/src/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from 2282588541a/hirag, is pointer only (licence: NONE) · get_code("b81f8f89f62be854")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from 2282588541a/hirag, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 5 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
varsize_gather_nograd 10 other papers
4 dated earlier, 6 later
2402.03216 (2024-02)
M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation
2402.07867 (2024-02)
PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models
2403.06840 (2024-03)
RA-ISF: Learning to Answer and Understand from Retrieval Augmentation via Iterative Self-Feedback
and 7 more not named here
gather_nograd 9 other papers
4 dated earlier, 5 later
2402.03216 (2024-02)
M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation
2402.07867 (2024-02)
PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models
2403.06840 (2024-03)
RA-ISF: Learning to Answer and Understand from Retrieval Augmentation via Iterative Self-Feedback
and 6 more not named here
gather 8 other papers
4 dated earlier, 4 later
2402.03216 (2024-02)
M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation
2402.07867 (2024-02)
PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models
2403.06840 (2024-03)
RA-ISF: Learning to Answer and Understand from Retrieval Augmentation via Iterative Self-Feedback
and 5 more not named here
load 2 other papers
2 later
2408.11875 (2024-08)
Hierarchical Retrieval-Augmented Generation Model with Rethink for Multi-hop Question Answering
2025.findings-acl.1365 (2025 (year only))
ECoRAG: Evidentiality-guided Compression for Long Context RAG
set_optim 2 other papers
2 later
2408.11875 (2024-08)
Hierarchical Retrieval-Augmented Generation Model with Rethink for Multi-hop Question Answering
2025.findings-acl.1365 (2025 (year only))
ECoRAG: Evidentiality-guided Compression for Long Context RAG

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

Advancements in the capabilities of Large Language Models (LLMs) have created a promising foundation for developing autonomous agents. With the right tools, these agents could learn to solve tasks in new environments by accumulating and updating their knowledge. Current LLM-based agents process past experiences using a full history of observations, summarization, retrieval augmentation. However, these unstructured memory representations do not facilitate the reasoning and planning essential for complex decision-making. In our study, we introduce AriGraph, a novel method wherein the agent constructs and updates a memory graph that integrates semantic and episodic memories while exploring the environment. We demonstrate that our Ariadne LLM agent, consisting of the proposed memory architecture augmented with planning and decision-making, effectively handles complex tasks within interactive text game environments difficult even for human players. Results show that our approach markedly outperforms other established memory methods and strong RL baselines in a range of problems of varying complexity. Additionally, AriGraph demonstrates competitive performance compared to dedicated knowledge graph-based methods in static multi-hop question-answering.

For agents

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

get_harvested_code_for_paper("2407.04363")
get_code_for_paper("2407.04363")
have("2407.04363")

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

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

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

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

Connect an agent — have() is free.