# Funkcje aktywacji (ReLU, GELU, SwiGLU)

EN: **Activation functions (ReLU, GELU, SwiGLU)** · id `activations` · aliases: activation function, funkcja aktywacji, ReLU, GELU, SwiGLU, GLU, sigmoid, tanh

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Podstawy sieci neuronowych](https://aiatlasgraph.com/t/neuralbasics.md) › Funkcje aktywacji (ReLU, GELU, SwiGLU)

## Description

- PL: Nieliniowe funkcje nakładane na wyjście neuronu — bez nich złożenie warstw liniowych pozostaje przekształceniem liniowym. ReLU jest powszechna w sieciach wizyjnych; w transformerach często stosuje się GELU oraz bramkowane warianty, takie jak SwiGLU, w blokach feed-forward.
- EN: Non-linear functions applied to neuron outputs — without them, a composition of linear layers remains a linear transformation. ReLU is common in vision networks; transformers often use GELU and gated variants such as SwiGLU in feed-forward blocks.

## In one sentence

- PL: To reguły zmieniające sygnały w sieci, żeby mogła uczyć się bardziej złożonych zależności.
- EN: These rules transform network signals so it can learn more complex relationships.

## Problem it solves

- PL: Samo mnożenie i dodawanie liczb nie wystarcza do opisania wielu wzorów spotykanych w danych.
- EN: Multiplying and adding numbers alone cannot describe many patterns found in data.

## What it does

- PL: Działają jak nieliniowe przełączniki lub bramki: niektóre sygnały tłumią, inne przepuszczają albo zmieniają ich siłę.
- EN: They act like nonlinear switches or gates, suppressing some signals, passing others or changing their strength.

## Everyday example

- PL: Podczas uczenia modelu zdjęć warstwa może inaczej reagować na słabą krawędź niż na mocny kontur.
- EN: While an image model learns, a layer can respond differently to a faint edge and a strong outline.

## This concerns you if you…

- PL: budujesz lub dostrajasz sieć
- PL: chcesz wiedzieć, czemu wiele warstw daje więcej niż jedną
- EN: build or adapt a network
- EN: want to understand why multiple layers add expressive power

## Keywords

sigmoid · tanh · ReLU · GELU · SwiGLU · GEGLU

## How it works

- PL: Nieliniowość przekształca sygnał po operacji afinicznej, zmieniając odpowiedź neuronu na różne zakresy wejścia. Warianty bramkowane mnożą jedną projekcję przez aktywację drugiej, pozwalając zależnie od danych kontrolować przepływ cech.
- EN: A nonlinearity transforms signals after an affine operation, changing neuron responses across input ranges. Gated variants multiply one projection by an activation of another, controlling feature flow according to data.

## Limits

- PL: Nasycenie może osłabiać gradient, a stale nieaktywne jednostki przestać się uczyć. Wybór funkcji zmienia skalę aktywacji i koszt; nie ma jednego wariantu najlepszego dla każdej architektury.
- EN: Saturation can weaken gradients, and persistently inactive units can stop learning. Function choice changes activation scales and cost; no variant is best for every architecture.

## Key terms

- PL: **nasycenie**: Zakres funkcji, w którym zmiana wejścia słabo zmienia wyjście.
- PL: **bramka multiplikatywna**: Mechanizm mnożący reprezentację przez sygnał sterujący zależny od wejścia.
- EN: **saturation**: A function region where input changes barely affect output.
- EN: **multiplicative gate**: A mechanism multiplying a representation by an input-dependent control signal.

## Know first

- [Rachunek różniczkowy i gradienty (Calculus and gradients)](https://aiatlasgraph.com/t/calculus.md)

## Examples

- PL: sigmoida i tanh · ReLU · GELU · SwiGLU / GEGLU
- EN: sigmoid and tanh · ReLU · GELU · SwiGLU / GEGLU

## Sources

- [Neural Networks: Zero to Hero (course repository)](<https://github.com/karpathy/nn-zero-to-hero>) `karpathy-zero-to-hero` · by Andrej Karpathy
- [Gaussian Error Linear Units (GELUs)](<https://arxiv.org/abs/1606.08415>) `gelu-2016` · by Dan Hendrycks, Kevin Gimpel
- [GLU Variants Improve Transformer](<https://arxiv.org/abs/2002.05202>) `swiglu-2020` · by Noam Shazeer

---

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