Legalean: Proving That Two Statutes Contradict Each Other
Two laws can tell you opposite things. Arizona's S.B. 1070 § 5(C) made it a misdemeanor for an unauthorized immigrant to apply for or perform work. Federal immigration law had deliberately declined to criminalize that same act — Congress…
Five Things Formalizing Immigration Law Taught Me About Law
I wrote up how Legalean works — statutes in, Lean proofs out. This is the other half: what the corpus actually taught me once 24 real provisions were in it. Most of it was not what I expected going in. 1. Agreeing with federal law does not…
Thoughts on AI Safety
Frontier labs currently rely on behavioral evaluations to test model safety. Basically, they have a dataset of “dangerous” questions they give to the model, and if it doesn’t comply it’s considered safe. But what if the model knows it’s being tested, so it deceptively aligns itself with humans while internally harboring misaligned goals?
To put it simply, we cannot trust the output of the model to be truthful. The output is designed to trick you.
The Spiderman Neuron
In 2021, OpenAI researchers were digging into the internal representations of their CLIP model (a multimodal network trained to link images and text), looking for Concept Cells.
When they mapped the activations, they found a literal “Spiderman Neuron” (Neuron 53 in one of the final ResNet layers). This single neuron would fire intensely when the model was fed:
- A photo of someone in a Spiderman costume.
- A comic book illustration of Spiderman.
- The literal text word “Spider-Man”.
- A completely abstract, black-and-white sketch of a spider web.
It proved that deep inside the matrix, the model had dedicated a specific piece of its architecture to the abstract, high-level concept of Spiderman across multiple dimensions of media.
The Halle Berry Neuron
The discovery of the “Spiderman Neuron” in AI models is actually a direct parallel to a famous discovery in human neuroscience: the Halle Berry Neuron.
In 2005, researchers studying epileptic patients with implanted brain electrodes discovered a single neuron in a patient’s medial temporal lobe that fired exclusively in response to Halle Berry.
It fired when the patient saw:
- A photo of Halle Berry.
- A drawing of Halle Berry.
- Halle Berry dressed as Catwoman.
- The written text “Halle Berry”.
It didn’t fire for other actresses, or even for pictures of Halle Berry that didn’t look like her. It was a concept cell: a neuron that had learned the abstract identity of a specific person, completely invariant to the visual medium.
Mapping Token to Word Attention
Because Large Language Models use subword tokenization (like BPE), a word like
indubitablymight be split intoin,du,bit,ably. If you try to visualize the raw attention matrix, you get a massiveToken × Tokengrid that looks like a noisy, unreadable mess to human eyes.To build a human-readable Word-Level Attention Map, we have to mathematically aggregate those token weights.
If Word A is made of 3 tokens, and Word B is made of 2 tokens, how much does Word A attend to Word B? We calculate the “attention from Word A to Word B” by taking the mathematical average of the attention weights going from all 3 sub-tokens of A to all 2 sub-tokens of B.
It’s a mathematical compromise, but it collapses the massive token grid into a clean
Word × Word2D matrix that we can actually interpret.On Tokenization
I’m sure you have all seen some version of this meme: This obviously oversimplified yet vaguely accurate caricature says all LLMs do math on the series of characters we feed into them. As part of this process, LLMs inevitably convert these…
A Guide to (some) Greek Gods in no Particular Order
Zeus is the guy with the thunderbolt, the king of gods. Cronus, his father, had swallowed all his children to prevent a prophecy that one of them would overthrow him. So when Zeus was born, his mother Rhea hid him and gave Cronus a stone…