NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DiGRAF: Diffeomorphic Graph-Adaptive Activation Function

Krishna Sri Ipsit Mantri, Xinzhi Wang, Carola-Bibiane Schönlieb, Bruno Ribeiro, Beatrice Bevilacqua, Moshe Eliasof

Introduction

In deep learning, activation functions like ReLU are typically the default choice, even for Graph Neural Networks (GNNs). However, graph data is uniquely structural; nodes exhibit varying degrees, and graphs possess diverse topologies. A generic activation function treats every node's features identically, regardless of whether a node is a highly connected hub or an isolated leaf. While some researchers have proposed trainable activations, these are often restricted to simple piecewise-linear shapes or lack differentiability, which can hinder optimization.

DiGRAF (DIffeomorphism-based GRaph Activation Function) addresses these limitations by introducing a novel, "graph-adaptive" activation function that learns its own shape based on the specific structure of the input graph. By leveraging smooth, invertible mappings called diffeomorphisms, DiGRAF offers both improved accuracy and faster training convergence across diverse graph tasks.

The DiGRAF Framework

The core of DiGRAF is built on two main pillars: Continuous Piecewise-Affine Based (CPAB) transformations and a Graph-Adaptive Hypernetwork.

The DiGRAF architecture integrates an auxiliary GNN (GNN_ACT) to generate parameters for the activation function based on graph structure.
  1. CPAB Transformations: DiGRAF uses CPAB transformations to define the activation. CPAB is a framework for learning 1D diffeomorphisms—mappings that are bijective, differentiable, and have differentiable inverses. This ensures the activation function is smooth and well-behaved across its entire domain.
  2. Graph-Adaptive Hypernetwork: Instead of a fixed set of parameters, DiGRAF employs an auxiliary, lightweight GNN ($GNN_{ACT}$). This sub-network analyzes the graph's adjacency matrix and node features to generate the parameters ($\theta$) that define the shape of the CPAB transformation for that specific graph.

Essentially, DiGRAF performs a "vertical transformation" of the data, stretching or compressing feature spaces in a way that is mathematically optimized for the specific graph at hand.

Flexibility and Smoothness

A key advantage of DiGRAF is its "blueprint flexibility." The framework can approximate almost any common activation function (such as ReLU, Tanh, or ELU) while evolving into entirely new shapes better suited for specific graph topologies.

DiGRAF's ability to smoothly approximate the ELU function compared to piecewise-linear baselines.

Because DiGRAF is a diffeomorphism, it is differentiable everywhere. Unlike ReLU, which has a "dead zone" and a sharp kink at zero, DiGRAF provides smooth gradients. This helps the network avoid "zigzagging" during backpropagation, leading to more stable and faster convergence. Furthermore, the design ensures permutation equivariance: if nodes are reordered, the activation function's output changes accordingly, maintaining a fundamental requirement for GNNs.

Experimental Results

The authors evaluated DiGRAF across 15 benchmarks, including node classification (Planetoid), graph regression (ZINC-12K), and graph classification (OGB, TUDatasets).

  • Superior Accuracy: On the ZINC-12K molecular dataset, DiGRAF achieved a Mean Absolute Error (MAE) of 0.1302—an approximately 18% relative improvement over the best-performing baseline (Maxout). On the MolHIV dataset, it reached an ROC-AUC of 80.28%, a 4.7% absolute improvement over standard ReLU.
  • Faster Convergence: Training curves indicate that DiGRAF typically reaches lower loss levels significantly earlier in the training process compared to 12 other well-known activation functions.
  • Parameter Efficiency: Despite the auxiliary GNN, the overhead is minimal (typically ~20k parameters), and performance gains persist even when baselines are given 4x more parameters to compensate.

Limitations and Future Work

While efficient, DiGRAF is more complex than a simple ReLU. On the ZINC dataset, training with DiGRAF was roughly 4.5x slower than ReLU, though it remained faster than other complex graph-adaptive baselines. Additionally, the current formulation is limited to diffeomorphic shapes. Future work may explore multi-dimensional transformations and alternative architectures for the auxiliary $GNN_{ACT}$ to further reduce the computational footprint.

Summary updated

BibTeX
@inproceedings{mantri2024digraf,
  author = {Krishna Sri Ipsit Mantri and Xinzhi Wang and Carola-Bibiane Schönlieb and Bruno Ribeiro and Beatrice Bevilacqua and Moshe Eliasof},
  title = {{DiGRAF: Diffeomorphic Graph-Adaptive Activation Function}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ZZoW4Z3le4},
}
Figure