Papers › Energy Transformer

Energy Transformer

14 Feb 2023NeurIPS 2023 11arXiv:2302.07253archive 2025-07-28

Benjamin Hoover, Yuchen Liang, Bao Pham, Rameswar Panda, Hendrik Strobelt, Duen Horng Chau, Mohammed J. Zaki, Dmitry Krotov

Our work combines aspects of three promising paradigms in machine learning, namely, attention mechanism, energy-based models, and associative memory. Attention is the power-house driving modern deep learning successes, but it lacks clear theoretical foundations. Energy-based models allow a principled approach to discriminative and generative tasks, but the design of the energy functional is not straightforward. At the same time, Dense Associative Memory models or Modern Hopfield Networks have a well-established theoretical foundation, and allow an intuitive design of the energy function. We propose a novel architecture, called the Energy Transformer (or ET for short), that uses a sequence of attention layers that are purposely designed to minimize a specifically engineered energy function, which is responsible for representing the relationships between the tokens. In this work, we introduce the theoretical foundations of ET, explore its empirical capabilities using the image completion task, and obtain strong quantitative results on the graph anomaly detection and graph classification tasks.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2302.07253")

Code

Syntology Ran 8 of 13 code samples harvested from 4 repositories linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · honoured contract; 4 ran · our draft was wrong; 2 ran · fixture could not drive it.

By repository: official repository: 11 samples from 4 repositories, 6 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

bhoov/energy-transformer-jax officialmentioned in papermentioned on GitHubjax report
Lemon-cmd/energy-transformer-graph officialmentioned on GitHubjax report
Lemon-cmd/energy-transformer-torch officialmentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 8 ran; 2 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
4ran · our draft was wrong
2ran · fixture could not drive it
5unverified

Licence: 3 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

array_to_img bhoov/energy-transformer-jax/image_core.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 75dcdb1c3263beb4 · report
check_type Lemon-cmd/energy-transformer-graph/src/model/et.py official repository ran · honoured contract MIT (permissive) · 9f8fb6db436eff3e · report
count_parameters Lemon-cmd/energy-transformer-torch/image_et/utils.py official repository ran · honoured contract MIT (permissive) · f6b944f50d3f15ae · report
custom_message_func zhuergou/energy-transformer-for-graph-anomaly-detection/energy_transformer_layer.py official repository ran · our draft was wrong no licence file found · pointer only · e232328a8a2b8b09 · report
img_to_array bhoov/energy-transformer-jax/image_core.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 43e7507240634b11 · report
normal Lemon-cmd/energy-transformer-graph/src/model/et.py official repository ran · our draft was wrong MIT (permissive) · d67b0a557c3733b2 · report
gen_mask_id Lemon-cmd/energy-transformer-torch/image_et/utils.py official repository unverified MIT (permissive) · 47b4e637f9d9e8f9 · report
get_files Lemon-cmd/energy-transformer-torch/image_et/misc.py official repository unverified MIT (permissive) · 0c3b6f391746cf8b · report
get_latest_file Lemon-cmd/energy-transformer-torch/image_et/misc.py official repository unverified MIT (permissive) · 3a6bd7dc66242ce6 · report
parse_number Lemon-cmd/energy-transformer-torch/image_et/misc.py official repository unverified MIT (permissive) · a389ee3bf2f9a9dc · report
unnormalize Lemon-cmd/energy-transformer-torch/image_et/utils.py official repository unverified MIT (permissive) · d62e6f8bc4ddac46 · report
scaled_exp identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 654acacaf00954fb · report
src_dot_dst identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 23fba400cff6fafa · report

Tasks

Anomaly DetectionGraph Anomaly DetectionGraph Classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections