Source-linked AI summary

Graph-ToolFormer: To Empower LLMs with Graph Reasoning Ability via Prompt Augmented by ChatGPT

Jiawei Zhang

arXiv:2304.11116v3cs.AIcs.LG

TL;DR

Existing LLMs have reported weaknesses in calculation, multi-step reasoning, and spatial and temporal understanding needed for graph tasks. Graph-ToolFormer fine-tunes existing models to use external graph APIs; reported performance is strong on graph properties, while graph loading has lower API accuracy. The paper also reports occasional inconsistent or messy generations.

  • Problem

    LLMs are described as weak at precise calculation, multi-step reasoning, and spatial or temporal understanding relevant to graph learning.

    Source: §1 · pp. 1–2
  • Method

    Graph-ToolFormer uses ChatGPT-augmented prompts to fine-tune existing LLMs to use external graph data-loading and reasoning tools.

    Source: §1 · pp. 2–3
  • Results

    Graph property reasoning reached 94.56 R1 and over 91 BLEU, while graph loading scored 82.28 R1, 67.74 R2, 63.53 BLEU with BP 89.98, and 4.38 API Accuracy.

    Source: §5.5.2 · p. 24, §5.5.1 · p. 24
  • Takeaways & Limitations

    The paper studies Graph-ToolFormer across basic graph properties and real-world graph tasks including bibliographic, molecular, recommender, social, and knowledge-graph reasoning.

    Source: §1 · p. 3

    A very small number of inputs produced messy, duplicated outputs with random API calls, and some generations were inconsistent with the ground-truth statements.

    Source: §5.7 · p. 27

Abstract

from arXiv · show

In this paper, we aim to develop a large language model (LLM) with the reasoning ability on complex graph data. Currently, LLMs have achieved very impressive performance on various natural language learning tasks, extensions of which have also been applied to study the vision tasks with multi-modal data. However, when it comes to the graph learning tasks, existing LLMs present very serious flaws due to their several inherited weaknesses in performing {multi-step logic reasoning}, {precise mathematical calculation} and {perception about the spatial and temporal factors}. To address such challenges, in this paper, we will investigate the principles, methodologies and algorithms to empower existing LLMs with graph reasoning ability, which will have tremendous impacts on the current research of both LLMs and graph learning. Inspired by the latest ChatGPT and Toolformer models, we propose the Graph-ToolFormer (Graph Reasoning oriented Toolformer) framework to teach LLMs themselves with prompts augmented by ChatGPT to use external graph reasoning API tools. Specifically, we will investigate to teach Graph-ToolFormer to handle various graph data reasoning tasks in this paper, including both (1) very basic graph data loading and graph property reasoning tasks, ranging from simple graph order and size to the graph diameter and periphery, and (2) more advanced reasoning tasks on real-world graph data, such as bibliographic networks, protein molecules, sequential recommender systems, social networks and knowledge graphs.

1 INTRODUCTION

The introduction motivates graph reasoning as a gap for LLMs, whose weaknesses align with demands of graph tasks. Graph-ToolFormer addresses this by fine-tuning existing LLMs to use external graph tools.

Graph-ToolFormer

  • The proposed framework uses ChatGPT to augment prompts with graph-reasoning API calls, then uses the generated dataset to fine-tune causal LLMs.The introduction describes hand-crafted instructions and a small number of prompt examples as the starting point.Source: Figure 1 · p. 2, §1 · p. 2

Motivation

  • Graph learning requires precise calculation, multi-hop reasoning, spatial and topological understanding, and sometimes handling graph dynamics—areas identified as weaknesses of current LLMs.The introduction also notes that graph data has received less attention than language and vision in LLM development.Source: §1 · pp. 1–2

Graph-ToolFormer

  • Graph-ToolFormer fine-tunes existing pretrained LLMs to decide where graph data comes from and which external tools to use, when, and how.The authors cite high pretraining costs as a reason to adapt existing models rather than train new LLMs from scratch.Source: §1 · p. 2

