Leveraging Contrastive Learning for Enhanced Node Representations in Tokenized Graph Transformers

2406.19258

YC

0

Reddit

0

Published 6/28/2024 by Jinsong Chen, Hanpeng Liu, John E. Hopcroft, Kun He
Leveraging Contrastive Learning for Enhanced Node Representations in Tokenized Graph Transformers

Abstract

While tokenized graph Transformers have demonstrated strong performance in node classification tasks, their reliance on a limited subset of nodes with high similarity scores for constructing token sequences overlooks valuable information from other nodes, hindering their ability to fully harness graph information for learning optimal node representations. To address this limitation, we propose a novel graph Transformer called GCFormer. Unlike previous approaches, GCFormer develops a hybrid token generator to create two types of token sequences, positive and negative, to capture diverse graph information. And a tailored Transformer-based backbone is adopted to learn meaningful node representations from these generated token sequences. Additionally, GCFormer introduces contrastive learning to extract valuable information from both positive and negative token sequences, enhancing the quality of learned node representations. Extensive experimental results across various datasets, including homophily and heterophily graphs, demonstrate the superiority of GCFormer in node classification, when compared to representative graph neural networks (GNNs) and graph Transformers.

Create account to get full access

or

If you already have an account, we'll log you in

Related Work

Graph Contrastive Learning

Recent research has explored the use of contrastive learning techniques to enhance the representation of nodes in graph-structured data. For example, Generative Enhanced Heterogeneous Graph Contrastive Learning leverages generative modeling and contrastive learning to learn more informative node embeddings. Similarly, Dual Perspective Cross-Contrastive Learning for Graph Transformers proposes a dual-perspective contrastive learning approach to improve the performance of graph transformer models.

Graph Tokenization and Spectral Representations

Tokenization has emerged as a powerful technique for processing graph-structured data. NTFormer: Composite Node Tokenized Graph Transformer introduces a node tokenization approach to enhance the performance of graph transformer models. Additionally, Technical Report: Graph Spectral Token Enhancing Graph Representation Learning explores the use of graph spectral theory to derive more informative token representations.

Semi-Supervised Graph Learning

The integration of semi-supervised learning techniques has proven effective for addressing challenges in graph representation learning. For instance, Hypergraph Transformer for Semi-Supervised Classification combines hypergraph neural networks and transformer architectures to achieve improved performance on semi-supervised node classification tasks.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Related Papers

NTFormer: A Composite Node Tokenized Graph Transformer for Node Classification

NTFormer: A Composite Node Tokenized Graph Transformer for Node Classification

Jinsong Chen, Siyu Jiang, Kun He

YC

0

Reddit

0

Recently, the emerging graph Transformers have made significant advancements for node classification on graphs. In most graph Transformers, a crucial step involves transforming the input graph into token sequences as the model input, enabling Transformer to effectively learn the node representations. However, we observe that existing methods only express partial graph information of nodes through single-type token generation. Consequently, they require tailored strategies to encode additional graph-specific features into the Transformer to ensure the quality of node representation learning, limiting the model flexibility to handle diverse graphs. To this end, we propose a new graph Transformer called NTFormer to address this issue. NTFormer introduces a novel token generator called Node2Par, which constructs various token sequences using different token elements for each node. This flexibility allows Node2Par to generate valuable token sequences from different perspectives, ensuring comprehensive expression of rich graph features. Benefiting from the merits of Node2Par, NTFormer only leverages a Transformer-based backbone without graph-specific modifications to learn node representations, eliminating the need for graph-specific modifications. Extensive experiments conducted on various benchmark datasets containing homophily and heterophily graphs with different scales demonstrate the superiority of NTFormer over representative graph Transformers and graph neural networks for node classification.

Read more

6/28/2024

🧠

Generative-Contrastive Heterogeneous Graph Neural Network

Yu Wang, Lei Sang, Yi Zhang, Yiwen Zhang

YC

0

Reddit

0

