Three things you've drawn separately are the same move. Attention (K·Q·V) gathers values across a sequence, weighted by relevance. The compiler — Grace Hopper's word "compile" literally meant gather (collect the routines, stitch them into one). And gravity gathers pull from every mass, weighted by 1/r² — your gurutva tie. Attend to many · weight by relevance · combine into one. That's the gather, and it has a shape: the hourglass.
The real mechanism, computed in your browser on toy embeddings. Pick a query token; it scores every token's key (a dot product), softmaxes those into weights that sum to 1, and gathers the weighted sum of every token's value into one output. The thick lines are where the attention went. The weights are illustrative (toy vectors); the operation is exact.
Attention. Each query gathers the values of every token, weighted by how well its key matches. The exact, load-bearing instance — a literal weighted gather. The transformer's whole engine.
The compiler. Hopper's A-0 (1952): "compile" meant collect — gather the right pre-written routines off the tape, stitch them into one program. Store once, address by number, gather on demand. The founding move of the field.
Gravity. Every mass gathers pull from every other, weighted by 1/r² — the gravitational softmax (your gurutva tie). The world running attend-and-weight on matter. Flagged as an analogy of shape.
And here's your observation made exact. Four stacked hourglasses give five bellies (the bottles) and four necks — and that's a linear compiler: five stages, four settled intermediate forms between them. Each belly is a gather (attend to the relevant pieces, combine); each neck is the result settling into a narrow universal form before the next gather. The standing wave and the compiler are the same spine.
| belly (gather) | what it attends to → combines | neck (the settled form) |
|---|---|---|
| 1 · LEX | characters → gather into tokens | → the token stream |
| 2 · PARSE | tokens → gather into a tree (by grammar) | → the AST |
| 3 · SEMANTIC | names → gather their declarations / types (a lookup = a gather) | → the annotated AST |
| 4 · OPTIMIZE | equivalent forms → gather, weight by cost, pick | → the optimized IR |
| 5 · CODEGEN | IR ops → gather into machine instructions | → the machine code |
Five bottles, five gathers. The exact gather is attention (Q·K·V is a real weighted sum); the compiler's stages are gathers in shape — they attend to the relevant pieces and combine — which is the honest version of the rhyme. See the five bellies sweep ↗