Contributions

  • The paper presents Graph-ToolFormer as a general LLM for graph reasoning and reports studies spanning graph properties, bibliographic networks, molecules, recommendation, social networks, and knowledge graphs.Its stated contributions also include releasing raw graph data and the generated prompt dataset.Source: §1 · p. 3

2 RELATED WORK

The related work situates Graph-ToolFormer alongside graph neural networks, language models with external tools, and prompt-tuning approaches. It reviews their methods and reported constraints.

2.1 Graph Neural Networks

  • Graph neural networks learn graph embeddings; GCN-based models can face suspended animation and over-smoothing, while residual learning, residual or dense connections, and dilated convolutions are proposed responses.Other cited work explores recurrent networks for deep graph representation learning.Source: §2.1 · p. 3

2.2 Language Models

  • Toolformer proposes language models that automatically decide how to use external APIs, following earlier work on augmenting language models with tools.The section also surveys Transformer-based LLMs and examples including BERT, BART, GPT, ELMo, and MT-DNN.Source: §2.2 · p. 3

2.3 Prompt Tuning

  • Prompt tuning is grouped into discrete prompts, continuous prompts, and priming, which respectively use template text, learned prompt embeddings, or examples prepended to an evaluation input.The section describes discrete prompts as typically tuning all model parameters, while continuous prompts update fewer parameters.Source: §2.3 · p. 3
  • A cited analysis reports discrete prompts working well in few-shot tuning, no reported success yet for continuous prompts in few-shot settings, and priming being costly but appearing effective for GPT-3 (175B).These are the related-work section’s reported comparisons, not results from this paper.Source: §2.3 · p. 4

3 NOTATION, TERMINOLOGY DEFINITION AND PROBLEM FORMULATION

This section establishes notation and distinguishes graph data structures before formulating six graph-learning task types. It proposes one LLM framework that uses external graph-tool API calls across these tasks.

3.1 Basic Notations

  • Scalars use lowercase letters, vectors bold lowercase, matrices bold uppercase, and sets or high-order tensors calligraphic uppercase.The section also defines matrix rows and columns and transpose notation.Source: §3.1 · p. 4

3.2 Terminology Definitions

  • A graph is represented as G=(V,E), with V its nodes and E its links; |V| and |E| are called its order and size.Source: §3.2 · p. 4
  • Graphs may carry node or link features and labels, represented as vectors in feature and label spaces.The notation assigns each node and link its corresponding feature and label vectors.Source: §3.2 · p. 4
  • The paper distinguishes giant networks with one large graph from datasets of many smaller graph instances, and defines a graph set for the latter.The graph-set definition represents the dataset as a set of individual graphs.Source: §3.2 · p. 4

3.3 Problem Formulation

  • The studied tasks cover six graph-learning problem types: attribute calculation, node classification, graph classification, link prediction, graph partitioning or clustering, and graph searching.Examples include graph properties, paper topics, molecular functions, recommendations, social communities, and knowledge-graph entities or relations.Source: §3.3 · pp. 4–5
  • Sequential recommendation is framed as temporal link prediction: historical user-item interactions inform predictions of future link existence or weight.The predicted weight can represent a rating score.Source: §3.3 · p. 5
  • Graph-ToolFormer addresses diverse tasks through external graph-tool API calls embedded in reasoning statements, using ChatGPT-generated prompts to fine-tune pretrained LLMs.The framework outline identifies prompt annotation and augmentation, model fine-tuning, and inference that adds API calls to statements.Source: §3.3 · p. 5, Figure 2 · p. 5

4 PROPOSED METHOD

The method fine-tunes LLMs with ChatGPT-augmented prompts to generate graph-reasoning API calls from statements and questions, including selecting APIs and completing their parameters. It parses and executes the calls, inserts returned results into text, and defines prompt construction, graph-data and task hubs, and bounded working memory for recent calls and results.

4.1 Framework Outline

  • Graph-ToolFormer uses ChatGPT to augment hand-crafted API-call prompts, then fine-tunes pretrained causal LLMs for inference with graph tools.LoRA, 8-bit Adam, and model quantization enable fine-tuning on GPUs with 24GB or even 11GB RAM; the model inserts calls into output statements at appropriate positions.Source: §4.1 · p. 6

