Analyzing the Inner Workings of Transformers in Compositional Generalization

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kumon, Ryoma, Yanaka, Hitomi
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912240091791360
author Kumon, Ryoma
Yanaka, Hitomi
author_facet Kumon, Ryoma
Yanaka, Hitomi
contents The compositional generalization abilities of neural models have been sought after for human-like linguistic competence. The popular method to evaluate such abilities is to assess the models' input-output behavior. However, that does not reveal the internal mechanisms, and the underlying competence of such models in compositional generalization remains unclear. To address this problem, we explore the inner workings of a Transformer model by finding an existing subnetwork that contributes to the generalization performance and by performing causal analyses on how the model utilizes syntactic features. We find that the model depends on syntactic features to output the correct answer, but that the subnetwork with much better generalization performance than the whole model relies on a non-compositional algorithm in addition to the syntactic features. We also show that the subnetwork improves its generalization performance relatively slowly during the training compared to the in-distribution one, and the non-compositional solution is acquired in the early stages of the training.
format Preprint
id arxiv_https___arxiv_org_abs_2502_15277
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Analyzing the Inner Workings of Transformers in Compositional Generalization
Kumon, Ryoma
Yanaka, Hitomi
Computation and Language
The compositional generalization abilities of neural models have been sought after for human-like linguistic competence. The popular method to evaluate such abilities is to assess the models' input-output behavior. However, that does not reveal the internal mechanisms, and the underlying competence of such models in compositional generalization remains unclear. To address this problem, we explore the inner workings of a Transformer model by finding an existing subnetwork that contributes to the generalization performance and by performing causal analyses on how the model utilizes syntactic features. We find that the model depends on syntactic features to output the correct answer, but that the subnetwork with much better generalization performance than the whole model relies on a non-compositional algorithm in addition to the syntactic features. We also show that the subnetwork improves its generalization performance relatively slowly during the training compared to the in-distribution one, and the non-compositional solution is acquired in the early stages of the training.
title Analyzing the Inner Workings of Transformers in Compositional Generalization
topic Computation and Language
url https://arxiv.org/abs/2502.15277