The Palindrome

The Palindrome

Explore LLM word representations using similarity analysis (part 2)

Investigate semantic information inside the attention matrices of GPT-2

Mike X Cohen, PhD's avatar
Tivadar Danka's avatar
Mike X Cohen, PhD and Tivadar Danka
May 20, 2026
∙ Paid

What you will learn in this 2-part post series

The primary goal of this post series is to teach you the Representational Similarity Analysis (RSA), which is a machine-learning analysis that is used to compare distributed representations in different systems.

If you haven’t already read Part 1 in this series, please do so! It provides necessary background about how the RSA score is calculated and interpreted.

As a brief reminder, an RSA (representational similarity analysis) works by comparing cosine similarity matrices across different embeddings spaces (layers, blocks, models, etc.). The idea is that different embeddings spaces may have distinct coordinate systems and even different dimensionalities, but if their internal representational structures are similar, the relative similarities should be strongly correlated even if the vectors are distinct.

The additional goals of this second post are (1) to learn more about RSA and category specificity, and (2) to learn how to dissect the “hid…

User's avatar

Continue reading this post for free, courtesy of Tivadar Danka.

Or purchase a paid subscription.
Mike X Cohen, PhD's avatar
A guest post by
Mike X Cohen, PhD
ex-neuroscience professor | textbook author (linear algebra, stats, calculus) | best-selling Udemy instructor (AI, machine-learning, coding, math) | LinkedIn non-influencer | founder @ Sincxpress.com. You can learn a lot of math with a bit of code.
Subscribe to Mike
© 2026 Tivadar Danka · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture