liveBook · Manning

Multi-head attention

As explained in Applied Reinforcement Learning

Multi-head attention performs several independent attention computations in parallel and combines their outputs to capture different relationship patterns.

Multi-head attention enriches an input representation by running several independent attention computations in parallel. Each head uses its own learned Query, Key, and Value projections, performs scaled dot-product attention, and contributes an output; the outputs are concatenated and passed through a final linear projection. section 9.5

Figure 9.7 Multi head attention architecture

The architecture diagram shows how separate attention heads process inputs and combine their outputs. section 9.5

In a cooling system, different heads can learn different relationships between zones:

A Transformer encoder uses multi-head self-attention so each zone can attend to every other zone, followed by a feedforward network. Residual connections and layer normalization wrap these sub-layers; stacking layers can capture indirect zone-to-zone effects. The resulting representations can inform a reinforcement-learning policy. section 9.6 section 9.8

How Applied Reinforcement Learning covers it

How deep it goes
Details learned Query, Key, and Value projections, scaled dot-product attention, concatenation, and final linear projection.
Examples
Uses thermal proximity, workload correlation, shared cooling infrastructure, and pressure dynamics as inter-zone relationships.
What you can do after
Understand how parallel attention heads represent multiple kinds of relationships between zones.
How it connects
Connects attention to Transformer encoders and reinforcement-learning policies.

Also explained in

Compare how 25 books explain multi-head attention →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Applied Reinforcement Learning. The section links point to the parts of the book it draws on.