Heterogeneous Graphs (HGs) can effectively model complex relationships in the real world by multi-type nodes and edges. In recent years, inspired by self-supervised learning, contrastive Heterogeneous Graphs Neural Networks (HGNNs) have shown great potential by utilizing data augmentation and contrastive discriminators for downstream tasks. However, data augmentation is still limited due to the graph data's integrity. Furthermore, the contrastive discriminators remain sampling bias and lack local heterogeneous information. To tackle the above limitations, we propose a novel Generative-Enhanced Heterogeneous Graph Contrastive Learning (GHGCL). Specifically, we first propose a heterogeneous graph generative learning enhanced contrastive paradigm. This paradigm includes: 1) A contrastive view augmentation strategy by using a masked autoencoder. 2) Position-aware and semantics-aware positive sample sampling strategy for generating hard negative samples. 3) A hierarchical contrastive learning strategy for capturing local and global information. Furthermore, the hierarchical contrastive learning and sampling strategies aim to constitute an enhanced contrastive discriminator under the generative-contrastive perspective. Finally, we compare our model with seventeen baselines on eight real-world datasets. Our model outperforms the latest contrastive and generative baselines on node classification and link prediction tasks. To reproduce our work, we have open-sourced our code at https://anonymous.4open.science/r/GC-HGNN-E50C.

Read more

5/9/2024

Dual-perspective Cross Contrastive Learning in Graph Transformers

Dual-perspective Cross Contrastive Learning in Graph Transformers

Zelin Yao, Chuang Liu, Xueqi Ma, Mukun Chen, Jia Wu, Xiantao Cai, Bo Du, Wenbin Hu

YC

0

Reddit

0

Graph contrastive learning (GCL) is a popular method for leaning graph representations by maximizing the consistency of features across augmented views. Traditional GCL methods utilize single-perspective i.e. data or model-perspective) augmentation to generate positive samples, restraining the diversity of positive samples. In addition, these positive samples may be unreliable due to uncontrollable augmentation strategies that potentially alter the semantic information. To address these challenges, this paper proposed a innovative framework termed dual-perspective cross graph contrastive learning (DC-GCL), which incorporates three modifications designed to enhance positive sample diversity and reliability: 1) We propose dual-perspective augmentation strategy that provide the model with more diverse training data, enabling the model effective learning of feature consistency across different views. 2) From the data perspective, we slightly perturb the original graphs using controllable data augmentation, effectively preserving their semantic information. 3) From the model perspective, we enhance the encoder by utilizing more powerful graph transformers instead of graph neural networks. Based on the model's architecture, we propose three pruning-based strategies to slightly perturb the encoder, providing more reliable positive samples. These modifications collectively form the DC-GCL's foundation and provide more diverse and reliable training inputs, offering significant improvements over traditional GCL methods. Extensive experiments on various benchmarks demonstrate that DC-GCL consistently outperforms different baselines on various datasets and tasks.

Read more

6/4/2024

Technical Report: The Graph Spectral Token -- Enhancing Graph Transformers with Spectral Information

Technical Report: The Graph Spectral Token -- Enhancing Graph Transformers with Spectral Information

Zihan Pengmei, Zimu Li

YC

0

Reddit

0

Graph Transformers have emerged as a powerful alternative to Message-Passing Graph Neural Networks (MP-GNNs) to address limitations such as over-squashing of information exchange. However, incorporating graph inductive bias into transformer architectures remains a significant challenge. In this report, we propose the Graph Spectral Token, a novel approach to directly encode graph spectral information, which captures the global structure of the graph, into the transformer architecture. By parameterizing the auxiliary [CLS] token and leaving other tokens representing graph nodes, our method seamlessly integrates spectral information into the learning process. We benchmark the effectiveness of our approach by enhancing two existing graph transformers, GraphTrans and SubFormer. The improved GraphTrans, dubbed GraphTrans-Spec, achieves over 10% improvements on large graph benchmark datasets while maintaining efficiency comparable to MP-GNNs. SubFormer-Spec demonstrates strong performance across various datasets.

Read more

4/9/2024