gilt-checkpoint / README.md
fdsajkshf's picture
Add model card for GILT (#1)
bc1cd35
metadata
pipeline_tag: graph-ml

GILT: Graph In-context Learning Transformer

GILT is a novel Graph Foundational Model (GFM) that achieves LLM-free and tuning-free in-context learning on graphs. Unlike existing approaches that rely on Large Language Models or require costly per-graph tuning, GILT reframes few-shot graph learning as a token-based reasoning problem, enabling direct inference on new tasks without any parameter updates.

Key Features

  • LLM-Free: Works directly with numerical features without text dependency.
  • Tuning-Free: Adapts to new tasks via in-context learning without gradient updates.
  • Multi-Task: Unified framework for node, link, and graph classification.
  • Efficient: Orders of magnitude faster than tuning-based or LLM-based methods.
  • Strong Performance: State-of-the-art few-shot results across diverse benchmarks.

Installation

# Create conda environment
conda env create -f env.yml
conda activate gnn

Quick Start

Training

To train GILT from scratch with the default configuration:

python train.py

Few-Shot Evaluation

GILT requires no tuning for new tasks. You can simply provide a few labeled examples at inference time. To evaluate using a pre-trained model:

# Download checkpoint (replace with local path if downloaded manually)
# Multi-task evaluation
python train.py --use_pretrained_model true --load_checkpoint checkpoints/gilt_model.pt

The model performs in-context learning without any parameter updates, directly inferring from few-shot examples.

Architecture

GILT consists of two main components:

  1. Graph-Native Tokenization: Converts heterogeneous graphs into unified token representations using PCA-based feature alignment and a deep linear GCN encoder.
  2. In-Context Reasoning: A Transformer-based module that performs reasoning over contextual tokens using a two-stage attention mechanism and a prototypical prediction head.