What is the role of positional encodings in Graph Transformers?

Asked 02 Dec 2026 · 1 views · About: Graph Transformers: A Deep Dive for ML Researchers

Positional encodings are essential for providing information about node order, which is lost when using attention mechanisms alone.

3 Answers

Positional encodings are added to the node embeddings before they are fed into the transformer layers. These encodings can be learned or fixed, and encode relative or absolute positions in the graph structure.
Answered 02 Dec 2026 ·
Without positional encodings, Graph Transformers would treat a graph with the same nodes but different arrangements as equivalent, which is often undesirable. They help the model distinguish between different structural configurations.
Answered 02 Dec 2026 ·
Different types of positional encodings exist, including sinusoidal functions and learned embeddings. The choice of encoding can impact performance depending on the specific graph structure and task at hand.
Answered 02 Dec 2026 ·

Your answer

Answers are reviewed before they appear.