# Transformery grafowe

EN: **Graph transformers** · id `graphtransformer` · aliases: graph transformer, GraphGPS, Graphormer, graph attention transformer, positional encodings for graphs

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Sieci grafowe (GNN)](https://aiatlasgraph.com/t/gnn.md) › Transformery grafowe

## Description

- PL: Architektury łączące globalną uwagę transformera z kodowaniami pozycji i struktury grafu, często razem z lokalnym przekazywaniem wiadomości.
- EN: Architectures combining a transformer's global attention with graph positional and structural encodings, often alongside local message passing.

## In one sentence

- PL: Sieć dla danych w postaci powiązań, np. cząsteczek czy sieci znajomych, w której każdy element może „patrzeć” na wszystkie inne, nie tylko na sąsiadów.
- EN: A network for connection data, such as molecules or friend networks, where every element can ‘look at’ all others, not just neighbours.

## Problem it solves

- PL: Zwykłe sieci grafowe przekazują informację tylko między sąsiadami, więc odległe części grafu słabo się „słyszą”.
- EN: Ordinary graph networks pass information only between neighbours, so distant parts of the graph barely ‘hear’ each other.

## What it does

- PL: Jak firma, w której poza rozmowami z kolegami z działu każdy może też napisać do dowolnej osoby, wiedząc, gdzie ona siedzi.
- EN: Like a company where, besides talking to teammates, anyone can also message any person, knowing where they sit.

## Everyday example

- PL: Program dla chemików przewiduje właściwości nowej cząsteczki, biorąc pod uwagę atomy leżące daleko od siebie w jej strukturze.
- EN: A chemistry program predicts a new molecule's properties by taking into account atoms that lie far apart in its structure.

## This concerns you if you…

- PL: analizujesz cząsteczki, sieci lub inne dane o powiązaniach
- PL: twoja sieć grafowa gubi informacje z odległych węzłów
- EN: analyse molecules, networks or other connection data
- EN: your graph network loses information from distant nodes

## Keywords

GraphGPS · Graphormer · Laplacian positional encoding · random-walk structural encoding · linear attention · long-range graph benchmark

## How it works

- PL: Graf nie ma naturalnej kolejności, więc węzły dostają kodowania pozycji i struktury, np. z wektorów własnych laplasjanu lub błądzenia losowego. Każda warstwa łączy przekazywanie wiadomości po prawdziwych krawędziach z uwagą na wszystkie węzły; użycie liniowej uwagi pozwala skalować się liniowo z liczbą węzłów i krawędzi.
- EN: Graphs have no natural order, so nodes receive positional and structural encodings, e.g. from Laplacian eigenvectors or random walks. Each layer combines message passing along real edges with attention over all nodes; using linear attention lets cost scale linearly with nodes and edges.

## Limits

- PL: Pełna uwaga rośnie kwadratowo z liczbą węzłów, więc duże grafy wymagają uwagi liniowej, sparsowania albo innego przybliżenia. Skuteczność zależy także od doboru kodowania pozycji i struktury do danego rodzaju grafu.
- EN: Full attention grows quadratically with node count, so large graphs need linear attention, sparsification or another approximation. Effectiveness also depends on matching positional and structural encodings to the graph type.

## Key terms

- PL: **kodowanie strukturalne**: Dodatkowa informacja o roli węzła w grafie, np. ile ma połączeń.
- PL: **wektory własne laplasjanu**: Matematyczny opis kształtu grafu używany jako pozycja węzła.
- EN: **structural encoding**: Extra information about a node's role, such as its number of links.
- EN: **Laplacian eigenvectors**: A mathematical description of graph shape used as node position.

## Know first

- [Mechanizm self-attention (zapytania, klucze, wartości) (Self-attention (queries, keys, values))](https://aiatlasgraph.com/t/selfattention.md)

## Sources

- [Recipe for a General, Powerful, Scalable Graph Transformer](<https://arxiv.org/abs/2205.12454>) `rampasek-graphgps-2022` · by Ladislav Rampášek, Mikhail Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, Dominique Beaini

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/graphtransformer · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