4.2 Prompts with API Calls

  • API calls appear inside output statements, with special tokens marking calls and allowing nested or sequential tool operations.Calls can return results inline or store them in working memory, depending on the call and context; the parser recognizes the delimiters and executes the calls.Source: §4.2 · p. 6

4.3 Graph Reasoning Oriented Prompts

  • The framework targets fundamental graph tasks—including attribute calculation, node and graph classification, link prediction, clustering, and searching—and can extend to other applications with API changes.Its API calls can load large, connected graphs from offline files or online repositories using a dataset name, file path, or URL.Source: §4.3 · p. 7, §4.3.1 · p. 7

4.3.1 Graph Data Loading.

  • Graph-loading APIs retrieve either an entire graph or selected nodes and links from local files or online repositories.A caller can specify node or link subsets and request their related links or nodes, enabling subgraph loading.Source: §4.3.1 · pp. 7–8

4.3.2 Graph Property Reasoning.

  • External APIs compute graph properties that demand logic and mathematical reasoning, which the authors say existing language models struggle to calculate reliably.The properties include order, size, density, shortest paths, eccentricity, diameter, radius, center, and periphery; shortest-path calls can support traffic-distance reasoning.Source: §4.3.2 · pp. 8–9

4.3.3 Advanced Graph Reasoning Tasks.

  • Advanced APIs cover timestamp-aware user-item prediction, social-community detection, and entity or relation inference over an assumed prebuilt knowledge graph.BPR is the default recommendation model, and TransE is the default knowledge-graph reasoning model.Source: §4.3.3 · pp. 11–12

4.4 Prompt Augmentation with ChatGPT

  • ChatGPT augments the limited API-call examples because the paper considers them insufficient for fine-tuning existing LLMs.The authors use ChatGPT (gpt-3.5-turbo) to generate additional prompt instances.Source: §4.4 · p. 12

4.4.1 Graph Loading Prompt Dataset Generation.

  • ChatGPT generated 5,000 graph-loading input-output pairs, of which about 2,803 remained after incomplete instances were removed and the data were proofread.Source: §4.4.1 · p. 13

4.4.2 Graph Reasoning Prompt Dataset Generation.

  • For graph-reasoning prompts, the authors manually compose input statements using graph-toolkit results, then use ChatGPT to annotate API calls and rephrase inputs.They run the generated calls and filter outputs that are not runnable or do not return the stated correct result.Source: §4.4.2 · pp. 13–14

4.5 LLMs Fine-Tuning for Graph Reasoning

  • Fine-tuning teaches LLMs to place API calls in context, choose the appropriate API functions, and extract their parameters from input statements.The method frames these as three challenges: identifying insertion positions, selecting functions, and extracting parameters.Source: §4.5 · p. 14

4.5.1 API Call Insertion Position Prediction.

  • The model selects the single most likely API-call insertion position by maximizing the conditional probability of generating the special <API> token at each position.The selected position is the argmax over token positions in the input statement.Source: §4.5.1 · p. 14

4.5.2 API Call Domain and Function Selection.

  • Graph-ToolFormer encodes API calls with a domain:function name so it can select the toolkit or model and begin backend preloading while generating the call.Domains may identify toolkits or pretrained models, and the system can choose among approaches with differing effectiveness and efficiency.Source: §4.5.2 · p. 15

4.5.3 API Call Function Parameter Completion.

  • Graph-ToolFormer uses autoregressive causal completion for API parameters, avoiding masked completion that requires generating every parameter and conflicts with the preceding autoregressive process.Only parameters supplied in the generated call need to be produced; unspecified parameters can use defaults.Source: §4.5.3 · p. 15

4.5.3 API Call Function Parameter Completion

  • API parameter completion continues until “</API>” is generated, and parameters the model does not generate use their default values.Generated parameter names and values are added to the token list for the API call.Source: §4.5.3 · p. 15

4.5.4 LLMs Fine-Tuning with Augmented API Call Dataset

  • Fine-tuning compares each model-generated output with its ChatGPT-annotated target to define a loss for training.The supplied passages introduce the loss but do not provide its formula.Source: §4.5.4 · pp. 15–16

4.6 Graph Reasoning Q&A Prompts

  • Question-answer prompts pair reasoning questions with API-annotated statements and are merged with statement prompts for fine-tuning across graph properties and real-world graph tasks.Unlike statement prompts, question and answer inputs are not duplicated copies, while causal language models can still generate the desired output statements.Source: §4.6 · pp. 16–17

4.7 LLMs Inference and Graph Reasoning Query Parsing, Execution and Post-Processing

  • The framework processes graph queries through generation, parsing, execution, graph data/model/task hubs, working memory, and output post-processing.The executor loads the relevant graph data, calls a graph reasoning model and task API, stores results, and replaces query text when needed.Source: §4.7 · p. 18, Figure 3 · p. 19

4.7.1 LLMs Inference

  • Fine-tuned LLMs generate API-annotated statements for input statements and questions, placing calls correctly for the majority of inputs before passing them to the parser.The paper illustrates statement and question inputs about a Cora paper topic.Source: §4.7.1 · p. 18

4.7.2 Query Parser Module

  • The parser extracts API calls and insertion tags into an executable format, recursively parsing nested calls and routing results to statement text or working memory.A “–>r” tag signals that the query text should be replaced by the reasoning result; without it, the result is recorded in working memory.Source: §4.7.2 · p. 18

4.7.3 Graph Reasoning Hubs

  • The framework’s hubs organize preprocessed graph datasets, ready-to-use models, graph reasoning tasks, and fine-tuned LLMs for API generation.The model hub includes tools for graph properties, node and graph classification, clustering, recommendation, and knowledge-graph search; application tasks map to fundamental graph-learning tasks.Source: §4.7.3 · pp. 18–20

4.7.4 Query Executor Module

  • The executor interprets nested graph-loading and reasoning calls, selects the specified model and target, and inserts the result when the output tag is present.The Cora example loads the dataset, uses Graph-Bert to infer the topic of Paper#1, and marks the result for insertion.Source: §4.7.4 · p. 20

4.7.4 Query Executor Module.

  • The query executor calls the matching API with graph data and parameters, then replaces an output insertion token with the returned reasoning result.For example, it changes [TBR] to “Neural Networks” in the Cora paper-topic output.Source: §4.7.4 · p. 20
  • A bounded FIFO working memory stores read-only results from recent graph-loading and graph-reasoning API calls for reuse on similar queries against the same dataset.When capacity is exceeded, it removes the oldest results or results already rewritten; reuse is especially helpful for costly loading or reasoning calls.Source: §4.7.5 · p. 20

5 EXPERIMENTS

The experiments evaluate Graph-ToolFormer across diverse graph-reasoning tasks and new graph datasets, examining performance with ChatGPT-augmented prompts and pre-trained graph tools. They also assess the effects of fine-tuning on general language generation and identify continual learning techniques as needed to address forgetting.

5.4 Experimental Settings.

  • The experiments combine ChatGPT-augmented prompts, GPT-J 6B 8-bit fine-tuning, and task-specific graph APIs, evaluated with ROUGE, BLEU/BP, and API-call accuracy.Training and testing prompts for each task were merged across datasets; the graph tools support property calculation, classification, clustering, recommendation, and knowledge-graph search.Source: §5 · p. 20, §5.2 · p. 22, §5.3 · p. 22

5.5.1 Graph Data Loading.

  • Graph loading scored Rouge-1 82.28, Rouge-2 67.74, BLEU 63.53, BP 89.98, and API accuracy 4.38.The authors attribute the low API accuracy to diverse formats in ChatGPT-generated graph-loading calls.Source: Table 4 · p. 23, §5.5.1 · p. 24

5.5.2 General Graph Property Loading.

  • Graph property reasoning achieved R1 94.56, BLEU above 91, and API-generation accuracy 80% across 2,587 API-call pairs.The graph instances averaged 14.70 nodes and 28.27 links.Source: Table 4 · p. 23, §5.5.2 · p. 24

5.5.3 Bibliographic Paper Topic Reasoning.

  • Bibliographic reasoning was near 100 on R1, BLEU, and API accuracy across Cora, Citeseer, and Pubmed; molecular reasoning worked perfectly on PROTEINS, PTC, and NCI1.The molecular passage does not report a result for MUTAG.Source: §5.5.3 · p. 24, §5.5.4 · p. 24

5.5.5 Sequential Recommender System Reasoning.

  • Recommendation API calls were correct on MovieLens and Amazon, with Last.FM slightly lower; social-network outputs generated more than 95% of API calls correctly.The social-network evaluation used Foursquare and Twitter, which lack ground-truth community labels.Source: §5.5.5 · p. 24, §5.5.6 · pp. 24, 27

5.5.7 Knowledge Graph Reasoning.

  • Knowledge-graph API generation scored slightly lower, partly because special entity and relation tokens were difficult for the LLM to reproduce.The experiments used Freebase and WordNet.Source: §5.5.7 · p. 27

5.6 Graph Reasoning Case Studies

  • Case studies show Graph-ToolFormer inserting graph-property API calls and demonstrate reasoning examples for bibliographic, molecular, recommendation, social-network, and knowledge-graph tasks.Examples include preference scoring and top-k recommendations, community identification, and entity or relation search.Source: §5.6 · p. 27

5.7 Inconsistent Generation Result Analysis

  • Inconsistencies range from messy or duplicated outputs and extra tokens to missing parameters, API calls, incomplete statements, or no output; the paper also examines zero-shot inference cases.Some outputs use the correct API calls but phrase the surrounding statements differently; the supplied passage introduces zero-shot case studies without reporting their findings.Source: §5.7 · pp. 27–28, §5.8 · p. 28

5.8 Zero-Shot Inference

  • Six of seven reasoning tasks on new graph datasets generated desired statements with correct API calls; the Twitter diameter task produced an unexpected API call.The incorrect call used “seg_bert:molecule_gtopic” as the graph property.Source: §5.8 · p. 28
  • Among six examples of new reasoning tasks, only calculating a “new_attribute” of the bull graph generated the desired output; the other five outputs were wrong.The failed tasks covered paper authors, molecular atom-node counts, recommender-system brands, social-network common followees, and knowledge-graph relation counts.Source: §5.8 · p. 28

5.9 Language Generation Ability Revisit

  • For four test inputs, fine-tuned Graph-ToolFormer outputs were random tokens or unexpected API calls, except that the third remained closely related to its input.The inputs comprised two Pile test instances and two recent news articles.Source: §5.9 · p. 28
  • Continual learning techniques are needed to preserve general language generation during fine-tuning and prevent catastrophic forgetting in Graph-ToolFormer.This need applies if the model is to handle graph reasoning while retaining language generation for non-graph inputs.Source: §5.9 · p. 28

6 CONCLUSION

Graph-ToolFormer adds external graph data-loading and reasoning tools to existing LLMs, using fine-tuned models for a range of graph tasks. The reported experiments demonstrate effectiveness across many of the studied tasks.

6 CONCLUSION

  • Graph-ToolFormer teaches existing LLMs to use external graph data-loading and reasoning tools through fine-tuning.The framework is presented as an approach to empower LLMs with graph reasoning ability.Source: §6 · p. 28
  • The studied tasks span basic graph properties and bibliographic, molecular, recommender, social-network, and knowledge-graph reasoning.The paper designs API-call prompt examples for these tasks and uses ChatGPT to augment them into larger reasoning datasets.Source: §6 · p. 28
  • Experiments on many studied graph reasoning tasks demonstrate the effectiveness of fine-tuning existing pre-trained LLMs with the generated prompt dataset.Source: §6 · p. 28

7 FUTURE RESEARCH DIRECTIONS

The paper identifies directions for extending Graph-ToolFormer across graph models, interpretability, efficiency, and applications. It also notes that the framework’s current design limits access to GNN internals and textual explanations.

Future directions

  • Graph-ToolFormer is proposed as a platform to bridge graph learning with LLM and AIGC research, and its experiments support LLMs as a unified interface for varied graph reasoning tasks.The authors suggest further models and frameworks integrating graph reasoning into LLMs.Source: §7 · p. 28

