Lo stesso ma diverso: Similarità strutturali e differenze nel Modellamento del Linguaggio Multilingue
The Same But Different: Structural Similarities and Differences in Multilingual Language Modeling
October 11, 2024
Autori: Ruochen Zhang, Qinan Yu, Matianyu Zang, Carsten Eickhoff, Ellie Pavlick
cs.AI
Abstract
Utilizziamo nuovi strumenti dall'interpretabilità meccanicistica per verificare se la struttura interna dei grandi modelli linguistici (LLM) mostri corrispondenza alle strutture linguistiche che sottendono alle lingue su cui sono addestrati. In particolare, ci chiediamo (1) quando due lingue impiegano gli stessi processi morfosintattici, i LLM li gestiscono utilizzando circuiti interni condivisi? e (2) quando due lingue richiedono processi morfosintattici diversi, i LLM li gestiscono utilizzando circuiti interni differenti? Utilizzando modelli multilingue e monolingue in inglese e cinese, analizziamo i circuiti interni coinvolti in due compiti. Troviamo prove che i modelli impiegano lo stesso circuito per gestire lo stesso processo sintattico indipendentemente dalla lingua in cui si verifica, e che questo vale anche per i modelli monolingue addestrati completamente in modo indipendente. Inoltre, mostriamo che i modelli multilingue impiegano componenti specifiche della lingua (head di attenzione e reti feed-forward) quando necessario per gestire processi linguistici (ad esempio, marcature morfologiche) che esistono solo in alcune lingue. Insieme, i nostri risultati forniscono nuove prospettive su come i LLM bilanciano tra sfruttare strutture comuni e preservare differenze linguistiche quando devono modellare contemporaneamente più lingue.
English
We employ new tools from mechanistic interpretability in order to ask whether
the internal structure of large language models (LLMs) shows correspondence to
the linguistic structures which underlie the languages on which they are
trained. In particular, we ask (1) when two languages employ the same
morphosyntactic processes, do LLMs handle them using shared internal circuitry?
and (2) when two languages require different morphosyntactic processes, do LLMs
handle them using different internal circuitry? Using English and Chinese
multilingual and monolingual models, we analyze the internal circuitry involved
in two tasks. We find evidence that models employ the same circuit to handle
the same syntactic process independently of the language in which it occurs,
and that this is the case even for monolingual models trained completely
independently. Moreover, we show that multilingual models employ
language-specific components (attention heads and feed-forward networks) when
needed to handle linguistic processes (e.g., morphological marking) that only
exist in some languages. Together, our results provide new insights into how
LLMs trade off between exploiting common structures and preserving linguistic
differences when tasked with modeling multiple languages simultaneously.Summary
AI-Generated Summary