Reproduce “Do Language Models Encode Semantic Relations? Probing and Sparse Feature Analysis” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Andor Diera, Ansgar Scherp
An integrated framework combining linear probing, sparse autoencoders, and activation patching revealed how semantic relations are encoded and causally influenced across large language models, from Pythia-70M to Llama 3.1 8B. The study identified stronger, causally manipulable signals in larger models, particularly for antonymy, and demonstrated a distinct representational asymmetry between hypernymy and hyponymy.
Key insights
- Semantic relation signals are diffusely distributed across mid-layers of LLMs rather than sharply localized, with the post-residual stream carrying the most information.
- A consistent difficulty hierarchy exists, with antonymy being the easiest to detect and synonymy the hardest, improving with increasing model scale.
- The directionality of hierarchical relations is encoded asymmetrically, with hypernymy being more robust and redundantly encoded than hyponymy.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.