AhaMetro

Turn a research paper into a metro map

“Imagine the darkness before the spark.”
Michael J. Black, Novelty in Science (2022)

When I read a paper that surprises me, I like to look through older work. Did someone have a similar idea decades ago? What was missing then? I want to know what led the authors to their idea and what finally made it possible. Then I look ahead. What could a machine learn to do if this idea met another line of research?

Inside the paper

Open the full map. Pick a connection to find the evidence in the original paper.

Vaswani et al. · NeurIPS 2017

Can a model read a sentence in parallel and still translate it well?

Earlier translation models used attention to align words across languages. By 2017, GPUs could score many pairs at once. Transformer tested that idea on English–German and English–French translation. Double the input length and full self-attention scores four times as many pairs.

What was worth trying then? What about today?

In 2017, Transformer showed that an encoder could train across a sentence in parallel. Today I would ask a coding agent to rewrite an attention kernel, then measure whether it moves less data through GPU memory.

From my notebook

Blue lines from two papers meet at a station. Green and violet lines lead onward. A dashed path ends at an open diamond.
Illustration made with GPT Image.

A name at the start of a sentence

Suppose a sentence starts with Alice. By the time I get to she, I still know who it refers to. How did an early translation model carry that name across the intervening words? In 2014, Cho and colleagues used gates to decide how much of the previous state to keep as they read each word. In section 2.3 they credit LSTM with inspiring that design. That was the citation that took me back to 1997.

Back in the Transformer diagram, a small plus sign caught my eye. Attention had just updated a word’s representation. Why add its input back? Section 3.1 pointed me to ResNet. In Figure 1, a plain 56-layer image classifier fit its training data worse than a 20-layer one. A shortcut lets a block pass its input on and learn a correction. If nothing needs to change, that correction can be zero. The gates helped me understand how information moves from word to word. The plus sign showed me how it moves from layer to layer.

Follow the gating line back to LSTM
Read the original passage on the residual shortcut
“We employ a residual connection [11] around each of the two sub-layers, followed by layer normalization [1].”

这两处子层各自加上残差连接,再做层归一化。[11] 指向 ResNet。

Follow a line to the original paper

Follow the violet line to Figure 1 of FlashAttention. The recording shows the attention tiles being copied into on-chip SRAM. English and Chinese captions are available.

Transformer · Screen recording Download MP4

Build a map for your own paper

Install the skill, then send your agent a paper link or PDF. To try the prompt below, replace the example link with your own.

Download the skill (.zip)

Unzip the archive and place the aha-metro folder inside .agents/skills/ in your Codex project, then paste the prompt below in that session. For other assistants, follow the README inside the archive.

Reading mode

One agent can build the map. In discussion mode, the agents you connect each read the papers and compare their evidence.

Try it with Transformer

Use $aha-metro to read https://arxiv.org/abs/1706.03762

I built this for fun. I like coming back to the paper I started with and finding one more experiment I’d like to try.