Papers › GOFA: A Generative One-For-All Model for Joint Graph Language Modeling

GOFA: A Generative One-For-All Model for Joint Graph Language Modeling

12 Jul 2024arXiv:2407.09709archive 2025-07-28

Lecheng Kong, Jiarui Feng, Hao liu, Chengsong Huang, Jiaxin Huang, Yixin Chen, Muhan Zhang

Foundation models, such as Large Language Models (LLMs) or Large Vision Models (LVMs), have emerged as one of the most powerful tools in the respective fields. However, unlike text and image data, graph data do not have a definitive structure, posing great challenges to developing a Graph Foundation Model (GFM). For example, current attempts at designing general graph models either transform graph data into a language format for LLM-based prediction or still train a GNN model with LLM as an assistant. The former can handle unlimited tasks, while the latter captures graph structure much better -- yet, no existing work can achieve both simultaneously. In this paper, we identify three key desirable properties of a GFM: self-supervised pretraining, fluidity in tasks, and graph awareness. To account for these properties, we extend the conventional language modeling to the graph domain and propose a novel generative graph language model GOFA to solve the problem. The model interleaves randomly initialized GNN layers into a frozen pre-trained LLM so that the semantic and structural modeling abilities are organically combined. GOFA is pre-trained on newly proposed graph-level next-word prediction, question-answering, and structural tasks to obtain the above GFM properties. The pre-trained model is further fine-tuned on downstream tasks to obtain task-solving ability. The fine-tuned model is evaluated on various downstream tasks, demonstrating a strong ability to solve structural and contextual problems in zero-shot scenarios. The code is available at https://github.com/JiaruiFeng/GOFA.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2407.09709")

Code

Syntology Ran 5 of 9 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 1 ran · honoured contract; 4 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jiaruifeng/gofa officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 5 ran; 1 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
4ran
4unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from jiaruifeng/gofa. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

add_self_loop jiaruifeng/gofa/model.py official repository ran MIT (permissive) · 9d81d17dcf7d7e7a · report
extract_numbers jiaruifeng/gofa/utils.py official repository ran fingerprinted MIT (permissive) · 03b3e38ed24cd3b1 · report
identity jiaruifeng/gofa/model.py official repository ran · honoured contract fingerprinted MIT (permissive) · 9910e2fc297f8665 · report
pyg_to_gofa_dict jiaruifeng/gofa/modules/utils.py official repository ran MIT (permissive) · 658b660186c6cd2a · report
sentence_accuracy jiaruifeng/gofa/utils.py official repository ran MIT (permissive) · cd89995d2a306d92 · report
apply_rotary_pos_emb_single jiaruifeng/gofa/modules/gofa/gnn.py official repository unverified MIT (permissive) · 0ad3b2ccd6dc5318 · report
prepare_gofa_graph_input_from_pyg jiaruifeng/gofa/modules/utils.py official repository unverified MIT (permissive) · fa4984787d22f0a1 · report
safe_download_hf_file jiaruifeng/gofa/modules/utils.py official repository unverified MIT (permissive) · c47d986f7581528f · report
sentence_base jiaruifeng/gofa/utils.py official repository unverified MIT (permissive) · 5cbbd589ef13a1b2 · report

Tasks

AllLanguage ModelingLanguage ModellingQuestion Answering

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections