Add model card for GILT (#1)
Browse files- Add model card for GILT (a24636c6bf8429f824b1353bdb4c0f4c12e3e4bc)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: graph-ml
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# GILT: Graph In-context Learning Transformer
|
| 6 |
+
|
| 7 |
+
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.
|
| 8 |
+
|
| 9 |
+
- **Paper**: [GILT: An LLM-Free, Tuning-Free Graph Foundational Model for In-Context Learning](https://huggingface.co/papers/2510.04567)
|
| 10 |
+
- **Repository**: [https://github.com/yiming421/inductnode/](https://github.com/yiming421/inductnode/)
|
| 11 |
+
|
| 12 |
+
## Key Features
|
| 13 |
+
|
| 14 |
+
- **LLM-Free**: Works directly with numerical features without text dependency.
|
| 15 |
+
- **Tuning-Free**: Adapts to new tasks via in-context learning without gradient updates.
|
| 16 |
+
- **Multi-Task**: Unified framework for node, link, and graph classification.
|
| 17 |
+
- **Efficient**: Orders of magnitude faster than tuning-based or LLM-based methods.
|
| 18 |
+
- **Strong Performance**: State-of-the-art few-shot results across diverse benchmarks.
|
| 19 |
+
|
| 20 |
+
## Installation
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
# Create conda environment
|
| 24 |
+
conda env create -f env.yml
|
| 25 |
+
conda activate gnn
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Quick Start
|
| 29 |
+
|
| 30 |
+
### Training
|
| 31 |
+
|
| 32 |
+
To train GILT from scratch with the default configuration:
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
python train.py
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### Few-Shot Evaluation
|
| 39 |
+
|
| 40 |
+
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:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
# Download checkpoint (replace with local path if downloaded manually)
|
| 44 |
+
# Multi-task evaluation
|
| 45 |
+
python train.py --use_pretrained_model true --load_checkpoint checkpoints/gilt_model.pt
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
The model performs in-context learning without any parameter updates, directly inferring from few-shot examples.
|
| 49 |
+
|
| 50 |
+
## Architecture
|
| 51 |
+
|
| 52 |
+
GILT consists of two main components:
|
| 53 |
+
1. **Graph-Native Tokenization**: Converts heterogeneous graphs into unified token representations using PCA-based feature alignment and a deep linear GCN encoder.
|
| 54 |
+
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.
|