# Self-Attention as a Stack of Finite-Dimensional Ising Models: A Statistical-Physics Viw with GPU-Accelerated Prototype (Lecture)

- Institution: CERN
- Speaker: Lehar Laxmi Joshi
- Year: 2026
- Language: English
- Subjects: Computer science
- Source: [CERN](https://videos.cern.ch/record/3023643)
- Licence: [CERN](https://copyright.web.cern)
- Who can watch: Tweens profiles and older (sources give no ratings; placed by Invisible Network from the source's own words)

**Overview:** Transformer architectures are now central to scientific and industrial machine-learning workflows. Through this lecture, a self-attention head will be recast as a finite-dimensional Ising-like spin system,where token embeddings correspond to vector spins and attention weights emerge from learned spin–spin couplings and external fields. Transformers will be explained using the statistical physics basis for the AI-machine learning system and then we will explore how such Ising‐based formulations behave when implemented as actual attention layers running on modern GPU hardware.

Starting from a theoretical framework, we interpret self-attention as a composition of Ising Hamiltonians and translate it into a concrete, differentiable attention module. This module can replace or augment standard dot-product attention in practice. We make no claims of immediate performance advantages over already established Transformer implementations.

The session shall describe how token embeddings, couplings, and external fields are represented in code. It will cover how the corresponding mean-field or iterative update equations are implemented and explain how these choices affect numerical stability, expressivity, and training dynamics. These are compared to canonical implementations. Finally, outline and demonstrate a prototype implementation. This treats Ising-inspired attention dynamics as a time-stepping scheme. The scheme used will be a HPC explicit method simulation solver that leverages GPU acceleration.

The goal is not to propose a production-ready alternative to current libraries. Instead, to show how existing HPC toolchains for stencil-based simulations can be reused. This lets us explore dynamics, scaling, and numerical behaviour of spin-based attention models while targeting non-trivial sequence lengths. Ising attention offers a physically-grounded alternative. It simplifies scaling and masking. I aim to show how it naturally maps to HPC patterns. The aim…

## Lectures

1. [Self-Attention as a Stack of Finite-Dimensional Ising Models: A Statistical-Physics Viw with GPU-Accelerated Prototype (Lecture)](https://invisiblenetwork.ai/learn/cern/3023643/14824992291e), 55 min (CERN's player)
