# Sieci grafowe (GNN)

EN: **Graph neural networks (GNN)** · id `gnn` · aliases: GNN, graph neural networks, sieci neuronowe na grafach, geometric deep learning, grafowe sieci neuronowe

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

## Description

- PL: Sieci neuronowe operujące na grafach (węzły, krawędzie, cechy), niezmiennicze względem kolejności węzłów; podstawa uczenia na cząsteczkach, sieciach społecznych i siatkach.
- EN: Neural networks operating on graphs (nodes, edges, features), invariant to node ordering; the basis of learning on molecules, social networks and meshes.

## In one sentence

- PL: Sieci neuronowe uczące się na danych w postaci sieci powiązań: co jest połączone z czym i jak mocno.
- EN: Neural networks that learn from data shaped like a web of connections: what links to what, and how strongly.

## Problem it solves

- PL: Wiele danych nie mieści się ani w tabeli, ani w zdjęciu: cząsteczki, mapy dróg czy znajomości to sieci połączeń o zmiennym kształcie.
- EN: Much data fits neither a table nor a picture: molecules, road maps and friendships are webs of links with ever-changing shapes.

## What it does

- PL: Każdy element wielokrotnie wymienia informacje z sąsiadami, jak plotka rozchodząca się po wsi, aż pozna swoje otoczenie.
- EN: Each element repeatedly swaps information with its neighbours, like gossip spreading through a village, until it knows its surroundings.

## Everyday example

- PL: Aplikacja z mapą przewiduje korek na twojej trasie, biorąc pod uwagę ruch na sąsiednich ulicach i skrzyżowaniach.
- EN: A map app predicts a jam on your route by taking traffic on neighbouring streets and junctions into account.

## This concerns you if you…

- PL: twoje dane to sieć połączeń, a nie tabela
- PL: przewidujesz właściwości cząsteczek lub materiałów
- PL: budujesz rekomendacje z powiązań między ludźmi
- EN: your data is a web of links, not a table
- EN: you predict properties of molecules or materials
- EN: you build recommendations from links between people

## Keywords

message passing · GCN · GAT · GraphSAGE · PyTorch Geometric · DGL · graph transformers · Weisfeiler-Lehman · link prediction · geometric deep learning

## How it works

- PL: Każda warstwa zbiera wiadomości od sąsiadów węzła, agreguje je (suma, średnia, maksimum lub uwaga) i aktualizuje osadzenie węzła. Po k warstwach węzeł „widzi” swoje k-sąsiedztwo, a pooling daje reprezentację całego grafu do zadań na poziomie grafu, węzła lub krawędzi.
- EN: Each layer gathers messages from a node's neighbours, aggregates them (sum, mean, max or attention) and updates the node embedding. After k layers a node 'sees' its k-hop neighbourhood, and pooling yields a whole-graph representation for graph-, node- or edge-level tasks.

## Limits

- PL: Wiele warstw wygładza osadzenia (oversmoothing), a informacja z daleka ściska się w wąskich gardłach (oversquashing). Moc rozróżniania standardowych GNN ogranicza test Weisfeilera–Lehmana; duże grafy wymagają próbkowania sąsiedztwa.
- EN: Many layers smooth embeddings together (oversmoothing), and distant information is squeezed through bottlenecks (oversquashing). Standard GNNs' distinguishing power is bounded by the Weisfeiler–Lehman test; large graphs require neighbourhood sampling.

## Key terms

- PL: **message passing**: Wymiana i łączenie informacji między sąsiednimi węzłami w każdej warstwie.
- PL: **niezmienniczość permutacji**: Wynik nie zależy od tego, w jakiej kolejności ponumerujesz węzły.
- PL: **oversmoothing**: Po wielu warstwach wszystkie węzły zaczynają wyglądać tak samo.
- EN: **message passing**: Exchanging and combining information between neighbouring nodes in every layer.
- EN: **permutation invariance**: The output does not depend on how you number the nodes.
- EN: **oversmoothing**: After many layers all nodes start to look alike.

## Know first

- [Perceptron wielowarstwowy (MLP) (Multilayer perceptron (MLP))](https://aiatlasgraph.com/t/mlp.md)
- [Grafy wiedzy (Knowledge graphs)](https://aiatlasgraph.com/t/kgraphs.md)

## Subtopics (3 direct, 3 in total)

- [Konwolucje grafowe i uwaga na grafach (GCN, GAT) (Graph convolutions and graph attention (GCN, GAT))](https://aiatlasgraph.com/t/messagepassing.md): The most common GNN layers: GCN aggregates a normalised sum of neighbour features, GAT weights neighbours with attention, GraphSAGE samples the neighbourhood.
- [Sieci geometryczne dla atomów w 3D (równoważność obrotów) (Equivariant graph networks for 3D atomic systems)](https://aiatlasgraph.com/t/equivariantgnn.md): GNNs over atoms with 3D positions, equivariant to rotations, translations and reflections (the E(3) group); they predict energies, forces and molecular properties.
- [Transformery grafowe (Graph transformers)](https://aiatlasgraph.com/t/graphtransformer.md): Architectures combining a transformer's global attention with graph positional and structural encodings, often alongside local message passing.

## Related topics

Untyped, symmetric "see also" links.

- [Analiza grafu transakcji (sieci kont i przepływów) (Transaction graph analysis)](https://aiatlasgraph.com/t/transactiongraphs.md)
- [Grafy wiedzy (Knowledge graphs)](https://aiatlasgraph.com/t/kgraphs.md)
- [Kodowanie sceny drogowej jako grafu wektorów (Vectorised scene encoding)](https://aiatlasgraph.com/t/vectorizedscene.md)
- [Pogoda i klimat (Weather and climate modelling)](https://aiatlasgraph.com/t/earthsystems.md)
- [Systemy rekomendacyjne (Recommendation systems)](https://aiatlasgraph.com/t/recommenders.md)

## Sources

- [GraphCast: Learning skillful medium-range global weather forecasting](<https://arxiv.org/abs/2212.12794>) `graphcast-2022` · by Remi Lam, Alvaro Sanchez-Gonzalez, Matthew Willson, Peter Wirnsberger, Meire Fortunato i in. (Google DeepMind)
- [A Gentle Introduction to Graph Neural Networks](<https://distill.pub/2021/gnn-intro/>) `distill-gnn-2021` · by Benjamin Sanchez-Lengeling, Emily Reif, Adam Pearce, Alexander B. Wiltschko (Google Research)

---

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