# Sieci Hopfielda i pamięć asocjacyjna

EN: **Hopfield networks and associative memory** · id `hopfield` · aliases: Hopfield network, modern Hopfield networks, dense associative memory, sieć Hopfielda, pamięć skojarzeniowa, Hopfield layers

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Alternatywne architektury sieci](https://aiatlasgraph.com/t/altarchs.md) › Sieci Hopfielda i pamięć asocjacyjna

## Description

- PL: Rekurencyjne sieci energetyczne przechowujące wzorce jako minima energii; nowoczesne ciągłe sieci Hopfielda mają bardzo dużą pojemność, a ich reguła aktualizacji odpowiada uwadze w transformerze.
- EN: Recurrent energy-based networks storing patterns as energy minima; modern continuous Hopfield networks have very large capacity, and their update rule matches transformer attention.

## In one sentence

- PL: Sieć pamięci, która z niepełnego albo zamazanego fragmentu odtwarza cały zapamiętany wzorzec.
- EN: A memory network that rebuilds a whole stored pattern from an incomplete or blurred fragment.

## Problem it solves

- PL: Chcemy odnaleźć właściwe wspomnienie, mając tylko jego urywek, a przeglądanie wszystkiego po kolei trwa za długo.
- EN: We want to find the right memory from just a scrap of it, and checking everything one by one takes too long.

## What it does

- PL: Jak kulka tocząca się do najbliższego dołka: każdy zapamiętany wzorzec to dołek, a zniekształcone wejście stacza się do najbliższego.
- EN: Like a marble rolling into the nearest hollow: each stored pattern is a hollow, and a distorted input rolls into the closest one.

## Everyday example

- PL: Z kilku zanuconych taktów przypominasz sobie całą piosenkę.
- EN: From a few hummed bars you recall the whole song.

## This concerns you if you…

- PL: chcesz zrozumieć, skąd się wziął mechanizm uwagi
- PL: interesuje cię pamięć w sieciach neuronowych
- EN: want to understand where the attention mechanism came from
- EN: are interested in memory in neural networks

## Keywords

modern Hopfield networks · dense associative memory · Hopfield layers · hflayers · energy-based memory · attention as retrieval · Boltzmann machines

## How it works

- PL: Klasyczna sieć ma symetryczne wagi i aktualizuje binarne neurony tak, by obniżać energię, aż stan osiądzie w minimum, czyli zapamiętanym wzorcu. Nowoczesne sieci Hopfielda mają stany ciągłe i energię z log-sum-exp; jedna aktualizacja to softmax po podobieństwach do wzorców, czyli to samo co uwaga.
- EN: A classic network has symmetric weights and updates binary neurons to lower an energy until the state settles in a minimum, a stored pattern. Modern Hopfield networks use continuous states and a log-sum-exp energy; one update is a softmax over similarities to stored patterns, i.e. attention.

## Limits

- PL: Klasyczna sieć ma małą pojemność i myli podobne wzorce, tworząc fałszywe minima. Wersja nowoczesna jako samodzielny model rzadko wygrywa z transformerami; jej wartość to głównie rama teoretyczna i warstwy pamięci do wybranych zadań.
- EN: Classic networks have small capacity and confuse similar patterns, creating spurious minima. As a standalone model the modern version rarely beats transformers; its value lies mainly in theory and memory layers for specific tasks.

## Key terms

- PL: **funkcja energii**: Liczba, którą dynamika sieci zmniejsza; minima to zapamiętane wzorce.
- PL: **pojemność pamięci**: Ile wzorców sieć zapamięta, zanim zacznie je mylić.
- PL: **fałszywe minimum**: Stan stabilny niepasujący do żadnego zapamiętanego wzorca.
- EN: **energy function**: A quantity the dynamics lower; its minima are stored patterns.
- EN: **memory capacity**: How many patterns fit before the network starts confusing them.
- EN: **spurious minimum**: A stable state matching no stored pattern.

## Know first

- [Modele oparte na energii (Energy-based models (EBM))](https://aiatlasgraph.com/t/ebm.md)

## Related topics

Untyped, symmetric "see also" links.

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

## Sources

- [Hopfield Networks is All You Need](<https://arxiv.org/abs/2008.02217>) `ramsauer-hopfield-2020` · by Hubert Ramsauer, Bernhard Schäfl, Johannes Lehner i in. (Sepp Hochreiter)

---

AI Atlas revision 129 (2026-11-05) · HTML: https://aiatlasgraph.com/t/hopfield · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-11-05
