How yuhanwang315/g2lora works
G2LoRA is a graph–language model for few-shot continual learning, documented for class-, domain-, and task-incremental experiments (CIL, DIL, TIL). The user launches an experiment through main.py with a dataset, model, and continual-learning settings; the runtime then prepares graph/text data and task splits before training and evaluation. Its model combines graph and text encoders with LoRA-based adaptation. The map includes documented capabilities, but internal links not shown in the excerpts or reference index are dashed and unverified.
Main entry points: GTAlign.py GTAlign training · main.py Experiment entry · graphclip.py GraphCLIP model · experiment.py Run orchestration
Components 22
Experiment workflow
- Experiment entry
main.py - Experiment settings
G2LoRA/models/utils/args.py - Run orchestration
G2LoRA/experiment.py - Class incremental
- Domain incremental
- Task incremental
Graph data
- Graph/text dataset
G2LoRA/data/data_loader.py - Continual task splits
G2LoRA/data/data_spliter.py - Graph preparation
G2LoRA/models/utils/process.py
GTAlign model
- GTAlign training
G2LoRA/models/GLM/GTAlign.py - GraphCLIP model
G2LoRA/models_GTAlign/graphclip.py - Graph encoders
G2LoRA/models_GTAlign/gt.py - Task graph encoder
G2LoRA/models_GTAlign/gt_til.py - Text backbone
G2LoRA/models_GTAlign/BertLayer.py - LoRA attention
G2LoRA/models_GTAlign/attention_lora.py - LoRA adapters
G2LoRA/models_GTAlign/adapter.py - GNN backbones
G2LoRA/backbones/GNN/SGC.py - Language backbones
G2LoRA/backbones/LM/BERT.py
Training support
- Training lifecycle
G2LoRA/models/base.py - Metrics
G2LoRA/common/metric.py - Prompt definitions
G2LoRA/common/prompts.py
Other components
- Researcher
Connections 23
- Researcher → Experiment entry: launches
README.md - Experiment entry → Experiment settings: configures
- Experiment entry → Run orchestration: dispatches
- Run orchestration → Graph/text dataset: loads data
- Run orchestration → Continual task splits: creates tasks
- Graph/text dataset → Graph preparation: prepares graphs
- Continual task splits → GTAlign training: supplies task batches
- GTAlign training → GraphCLIP model: trains and evaluates
G2LoRA/models/GLM/GTAlign.py - GTAlign training → Training lifecycle: extends lifecycle
- GraphCLIP model → Graph encoders: constructs
G2LoRA/models_GTAlign/graphclip.py - GraphCLIP model → Task graph encoder: constructs for TIL
G2LoRA/models_GTAlign/graphclip.py - GraphCLIP model → Text backbone: uses
G2LoRA/models_GTAlign/graphclip.py - Graph encoders → LoRA attention: uses
G2LoRA/models_GTAlign/gt.py - Graph encoders → LoRA adapters: uses
G2LoRA/models_GTAlign/gt.py - Task graph encoder → LoRA attention: uses
G2LoRA/models_GTAlign/gt_til.py - Task graph encoder → LoRA adapters: uses
G2LoRA/models_GTAlign/gt_til.py - GTAlign training → GNN backbones: selects backbone
- GTAlign training → Language backbones: selects backbone
- GTAlign training → Metrics: reports scores
- GTAlign training → Prompt definitions: uses prompts
- Experiment entry → Class incremental: runs setting
README.md - Experiment entry → Domain incremental: runs setting
README.md - Experiment entry → Task incremental: runs setting
README.md