Linguistically Grounded Analysis of Language Models using Shapley Head Values

Marcell Fekete, Johannes Bjerva
10/17/2024
cs.CL

No confident code implementation found for this paper.

Abstract

Understanding how linguistic knowledge is encoded in language models is crucial for improving their generalisation capabilities. In this paper, we investigate the processing of morphosyntactic phenomena, by leveraging a recently proposed method for probing language models via Shapley Head Values (SHVs). Using the English language BLiMP dataset, we test our approach on two widely used models, BERT and RoBERTa, and compare how linguistic constructions such as anaphor agreement and filler-gap dependencies are handled. Through quantitative pruning and qualitative clustering analysis, we demonstrate that attention heads responsible for processing related linguistic phenomena cluster together. Our results show that SHV-based attributions reveal distinct patterns across both models, providing insights into how language models organize and process linguistic information. These findings support the hypothesis that language models learn subnetworks corresponding to linguistic theory, with potential implications for cross-linguistic model analysis and interpretability in Natural Language Processing (NLP).

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{fekete2024linguistically,
  title  = {Linguistically Grounded Analysis of Language Models using Shapley Head Values},
  author = {Marcell Fekete and Johannes Bjerva},
  year   = {2024},
  eprint = {2410.13396},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.13396v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.13396.svg)](https://codeofpaper.com/paper/2410.13396)

Discussion