Graphormer Boosted: Molecular Property Prediction With Enhanced Graph Spatial and Edge Encodings

Transformer-based architectures have gained popularity across various domains, including graph representation learning. However, selecting an optimal transformer configuration remains challenging, as attention-based models are highly sensitive to parameter choices and input value ranges. Even state-of-the-art architectures can underperform without proper tuning, while simple yet thoughtful modifications can unlock significant performance gains by better leveraging graph structures. In this work, we propose an enhancement to the Graphormer architecture that refines the attention mechanism by unifying spatial encodings, edge encodings, and similarity matrices. Specifically, we introduce nonlinear transformations, such as <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">softmax, sigmoid</i>, or <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">tanh</i>, to normalize these encodings within the attention calculation. This ensures balanced contributions from all terms, mitigating drawbacks caused by disparate value ranges. We explore two main approaches: (1) element-wise application of nonlinearities to bound spatial and edge encodings and (2) row-wise <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">softmax</i> normalization to emphasize their relative importance within the graph structure. The latter preserves relational information, enhancing the expressiveness of the model and improving the prioritization of node and edge. Experiments on molecular datasets demonstrate consistent performance improvements over the baseline Graphormer, highlighting the effectiveness of our approach. Additionally, our model outperforms traditional graph learning models. Our findings suggest that carefully designed nonlinear transformations over structural encodings significantly boost transformer-based graph models, offering a simple yet powerful strategy for improved graph representation learning.

Authors

Institutions

Publication Details

Journal
IEEE Access
Published
2025-01-01
DOI
https://doi.org/10.1109/access.2025.3591966
Citations
2
Primary Topic
Computational Drug Discovery Methods
Type
article
Field-Weighted Citation Impact
3.01
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Graphormer Boosted: Molecular Property Prediction With Enhanced Graph Spatial and Edge Encodings

Sarah Fadlallah, Carme Julià, Francesc Serratosa
2 citations
IEEE Access
Computational Drug Discovery Methods
3.01
article

Graphormer Boosted: Molecular Property Prediction With Enhanced Graph Spatial and Edge Encodings

Sarah Fadlallah, Carme Julià, Francesc Serratosa
article en
2 citations

Abstract

Transformer-based architectures have gained popularity across various domains, including graph representation learning. However, selecting an optimal transformer configuration remains challenging, as attention-based models are highly sensitive to parameter choices and input value ranges. Even state-of-the-art architectures can underperform without proper tuning, while simple yet thoughtful modifications can unlock significant performance gains by better leveraging graph structures. In this work, we propose an enhancement to the Graphormer architecture that refines the attention mechanism by unifying spatial encodings, edge encodings, and similarity matrices. Specifically, we introduce nonlinear transformations, such as <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">softmax, sigmoid</i>, or <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">tanh</i>, to normalize these encodings within the attention calculation. This ensures balanced contributions from all terms, mitigating drawbacks caused by disparate value ranges. We explore two main approaches: (1) element-wise application of nonlinearities to bound spatial and edge encodings and (2) row-wise <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">softmax</i> normalization to emphasize their relative importance within the graph structure. The latter preserves relational information, enhancing the expressiveness of the model and improving the prioritization of node and edge. Experiments on molecular datasets demonstrate consistent performance improvements over the baseline Graphormer, highlighting the effectiveness of our approach. Additionally, our model outperforms traditional graph learning models. Our findings suggest that carefully designed nonlinear transformations over structural encodings significantly boost transformer-based graph models, offering a simple yet powerful strategy for improved graph representation learning.

IEEE AccessVol. 13
Universitat Rovira i Virgili (ES)
Openalex Percentile: Top 8%
Computational Drug Discovery Methods
3.01
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.