SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.17336 · 2024

APEX$^2$: Adaptive and Extreme Summarization for Personalized Knowledge Graphs

arXiv · PDF · Open in the Atlas

Code that ran

15 of 15 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 15 have no contract verdict; 0 failures of our instrument; 0 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/2412.17336.json · badge: /api/ran/2412.17336.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
iDEA-iSAIL-Lab-UIUC/APEX canonical (classifier label)
classifier basis not recorded on the link
15 ran · 0 no recorded run
FunctionStatusWhere it lives
Heat_Diffuse Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/apex.py
code served (permissive licence) · get_code("c46f6030afeae60b")
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. 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
from scipy import sparse

class MockKG:
    """Mock knowledge graph with required methods and attributes."""
    
    def __init__(self, num_entities=10):
        self._num_entities = num_entities
        self._entity_map = {f"entity_{i}": i for i in range(num_entities)}
        self._relations = {}
        
        # Initialize some sample relations
        for i in range(num_entities):
            self._relations[(f"entity_{i}", "relation_0")] = [f"entity_{(i+1) % num_entities}", f"entity_{(i+2) % num_entities}"]
    
    def number_of_entities(self):
        return self._num_entities
    
    def entity_id(self, entity_mid):
        return self._entity_map.get(entity_mid, 0)
    
    def __getitem__(self, entity_mid):
        """Return a dict-like object mapping relations to answers."""
        return RelationDict(self._relations, entity_mid)


class RelationDict:
    """Dict-like object that maps relations to answer lists."""
    
    def __init__(self, relations, entity_mid):
        self.relations = relations
        self.entity_mid = entity_mid
    
    def __getitem__(self, relation):
        return self.relations.get((self.entity_mid, relation), ["entity_0", "entity_1"])


# Create mock KG
kg = MockKG(num_entities=8)

# Create sparse CSR matrices for indirect matrices
# These will be used in matrix multiplication: csr_indirect_matrices[i+1] * q
# q is a vector of size num_entities, so matrices should be (num_entities x num_entities)
csr_indirect_matrices = {}
for i in range(3):  # d can be at most 2, so we need matrices for indices 1 and 2
    # Create a simple sparse transition matrix
    data = np.array([0.5, 0.3, 0.2] * 3, dtype=float)
    row = np.array([0, 1, 2, 1, 2, 3, 2, 3, 4] * 1, dtype=int)[:8]
    col = np.array([1, 2, 3, 3, 4, 5, 5, 6, 7] * 1, dtype=int)[:8]
    csr_indirect_matrices[i + 1] = sparse.csr_matrix(
        (data[:8], (row, col)), shape=(8, 8)
    )

# Create query dict
query = {
    'Parse': {
        'TopicEntityMid': 'entity_0',
        'InferentialChain': ['relation_0']
    }
}

# Create heat vector (initialized to zeros, same size as entity count)
heat = np.zeros(8)

# Diffusion depth
d = 2

ARGS = {
    'heat': heat,
    'KG': kg,
    'query': query,
    'd': d,
    'csr_indirect_matrices': csr_indirect_matrices
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
binary_find Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/apex.py
code served (permissive licence) · get_code("bbaecb13e64ffcd6")
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

torch.manual_seed(0)

# Analyze the function:
# - index_list: a list of indices that are used to index into H
# - changed_index: an index used to index into H
# - H: an array/list that supports indexing with integers

# Create test data
H = np.array([10.5, 3.2, 7.1, 3.2, 9.8, 3.2, 1.5])

# Create an index_list that is sorted by H values
# We need indices that when used to index H, give us values in some order
# For binary search to work, index_list should reference indices sorted by H[index]
index_list = [6, 1, 3, 5, 2, 0, 4]  # indices sorted by H values: [1.5, 3.2, 3.2, 3.2, 7.1, 10.5, 9.8]

# changed_index should be some index in H
changed_index = 2  # H[2] = 7.1

ARGS = {
    "index_list": index_list,
    "changed_index": changed_index,
    "H": H
}
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
check_question Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/query.py
code served (permissive licence) · get_code("472c5d90fd377046")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Construct a valid WebQSP format question dictionary
question = {
    'QuestionId': 'q_001',
    'Parse': {
        'TopicEntityMid': 'm.05z3d',
        'InferentialChain': ['relation1', 'relation2'],
        'Answers': [
            {'AnswerType': 'entity', 'Answer': 'answer1'},
            {'AnswerType': 'entity', 'Answer': 'answer2'}
        ]
    }
}

ARGS = {
    'question': question
}
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 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
entity_counts Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/user.py
code served (permissive licence) · get_code("d19410e1bd194547")
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 defaultdict. 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 collections import defaultdict

# Construct a minimal query_log that matches the WebQSP-style format
# The function expects a list of dicts with a 'Parse' key containing 'TopicEntityName'
query_log = [
    {
        'Parse': {
            'TopicEntityName': 'Barack Obama'
        }
    },
    {
        'Parse': {
            'TopicEntityName': 'Barack Obama'
        }
    },
    {
        'Parse': {
            'TopicEntityName': 'Donald Trump'
        }
    },
    {
        'Parse': {
            'TopicEntityName': 'George Washington'
        }
    }
]

ARGS = {
    'query_log': query_log
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
f1_score Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/metrics.py
code served (permissive licence) · get_code("1de880067d0e1282")
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 torch
import numpy as np

torch.manual_seed(0)

# f1_score takes tp (true positives), fp (false positives), fn (false negatives)
# These are integer counts used in arithmetic operations

tp = 10
fp = 3
fn = 2

ARGS = {
    "tp": tp,
    "fp": fp,
    "fn": fn
}
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 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
float_in_zero_one Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/PKG_EXP/MetaQA/generate_query.py
code served (permissive licence) · get_code("5c179350b6071ab6")
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 argparse
import torch
import numpy as np

def float_in_zero_one(value):
    """Check if a float value is in [0, 1]"""
    value = float(value)
    if value < 0 or value > 1:
        raise argparse.ArgumentTypeError('Value must be a float between 0 and 1')
    return value

# Test cases for the function
ARGS = {
    "value": 0.5
}
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 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
load_question Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/query.py
code served (permissive licence) · get_code("9b37cc76dbd1df80")
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
import os

# Create a temporary directory and file
temp_dir = tempfile.mkdtemp()
query_file = os.path.join(temp_dir, "question.json")

# Create a valid question in WebQSP format
valid_question = {
    "QuestionId": "q_001",
    "Parse": {
        "TopicEntityMid": "m.02mjmr",
        "InferentialChain": [
            {"relation": "people.person.place_of_birth", "argument": "United States"}
        ],
        "Answers": [
            {"AnswerType": "Entity", "AnswerArgument": "m.0d6kjr"}
        ]
    }
}

# Write the valid question to the temporary file
with open(query_file, 'w') as f:
    json.dump(valid_question, f)

# Define ARGS mapping
ARGS = {
    'query_fname': query_file
}
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_questions_from_dir Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/query.py
code served (permissive licence) · get_code("51df2d57de667977")
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 with mock question JSON files
temp_dir = tempfile.mkdtemp()

# Create valid question dicts in WebQSP format
question1 = {
    'QuestionId': 'q1',
    'Parse': {
        'TopicEntityMid': 'mid1',
        'InferentialChain': ['relation1'],
        'Answers': [{'AnswerType': 'entity', 'AnswerArgument': 'ans1'}]
    }
}

question2 = {
    'QuestionId': 'q2',
    'Parse': {
        'TopicEntityMid': 'mid2',
        'InferentialChain': ['relation2', 'relation3'],
        'Answers': [{'AnswerType': 'entity', 'AnswerArgument': 'ans2'}]
    }
}

# Write question files to temp directory
with open(os.path.join(temp_dir, 'question1.json'), 'w') as f:
    json.dump(question1, f)

with open(os.path.join(temp_dir, 'question2.json'), 'w') as f:
    json.dump(question2, f)

ARGS = {
    'query_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
positive_int Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/PKG_EXP/MetaQA/generate_query.py
code served (permissive licence) · get_code("5d40f691b98b3b24")
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 argparse

def positive_int(value):
    """Check if an integer value is positive"""
    value = int(value)
    if value < 1:
        raise argparse.ArgumentTypeError('Value must be positive')
    return value

ARGS = {
    'value': '42'
}
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 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
precision Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/metrics.py
code served (permissive licence) · get_code("c610c9ba3b321e3d")
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 torch
import numpy as np

torch.manual_seed(0)

# The function precision(tp, fp, fn) takes three numeric parameters
# tp: true positives
# fp: false positives
# fn: false negatives (not used in the function body, but included in signature)

# These should be numeric values that can be added and compared
tp = 10
fp = 3
fn = 2

ARGS = {
    "tp": tp,
    "fp": fp,
    "fn": fn
}
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 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
predicate_counts Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/user.py
code served (permissive licence) · get_code("fa9e3f0df15d7987")
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 defaultdict. 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 collections import defaultdict

# Construct a minimal query_log that matches WebQSP-style questions
# The function iterates through query_log, accesses query['Parse']['InferentialChain']
# and treats items in InferentialChain as predicates to count

query_log = [
    {
        'Parse': {
            'InferentialChain': ['predicate_a', 'predicate_b', 'predicate_a']
        }
    },
    {
        'Parse': {
            'InferentialChain': ['predicate_c', 'predicate_a']
        }
    },
    {
        'Parse': {
            'InferentialChain': ['predicate_b']
        }
    }
]

ARGS = {
    'query_log': query_log
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
query_vector Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/algorithms.py
code served (permissive licence) · get_code("fdaa7d19b62a3565")
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 ndarray, ndim 1, dtype family float, shape (10,) 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

class MockKnowledgeGraph:
    def __init__(self, num_entities=10):
        self._num_entities = num_entities
        self._entity_map = {
            '/m/entity_0': 0,
            '/m/entity_1': 1,
            '/m/entity_2': 2,
            '/m/entity_3': 3,
            '/m/entity_4': 4,
        }
    
    def number_of_entities(self):
        return self._num_entities
    
    def entity_id(self, mid):
        return self._entity_map.get(mid, 0)

KG = MockKnowledgeGraph(num_entities=10)

query_log = [
    {
        'Parse': {
            'TopicEntityMid': '/m/entity_0'
        }
    },
    {
        'Parse': {
            'TopicEntityMid': '/m/entity_1'
        }
    },
    {
        'Parse': {
            'TopicEntityMid': '/m/entity_0'
        }
    },
]

ARGS = {
    'KG': KG,
    'query_log': query_log,
}
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 ndarray, ndim 1, dtype family float, shape (10,) — shape (10,) 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
random_walk_with_restart Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/algorithms.py
code served (permissive licence) · get_code("b92170f581df785d")
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 ndarray, ndim 1, dtype family float, shape (5,) 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
from scipy import sparse

# Create a small sparse transition matrix M
# For random walk, this should be a valid stochastic matrix
# Let's create a 5x5 matrix where each column sums to 1
n_entities = 5
data = np.array([0.5, 0.5, 0.3, 0.7, 0.4, 0.6, 0.2, 0.8, 1.0])
row = np.array([0, 1, 1, 2, 2, 3, 3, 4, 0])
col = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4])
M = sparse.csr_matrix((data, (row, col)), shape=(n_entities, n_entities))

# Create seed initialization vector x
# This should be a probability distribution (sums to 1)
x = np.array([0.2, 0.2, 0.2, 0.2, 0.2])

# Set parameters
c = 0.15
power = 3

ARGS = {
    "M": M,
    "x": x,
    "c": c,
    "power": power
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
recall Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/metrics.py
code served (permissive licence) · get_code("0e2103a8ddc3def1")
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 torch

torch.manual_seed(0)

# The recall function takes three numeric values: tp, fp, fn
# (true positives, false positives, false negatives)
# It computes recall = tp / (tp + fn) if the denominator is positive

ARGS = {
    "tp": 15,
    "fp": 5,
    "fn": 10
}
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 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
reuse Ran
ran on a synthesized input
iDEA-iSAIL-Lab-UIUC/APEX/code/src/user.py
code served (permissive licence) · get_code("009124768559899b")
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 torch

# Construct a query log with WebQSP-style questions
# The function expects a list of dicts, each with at least a 'QuestionId' key
query_log = [
    {'QuestionId': 'q1', 'question': 'What is the capital of France?'},
    {'QuestionId': 'q2', 'question': 'What is the capital of Germany?'},
    {'QuestionId': 'q1', 'question': 'What is the capital of France?'},  # Repeat of q1
    {'QuestionId': 'q3', 'question': 'What is the capital of Spain?'},
    {'QuestionId': 'q2', 'question': 'What is the capital of Germany?'},  # Repeat of q2
]

ARGS = {
    'query_log': query_log
}
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 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

Also present in other papers' code

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

Knowledge graphs (KGs), which store an extensive number of relational facts, serve various applications. Recently, personalized knowledge graphs (PKGs) have emerged as a solution to optimize storage costs by customizing their content to align with users' specific interests within particular domains. In the real world, on one hand, user queries and their underlying interests are inherently evolving, requiring PKGs to adapt continuously; on the other hand, the summarization is constantly expected to be as small as possible in terms of storage cost. However, the existing PKG summarization methods implicitly assume that the user's interests are constant and do not shift. Furthermore, when the size constraint of PKG is extremely small, the existing methods cannot distinguish which facts are more of immediate interest and guarantee the utility of the summarized PKG. To address these limitations, we propose APEX$^2$, a highly scalable PKG summarization framework designed with robust theoretical guarantees to excel in adaptive summarization tasks with extremely small size constraints. To be specific, after constructing an initial PKG, APEX$^2$ continuously tracks the interest shift and adjusts the previous summary. We evaluate APEX$^2$ under an evolving query setting on benchmark KGs containing up to 12 million triples, summarizing with compression ratios $\leq 0.1\%$. The experiments show that APEX outperforms state-of-the-art baselines in terms of both query-answering accuracy and efficiency. Code is available at https://github.com/iDEA-iSAIL-Lab-UIUC/APEX.

For agents

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

get_harvested_code_for_paper("2412.17336")
get_code_for_paper("2412.17336")
have("2412.17336")

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

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

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

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

Connect an agent — have() is free.