Explore LLM word representations using similarity analysis (part 2)
Investigate semantic information inside the attention matrices of GPT-2
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…




