# Modele oparte na energii

EN: **Energy-based models (EBM)** · id `ebm` · aliases: EBM, energy-based models, modele energetyczne, Boltzmann machines, contrastive divergence, Langevin dynamics

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Rodziny modeli generatywnych](https://aiatlasgraph.com/t/generative.md) › Modele oparte na energii

## Description

- PL: Modele definiujące nieznormalizowaną gęstość przez funkcję energii; trenowane MCMC, dopasowaniem score lub estymacją kontrastu z szumem.
- EN: Models defining an unnormalised density through an energy function, trained via MCMC maximum likelihood, score matching or noise-contrastive estimation.

## In one sentence

- PL: Model, który nie tworzy danych wprost, tylko ocenia każdy przykład liczbą: im niższa „energia”, tym przykład bardziej pasuje do świata.
- EN: A model that does not create data directly but scores each example: the lower its ‘energy’, the better it fits the world.

## Problem it solves

- PL: Modele, które muszą podać dokładne prawdopodobieństwo, są bardzo ograniczone w budowie, więc trudno w nich uchwycić złożone zależności.
- EN: Models that must output exact probabilities are tightly constrained in design, so complex dependencies are hard to capture.

## What it does

- PL: Jak mapa terenu: prawdziwe przykłady leżą w dolinach, a nowe próbki powstają przez staczanie się z losowego miejsca w dół.
- EN: Like a landscape map: real examples sit in valleys, and new samples are made by rolling downhill from a random spot.

## Everyday example

- PL: System sprawdza, czy podana odpowiedź pasuje do pytania, i wybiera tę z najlepszą oceną spośród wielu kandydatów.
- EN: A system checks whether a given answer fits a question and picks the best-scoring one among many candidates.

## This concerns you if you…

- PL: chcesz zrozumieć wspólny język wielu metod generatywnych
- PL: łączysz ocenianie i generowanie w jednym modelu
- EN: want to understand a shared language of many generative methods
- EN: combine scoring and generating in one model

## Keywords

contrastive divergence · Langevin dynamics · score matching · noise-contrastive estimation · restricted Boltzmann machine · MCMC

## How it works

- PL: Sieć przypisuje każdemu przykładowi energię, a gęstość jest proporcjonalna do exp(−energia) z nieznaną stałą normalizującą. Trening obniża energię danych i podnosi energię próbek z modelu (np. dynamiką Langevina), albo omija stałą: dopasowanie score uczy gradientu log-gęstości, co jest bezpośrednim przodkiem modeli dyfuzyjnych.
- EN: A network assigns each example an energy, with density proportional to exp(−energy) up to an unknown normalising constant. Training lowers data energy and raises the energy of model samples (e.g. via Langevin dynamics), or sidesteps the constant: score matching learns the log-density gradient, a direct ancestor of diffusion models.

## Limits

- PL: Maksymalizacja wiarygodności zwykle wymaga przybliżenia gradientu próbkami MCMC, co jest kosztowne i może źle mieszać między trybami. Nieznana stała normalizująca utrudnia bezpośrednie obliczanie gęstości; inne cele, takie jak score matching i estymacja kontrastu z szumem, obchodzą ten problem na różne sposoby.
- EN: Maximum-likelihood training usually approximates its gradient with MCMC samples, which is costly and may mix poorly across modes. The unknown normalising constant blocks direct density computation; alternatives such as score matching and noise-contrastive estimation sidestep it in different ways.

## Key terms

- PL: **funkcja energii**: Liczba przypisana przykładowi; niska oznacza przykład typowy dla danych.
- PL: **dynamika Langevina**: Próbkowanie przez kroki w dół energii z dodatkiem losowego szumu.
- PL: **dopasowanie score**: Uczenie kierunku wzrostu prawdopodobieństwa zamiast samego prawdopodobieństwa.
- EN: **energy function**: A score for an example; low means typical of the data.
- EN: **Langevin dynamics**: Sampling by stepping down the energy with added random noise.
- EN: **score matching**: Learning the direction of increasing probability rather than probability itself.

## Know first

- [Wnioskowanie przybliżone: próbkowanie i metody wariacyjne (Approximate inference: MCMC sampling and variational methods)](https://aiatlasgraph.com/t/approxinference.md)

## Related topics

Untyped, symmetric "see also" links.

- [Zaszumianie i odszumianie krok po kroku (DDPM) (Forward noising and learned denoising (DDPM))](https://aiatlasgraph.com/t/ddpm.md)

## Sources

- [How to Train Your Energy-Based Models](<https://arxiv.org/abs/2101.03288>) `song-kingma-ebm-2021` · by Yang Song, Diederik P. Kingma

---

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