# ml-jku/hopfield-layers

Hopfield Networks is All You Need

Repository: https://github.com/ml-jku/hopfield-layers
Canonical: https://ross.abutalabs.com/products/hopfield-layers
Homepage: https://ml-jku.github.io/hopfield-layers/
Language: Python
License: NOASSERTION
License Family: other
Last push: 2023-04-23T11:59:21+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2246, "days_push": 1228, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1959, forks 228 (observed 2026-08-28T04:05:59.255678+00:00)

## What it is
A PyTorch library implementing modern Hopfield networks with continuous states, whose update rule is equivalent to transformer attention. It provides Hopfield layers (HopfieldLayer, HopfieldPooling, Hopfield lookup) that can be integrated into deep learning architectures.

## Use cases
- implement modern Hopfield networks in PyTorch
- replace or augment transformer attention heads with Hopfield layers
- analyze transformer attention as Hopfield network updates
- build deep learning models with associative memory layers
- classify immune repertoire data with Hopfield-based networks
- experiment with attention mechanisms from the Hopfield Networks is All You Need paper

## When to choose
- you want to use or study modern Hopfield layers in PyTorch deep learning models
- you are reproducing or extending the Hopfield Networks is All You Need research
- you need associative memory layers with exponential storage capacity
- you want to experiment with alternatives to standard attention heads

## When to avoid
- you need a production-grade, actively maintained attention library
- you want a general-purpose transformer implementation rather than research layers
- you do not use PyTorch
- you need commercial support or extensive documentation

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: deep-learning, machine-learning
- platform: python
- tags: hopfield-networks, attention-mechanism, transformers, pytorch, research-code, associative-memory, natural-language-processing

## Member repositories
- ml-jku/hopfield-layers (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.255678+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:58.931515+00:00, confidence not recorded.
  - readme: https://github.com/ml-jku/hopfield-layers (fetched 2026-08-28T04:05:59.255678+00:00, sha b4cc1e6eaed8)
  - homepage: https://ml-jku.github.io/hopfield-layers/ (fetched 2026-08-29T10:45:51.725791+00:00, sha cf906f722226)
- Data as of 2026-08-30T08:39:29.467469+00:00.
