SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.08170 · 2024

LLaGA: Large Language and Graph Assistant

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2402.08170.json · badge: /api/ran/2402.08170.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
vita-group/llaga canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
chenrunjin/llaga canonical (classifier label)
classifier basis: plan_row
2 ran · 2 no recorded run
FunctionStatusWhere it lives
build_graph_projector Ran
ran; our contract draft was wrong, not the code
vita-group/llaga/model/llaga_arch.py
code served (permissive licence) · get_code("8f38ce6681ca2d0c")
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 Linear. 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 MockConfig:
    def __init__(self):
        self.mm_hidden_size = 64
        self.word_embed_proj_dim = 32
        self.hidden_size = 32
        self.mm_projector_type = 'linear'

class MockConfigMLP:
    def __init__(self):
        self.mm_hidden_size = 64
        self.word_embed_proj_dim = 32
        self.hidden_size = 32
        self.mm_projector_type = '2-layer-mlp'

# Test case 1: linear projector
config_linear = MockConfig()

# Test case 2: MLP projector
config_mlp = MockConfigMLP()

ARGS = {
    'config': config_linear,
    'delay_load': False,
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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_pretrain_embedding_graph Ran
ran, honoured the contract we drafted
vita-group/llaga/eval/eval_pretrain.py
code served (permissive licence) · get_code("d6c5348247512bac")
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 Tensor, ndim 2, dtype family float, shape (2, 12) 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 os
import tempfile

torch.manual_seed(0)

# Create a temporary directory for mock data files
temp_dir = tempfile.mkdtemp()

# Create mock embedding files for the 'simteg' case
simteg_sbert = torch.randn(2, 4)
simteg_roberta = torch.randn(2, 3)
simteg_e5 = torch.randn(2, 5)

torch.save(simteg_sbert, os.path.join(temp_dir, 'simteg_sbert_x.pt'))
torch.save(simteg_roberta, os.path.join(temp_dir, 'simteg_roberta_x.pt'))
torch.save(simteg_e5, os.path.join(temp_dir, 'simteg_e5_x.pt'))

# Create a mock embedding file for other embedding types
other_embedding = torch.randn(2, 6)
torch.save(other_embedding, os.path.join(temp_dir, 'bert_x.pt'))

ARGS = {
    'data_dir': temp_dir,
    'pretrained_embedding_type': 'simteg'
}
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 Tensor, ndim 2, dtype family float, shape (2, 12) — shape (2, 12) 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_pretrain_embedding_hop Ran
ran, honoured the contract we drafted
vita-group/llaga/eval/eval_pretrain.py
code served (permissive licence) · get_code("12d0705b2d2a7886")
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 3, 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 os
import tempfile

torch.manual_seed(0)

# Create a temporary directory for mock embedding files
temp_dir = tempfile.mkdtemp()

# Create mock embedding tensors and save them
# We'll create small tensors (2 x 4) for embeddings
embedding_dim = 4
num_entities = 2

# For 'simteg' type, we need multiple embedding files
# Base files: simteg_sbert_x.pt, simteg_roberta_x.pt, simteg_e5_x.pt
# Hop files: simteg_sbert_{i}hop_x.pt, etc.

# Create mock embeddings for simteg case
for model_type in ['sbert', 'roberta', 'e5']:
    # Base embedding
    base_emb = torch.randn(num_entities, embedding_dim)
    torch.save(base_emb, os.path.join(temp_dir, f'simteg_{model_type}_x.pt'))
    
    # Hop embeddings (for hop=2, we need 1hop and 2hop)
    for hop_i in range(1, 3):
        hop_emb = torch.randn(num_entities, embedding_dim)
        torch.save(hop_emb, os.path.join(temp_dir, f'simteg_{model_type}_{hop_i}hop_x.pt'))

# Also create mock embeddings for non-simteg case (e.g., 'other_type')
other_type = 'other_type'
base_emb = torch.randn(num_entities, embedding_dim)
torch.save(base_emb, os.path.join(temp_dir, f'{other_type}_x.pt'))
for hop_i in range(1, 3):
    hop_emb = torch.randn(num_entities, embedding_dim)
    torch.save(hop_emb, os.path.join(temp_dir, f'{other_type}_{hop_i}hop_x.pt'))

# Create a mask (boolean tensor to index into embeddings)
mask = torch.tensor([True, False])

ARGS = {
    'data_dir': temp_dir,
    'pretrained_embedding_type': 'simteg',
    'hop': 2,
    'mask': mask
}
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 list, ndim 3, 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
split_list Ran
ran; our contract draft was wrong, not the code
chenrunjin/llaga/eval/eval_pretrain.py
code served (permissive licence) · get_code("076c252c52cbb161")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list. 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 math

def split_list(lst, n):
    """Split a list into n (roughly) equal-sized chunks"""
    chunk_size = math.ceil(len(lst) / n)
    return [lst[i:i + chunk_size] for i in range(0, len(lst), chunk_size)]

# Setup code
lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
n = 3

ARGS = {
    "lst": lst,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
split_to_even_chunks Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chenrunjin/llaga/train/llaga_trainer.py
code served (permissive licence) · get_code("10893c4608c08075")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 2, dtype family int; 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

torch.manual_seed(0)

# Analyzing the function:
# - indices: a list/sequence of indices that will be iterated over
# - lengths: a dict-like or list-like object that maps indices to their lengths (accessed via lengths[index])
# - num_chunks: an integer specifying how many chunks to split into

# Create sample data
indices = [0, 1, 2, 3, 4, 5]
lengths = {0: 10, 1: 15, 2: 8, 3: 12, 4: 9, 5: 11}
num_chunks = 3

ARGS = {
    "indices": indices,
    "lengths": lengths,
    "num_chunks": num_chunks,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — 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
get_mm_adapter_state_maybe_zero_3 Not yet run
unverified (harvested, no recorded run)
chenrunjin/llaga/train/llaga_trainer.py
code served (permissive licence) · get_code("bb35e3ac741bb2c9")
How it ran

no invocation recorded.

maybe_zero_3 Not yet run
unverified (harvested, no recorded run)
chenrunjin/llaga/train/llaga_trainer.py
code served (permissive licence) · get_code("735025744c1ab0cf")
How it ran

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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 4 the same month, 4 later) and 3 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
split_list 197 other papers
26 dated earlier, 10 the same month, 154 later, 6 same year, order not determinable, 1 undated
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2306.17107 (2023-06)
LLaVAR: Enhanced Visual Instruction Tuning for Text-Rich Image Understanding
2307.10490 (2023-07)
Abusing Images and Sounds for Indirect Instruction Injection in Multi-Modal LLMs
and 194 more not named here
get_mm_adapter_state_maybe_zero_3 43 other papers
8 dated earlier, 1 the same month, 34 later
2304.05884 (2023-04)
Unicom: Universal and Compact Representation Learning for Image Retrieval
2304.08485 (2023-04)
Visual Instruction Tuning
2310.03744 (2023-10)
Improved Baselines with Visual Instruction Tuning
and 40 more not named here
maybe_zero_3 42 other papers
8 dated earlier, 1 the same month, 33 later
2304.05884 (2023-04)
Unicom: Universal and Compact Representation Learning for Image Retrieval
2304.08485 (2023-04)
Visual Instruction Tuning
2310.03744 (2023-10)
Improved Baselines with Visual Instruction Tuning
and 39 more not named here
split_to_even_chunks 40 other papers
7 dated earlier, 1 the same month, 32 later
2304.05884 (2023-04)
Unicom: Universal and Compact Representation Learning for Image Retrieval
2304.08485 (2023-04)
Visual Instruction Tuning
2310.03744 (2023-10)
Improved Baselines with Visual Instruction Tuning
and 37 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Graph Neural Networks (GNNs) have empowered the advance in graph-structured data analysis. Recently, the rise of Large Language Models (LLMs) like GPT-4 has heralded a new era in deep learning. However, their application to graph data poses distinct challenges due to the inherent difficulty of translating graph structures to language. To this end, we introduce the Large Language and Graph Assistant (LLaGA), an innovative model that effectively integrates LLM capabilities to handle the complexities of graph-structured data. LLaGA retains the general-purpose nature of LLMs while adapting graph data into a format compatible with LLM input. LLaGA achieves this by reorganizing graph nodes to structure-aware sequences and then mapping these into the token embedding space through a versatile projector. LLaGA excels in versatility, generalizability and interpretability, allowing it to perform consistently well across different datasets and tasks, extend its ability to unseen datasets or tasks, and provide explanations for graphs. Our extensive experiments across popular graph benchmarks show that LLaGA delivers outstanding performance across four datasets and three tasks using one single model, surpassing state-of-the-art graph models in both supervised and zero-shot scenarios. Our code is available at \url{https://github.com/VITA-Group/LLaGA}.

For agents

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

get_harvested_code_for_paper("2402.08170")
get_code_for_paper("2402.08170")
have("2402.08170")

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

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

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

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

Connect an agent — have() is free.