GNNs Transfer

  • Pre-trained GNNs could be hosted in Graph-ToolFormer, but supporting every dataset-task combination would require about |graph datasets| × |graph reasoning tasks| models.The authors identify transferability across datasets and tasks as a future research focus.Source: §7 · p. 28

Integrated Learning of LLMs and GNNs

  • Because LLM and GNN pre-training are separate, Graph-ToolFormer’s LLM calls GNNs as a reasoning interface without access to their internal components or representations.This design works for result-oriented tasks but is insufficient when tasks require intermediate representations or explanations of the reasoning process.Source: §7 · pp. 28–29

Regulation and Interpretability

  • Graph-ToolFormer cannot currently provide textual explanations of its reasoning process or results, a stated focus for future work.Source: §7 · p. 29

Efficiency

  • LoRA and quantization reduce fine-tuning memory needs to below 11GB, but large graph data and graph models can still make the framework inefficient.Additional techniques are needed for deployment on devices with very small memories.Source: §7 · p. 30

Diverse Applications

  • The paper studies only a limited number of graph reasoning tasks, and proposes applying the framework to more real-world graph and network data.Source: §7 · p. 30
  • Molecular and social-network reasoning are discussed as potential applications to healthcare, including virus analysis and propagation inference.Source: §7 · p. 30

Multi-Modal Learning

  • Graphs could bridge multimodal data, such as text-derived knowledge graphs and image-derived scene graphs, within a unified LLM framework.Source: §7 · p. 31

A APPENDIX: GRAPH DATA FORMAT

The appendix describes loading graph datasets and organizing them as dictionaries, with distinct formats for single large networks and collections of graph instances.

A.1 Graph Data Loading

  • Datasets are stored in binary format and can be loaded with pickle.Source: §A.1 · p. 32

A.2 Graph Dataset

  • For a single large-scale graph, the loaded dataset is organized as a Python dictionary.The listed examples include Cora, Pubmed, Citeseer, Twitter, WordNet, and Freebase.Source: §A.2 · p. 32
  • The single-graph profile includes the graph order, whether it is directed, and whether it is weighted.Source: §A.2 · p. 32
  • Single-graph dictionaries may also store attributes such as feature-vector and label-space dimensions, plus features and labels for nodes and node pairs.Source: §A.2 · p. 32

A.3 Graph Instance Dataset

  • Datasets containing multiple graph instances are also organized as Python dictionaries.Examples include GPR and molecular graph datasets such as Proteins, Mutag, NCI1, and PTC.Source: §A.3 · p. 32
  • The multi-instance profile includes graph count, directedness, and weightedness, with optional extra attributes.Source: §A.3 · p. 32
  • Each graph-instance dictionary can include its node set, link set, and graph-instance label.Source: §A.3 · p. 32

B APPENDIX: PROMPT DATASET

The appendix describes prompt collections for graph datasets and the training/test fields used in each prompt instance. The collections include dataset-specific prompts and a mixed set for tuning.

B.1 Shared Prompt Datasets

  • The shared prompt directory contains graph reasoning prompts for 15 datasets, each with corresponding raw graph data.Source: §B.1 · p. 33
  • Each dataset directory contains training and testing graph reasoning tuples.Source: §B.1 · p. 33
  • The mixed collection merges prompts from 15 datasets, excluding graph data loading, and is used for LLM tuning.Separate collections cover graph properties, bibliographic networks, molecular graphs, recommender systems, social networks, and knowledge graphs.Source: §B.1 · p. 33
  • Dataset-specific prompts use concrete data instances, node IDs, relations, and reasoning outputs, with templates augmented by ChatGPT.Source: §B.1 · p. 33
  • A separate graph-data-loading prompt collection is generated purely by ChatGPT.Source: §B.1 · p. 33

B.2 Prompt Format

  • Each prompt collection has separate training and testing files, and each prompt instance contains three entries.Source: §B.2 · p. 33
  • The entries are input, annotated output with graph reasoning API calls, and—when included—the reasoning result for evaluation.Source: §B.2 · p. 33

