Verb Conjugation in Transformers Is Determined by Linear Encodings of Subject Number

Sophie Hao, Tal Linzen
10/23/2023
cs.CLcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

Deep architectures such as Transformers are sometimes criticized for having uninterpretable "black-box" representations. We use causal intervention analysis to show that, in fact, some linguistic features are represented in a linear, interpretable format. Specifically, we show that BERT's ability to conjugate verbs relies on a linear encoding of subject number that can be manipulated with predictable effects on conjugation accuracy. This encoding is found in the subject position at the first layer and the verb position at the last layer, but distributed across positions at middle layers, particularly when there are multiple cues to subject number.

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{hao2023verb,
  title  = {Verb Conjugation in Transformers Is Determined by Linear Encodings of Subject Number},
  author = {Sophie Hao and Tal Linzen},
  year   = {2023},
  eprint = {2310.15151},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.15151v1}
}

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/2310.15151.svg)](https://codeofpaper.com/paper/2310.15151)

Discussion