Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errors
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2025
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866929733937135616 |
|---|---|
| author | Tsuji, Kohei Hiraoka, Tatsuya Cheng, Yuchang Aramaki, Eiji Iwakura, Tomoya |
| author_facet | Tsuji, Kohei Hiraoka, Tatsuya Cheng, Yuchang Aramaki, Eiji Iwakura, Tomoya |
| contents | This paper investigates how LLMs encode inputs with typos. We hypothesize that specific neurons and attention heads recognize typos and fix them internally using local and global contexts. We introduce a method to identify typo neurons and typo heads that work actively when inputs contain typos. Our experimental results suggest the following: 1) LLMs can fix typos with local contexts when the typo neurons in either the early or late layers are activated, even if those in the other are not. 2) Typo neurons in the middle layers are responsible for the core of typo-fixing with global contexts. 3) Typo heads fix typos by widely considering the context not focusing on specific tokens. 4) Typo neurons and typo heads work not only for typo-fixing but also for understanding general contexts. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2502_19669 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errors Tsuji, Kohei Hiraoka, Tatsuya Cheng, Yuchang Aramaki, Eiji Iwakura, Tomoya Computation and Language This paper investigates how LLMs encode inputs with typos. We hypothesize that specific neurons and attention heads recognize typos and fix them internally using local and global contexts. We introduce a method to identify typo neurons and typo heads that work actively when inputs contain typos. Our experimental results suggest the following: 1) LLMs can fix typos with local contexts when the typo neurons in either the early or late layers are activated, even if those in the other are not. 2) Typo neurons in the middle layers are responsible for the core of typo-fixing with global contexts. 3) Typo heads fix typos by widely considering the context not focusing on specific tokens. 4) Typo neurons and typo heads work not only for typo-fixing but also for understanding general contexts. |
| title | Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errors |
| topic | Computation and Language |
| url | https://arxiv.org/abs/2502.19669 |