G-Merging: Graph Models Merging for Parameter-Efficient Multi-Task Knowledge Consolidation

Jun Chen, Ziyue Qiao, Qin Zhang, Kaize Ding, Xiao LuoICLR 2026

TL;DR

G-Merging is a novel framework designed to consolidate multiple task-specific Graph Neural Networks (GNNs) into a single, parameter-efficient model. By combining "task arithmetic" with topology-aware adapters and a training-free routing mechanism, it achieves performance that matches or even exceeds individual fine-tuned models while significantly reducing storage and training overhead.

The Challenge of Merging Graph Models

In the world of deep learning, the "pretrain-then-finetune" paradigm is highly effective. However, scaling this approach across many downstream tasks results in maintaining numerous distinct, large models. Model merging aims to compress these into one unified multi-task model.

While merging techniques like weight averaging work reasonably well for images and text, they often fail for graphs. The primary culprit is structural heterogeneity: different graph datasets (e.g., molecular structures versus social networks) possess unique connectivity patterns. Standard merging techniques tend to wash out these nuances, leading to a "representation bias" where the merged model loses its grasp on the specific structural language of the original tasks.

The G-Merging Framework

To overcome these limitations, the authors propose G-Merging, a three-phase pipeline tailored for graph topology:

Architecture of G-Merging
  1. Coarse Merging (Task Arithmetic): The process begins by using task arithmetic to create a base unified model. This captures broad, shared knowledge across all tasks by adding "task vectors" (the difference between fine-tuned and pre-trained weights) to the original pre-trained model.
  2. Task-Specific Adapters & TWD Loss: To recover the structural nuances lost during coarse merging, lightweight "adapters" are inserted into the model. These are trained using a novel Topology-aware Wasserstein Distance (TWD) loss. Unlike standard distance metrics, TWD aligns the node embeddings of the merged model with the original fine-tuned models while strictly respecting the graph's adjacency matrix (its edges).
  3. Inference via MoE Routing: During testing, the model employs a Mixture-of-Experts (MoE) architecture. A training-free, topology-aware router dynamically calculates weights for each task's adapter based on how structurally similar the input graph is to the original task domains.

Datasets Evaluated

The researchers rigorously evaluated G-Merging across two major fronts:

  • Molecular Property Prediction: 8 binary classification datasets from the MoleculeNet benchmark (Tox21, Toxcast, SIDER, ClinTox, BBBP, BACE, HIV, MUV).
  • Heterogeneous Graph Domains: 9 non-molecular datasets covering transportation (Airports), academic networks (H-index), social networks (IMDB, Reddit), and scientific collaborations (COLLAB).

Key Insights

  • Structure is the Secret Sauce: The critical insight of G-Merging is that graph nodes cannot be treated as independent points in space. By constraining the Wasserstein Distance with the graph's topology (TWD), the model preserves the "smoothness" of GNNs—ensuring neighboring nodes maintain similar representations.
  • Knowledge Complementarity: The MoE router reveals that tasks can actively help each other. For example, the router frequently assigns high weights to the ClinTox expert when processing SIDER data, as both domains deal with drug toxicity and adverse reactions.
  • Efficiency without Sacrifice: Training the adapters is roughly 8x faster than full fine-tuning. Furthermore, the resulting MoE module adds only a tiny fraction (roughly 2-13%) of the parameters required for a full GNN model.

Results and Performance

Performance Comparison
  • Superior Performance: On molecular tasks, G-Merging achieved an average ROC-AUC of 74.0%, effectively matching the "Full Fine-Tuned" upper bound (74.9%) and vastly outperforming naive Weight Averaging (69.6%).
  • Model Agnostic: The framework proved highly adaptable, working effectively across different GNN backbones (GIN, GCN) and various pre-training strategies (context prediction, edge prediction).
  • Generalization: In non-molecular domains, G-Merging consistently outperformed baselines, demonstrating its capacity to handle everything from sparse Reddit discussion graphs to dense movie actor networks.

Limitations and Future Directions

The authors acknowledge a few key constraints that pave the way for future research:

  • Shared Ancestry: Currently, G-Merging assumes all task-specific models were fine-tuned from the same pre-trained checkpoint. Merging models from entirely different architectures or starting points remains an open challenge.
  • Fixed Task Set: The current setup relies on a fixed number of fine-tuned models. Future iterations could explore "continual learning" scenarios where the model seamlessly adapts as new tasks are introduced over time.
  • Unseen Tasks: While the MoE router aids in generalization, the framework is primarily designed to consolidate known tasks rather than perform zero-shot generalization to entirely new, unseen domains.

Summary updated

BibTeX
@inproceedings{chen2026g,
  author = {Jun Chen and Ziyue Qiao and Qin Zhang and Kaize Ding and Xiao Luo},
  title = {{G-Merging: Graph Models Merging for Parameter-Efficient Multi-Task Knowledge Consolidation}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=FoTtvLkkfU},
}
Figure