C APPENDIX: PRE-TRAINED GRAPH MODELS

The framework includes six different pre-trained graph models, each assigned to a graph reasoning task.

C APPENDIX: PRE-TRAINED GRAPH MODELS

C.1 Toolx for Graph Property Reasoning

The current toolx model is implemented based on networkx and implements functions to calculate graph properties mentioned in the paper.

C.1 Toolx for Graph Property Reasoning

  • The current toolx model is based on networkx and implements functions to calculate the graph properties discussed in the paper.Source: §C.1 · p. 33

C.2 Graph-Bert for Bibliographic Network Paper Topic Reasoning

Graph-Bert is used for bibliographic network paper-topic inference, formulated as node classification. Its pre-trained models, code, and parameter checkpoints are provided.

C.2 Graph-Bert for Bibliographic Network Paper Topic Reasoning

  • Graph-Bert was proposed in a paper titled “Graph-Bert: Only Attention is Needed for Learning Graph Representations.”Source: §C.2 · p. 33
  • Bibliographic network paper-topic inference with Graph-Bert is reduced to a node classification task.Source: §C.2 · p. 33
  • The model is pre-trained on Cora, PubMed, and CiteSeer using the identical train/test sets introduced in the paper.Model code and pre-trained parameter checkpoints are provided.Source: §C.2 · p. 33

C.3 SEG-Bert for Molecualr Graph Function Reasoning

SEG-Bert is used for molecular graph function inference, formulated as graph classification. Its pre-trained models, code, and parameter checkpoints are provided.

C.3 SEG-Bert for Molecualr Graph Function Reasoning

  • SEG-Bert was proposed in a paper titled “Segmented Graph-Bert for Graph Instance Modeling.”Source: §C.3 · p. 33
  • Molecular graph function inference with SEG-Bert is reduced to a graph classification task.Source: §C.3 · p. 33
  • The model is pre-trained on proteins, MUTAG, NCI1, and PTC using the identical train/test sets introduced in the paper.Model code and pre-trained parameter checkpoints are provided.Source: §C.3 · p. 34

C.4 KMeans for Social Network Community Reasoning

The section uses pairwise common-neighbor counts from the social-network adjacency matrix as a closeness measure for KMeans community detection. It specifies functions for retrieving community labels and sizes, summarizing detected communities, and checking whether two users share a community.

C.4 KMeans for Social Network Community Reasoning

  • Pairwise common-neighbor counts define node closeness from the social-network adjacency matrix for KMeans community detection.Source: §C.4 · p. 34
  • Community functions return labels for all users or specified users, and report the number, average size, or maximum size of detected communities.Source: §C.4 · p. 34
  • For an input user, the functions return its community size and check whether two input users belong to the same community.Source: §C.4 · p. 34

C.5 BPR for Recommender System Reasoning

The section uses BPR to implement social-network community-detection functions, reducing them to graph partitioning or clustering tasks. It lists recommendation and top-k recommendation functions.

C.5 BPR for Recommender System Reasoning

  • The section identifies BPR as proposed in “BPR: Bayesian personalized ranking from implicit feedback.”Source: §C.5 · p. 34
  • BPR is used to implement social-network community detection by reducing those functions to graph partitioning or clustering tasks.Source: §C.5 · p. 34
  • The listed BPR.py functions are recommendation and top-k recommendation.Source: §C.5 · p. 34

C.6 TransE for Knowledge Graph Reasoning

The section uses TransE to implement knowledge-graph entity and relation searches, framing them as graph-search tasks. It lists functions to search head entities, tail entities, and relations.

C.6 TransE for Knowledge Graph Reasoning

  • The section identifies TransE as proposed in “Transitionbased Knowledge Graph Embedding with Relational Mapping Properties.”Source: §C.6 · p. 34
  • TransE is used to implement knowledge-graph entity and relation searches, reduced to graph-search tasks.Source: §C.6 · p. 34
  • The TransE.py functions search head entities, tail entities, and relations.Source: §C.6 · p. 34
Loading 2304.11116v3…