Saved in:
Bibliographic Details
Main Authors: Xu, Xingcheng, Zhao, Zibo, Zhang, Haipeng, Yang, Yanqing
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2407.17963
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909723750563840
author Xu, Xingcheng
Zhao, Zibo
Zhang, Haipeng
Yang, Yanqing
author_facet Xu, Xingcheng
Zhao, Zibo
Zhang, Haipeng
Yang, Yanqing
contents Transformer-based models excel in various tasks but their generalization capabilities, especially in arithmetic reasoning, remain incompletely understood. Arithmetic tasks provide a controlled framework to explore these capabilities, yet performance anomalies persist, such as inconsistent effectiveness in multiplication and erratic generalization in modular addition (e.g., modulo 100 vs. 101). This paper develops a unified theoretical framework for understanding the generalization behaviors of transformers in arithmetic tasks, focusing on length generalization. Through detailed analysis of addition, multiplication, and modular operations, we reveal that translation invariance in addition aligns with relative positional encoding for robust generalization, while base mismatch in modular operations disrupts this alignment. Experiments across GPT-family models validate our framework, confirming its ability to predict generalization behaviors. Our work highlights the importance of task structure and training data distribution for achieving data-efficient and structure-aware training, providing a systematic approach to understanding of length generalization in transformers.
format Preprint
id arxiv_https___arxiv_org_abs_2407_17963
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Tasks
Xu, Xingcheng
Zhao, Zibo
Zhang, Haipeng
Yang, Yanqing
Machine Learning
Artificial Intelligence
Transformer-based models excel in various tasks but their generalization capabilities, especially in arithmetic reasoning, remain incompletely understood. Arithmetic tasks provide a controlled framework to explore these capabilities, yet performance anomalies persist, such as inconsistent effectiveness in multiplication and erratic generalization in modular addition (e.g., modulo 100 vs. 101). This paper develops a unified theoretical framework for understanding the generalization behaviors of transformers in arithmetic tasks, focusing on length generalization. Through detailed analysis of addition, multiplication, and modular operations, we reveal that translation invariance in addition aligns with relative positional encoding for robust generalization, while base mismatch in modular operations disrupts this alignment. Experiments across GPT-family models validate our framework, confirming its ability to predict generalization behaviors. Our work highlights the importance of task structure and training data distribution for achieving data-efficient and structure-aware training, providing a systematic approach to understanding of length generalization in transformers.
title Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Tasks
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2407.17963