Energy Transformer
Abstract
Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.
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.
Results and benchmarks
Our work combines aspects of three promising paradigms in machine learning, namely, attention mechanism, energy-based models, and associative memory.
| Task | Dataset | Metric | Value | Source |
|---|---|---|---|---|
| Transformer | Yelp Restaurant | V | 3846979 | paper-derived |
| Transformer | Amazon | V | 4398392 | paper-derived |
| Transformer | T-Finance | V | 21222543 | paper-derived |
Audit each benchmark finding before selecting an implementation path. Evidence refs map to the disclosure below.
Evidence graph: 3 refs, 3 links.
Utility signals: depth 100/100, grounding 85/100, status high.
Implementation
Historical official implementation (not recommended for new builds)
Only a historical official implementation is available
Use with caution for new projects; verify against current tooling and maintained community alternatives.
bhoov/energy-transformer-jax · 68 stars · Last push Dec 14, 2023
alexiglad/EBT is the closest maintained adjacent implementation (Matches contextual method/domain keyword: transformer). It is not paper-verified; validate algorithm and evaluation setup against the paper before trusting reported metrics. Community adoption signal: 648 GitHub stars.
Open bhoov/energy-transformer-jax- Adjacent implementations are not paper-verified
- Recommended repository is adjacent and not paper-verified.
- Adjacent implementation match confidence is low.
- No direct maintained implementation is currently verified.
- Only historical official repository was found: bhoov/energy-transformer-jax.
- No maintained paper-verified implementation met reliability thresholds.
Compare implementation paths
Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.
- Maintenance
- Stale
- Confidence
- High
- Reproducibility
- Moderate
- Stars
- 68
- Last push
- Dec 14, 2023 (985d)
Official implementation from Papers with Code · Repository link is mentioned in the paper metadata
- No push in 12+ months
- No CI pipeline detected
- No tagged releases
- Maintenance
- Stale
- Confidence
- High
- Reproducibility
- Moderate
- Stars
- 32
- Last push
- Mar 10, 2024 (898d)
Official implementation from Papers with Code · Matched via arXiv identifier search
- No push in 12+ months
- No CI pipeline detected
- No tagged releases
- Maintenance
- Stale
- Confidence
- High
- Reproducibility
- Moderate
- Stars
- 27
- Last push
- Jan 28, 2024 (940d)
Official implementation from Papers with Code · Matched via arXiv identifier search
- No push in 12+ months
- No CI pipeline detected
- No tagged releases
Reproduction readiness
Setup required
Dependencies pinned, manual setup needed
- bhoov/energy-transformer-jax has pyproject.toml but requires manual environment setup.
- Last push was 985 days ago, so expect possible dependency version conflicts.
- No Dockerfile, so you will set up the environment manually.
- No CI pipeline, so test coverage is unknown.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Quick start
git clone https://github.com/bhoov/energy-transformer-jax.git
pip install -e . Framework baselines
- Hugging Face Transformers training guide
Modern transformer training baseline.
- PyTorch nn.Transformer docs
Reference transformer building block implementation.
Repositories and ecosystem
Closest related implementations
These are not paper-verified. Use them as reference points when no direct implementation is available.
- alexiglad/EBT Adjacent · Confidence: Low · 648 stars
Matches contextual method/domain keyword: transformer
- William-Liwei/EnergyPatchTST Adjacent · Confidence: Low · 347 stars
Matches contextual method/domain keyword: transformer
- qitianwu/DIFFormer Adjacent · Confidence: Low · 313 stars
Matches contextual method/domain keyword: transformer
- rajabi2001/sega Adjacent · Confidence: Low · 73 stars
Matches contextual method/domain keyword: transformer
Official
- Lemon-cmd/energy-transformer-torchConfidence: High
Official Implementation of Energy Transformer in PyTorch for Mask Image Reconstruction
32 stars · 6 forks · Last push Mar 10, 2024 · MIT license
- Lemon-cmd/energy-transformer-graphConfidence: High
This repository contains the official code for Energy Transformer---an efficient Energy-based Transformer variant for graph classification
27 stars · 4 forks · Last push Jan 28, 2024 · MIT license
- zhuergou/energy-transformer-for-graph-anomaly-detectionConfidence: High
zhuergou/Energy-Transformer-for-Graph-Anomaly-Detection
10 stars · 2 forks · Last push May 21, 2023
Community
No additional community repositories detected yet.
These repositories had low-confidence matching signals and are hidden by default.
- bahefe/energy_transformer
Confidence: Medium · 0 stars
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
Tasks
Transformer
Methods
Transformer
Domains
Computer vision
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.
Data includes links from Papers with Code ( CC-BY-SA-4.0 ).