Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hao, Yifan, Ye, Chenlu, Han, Chi, Zhang, Tong
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915318533718016
author Hao, Yifan
Ye, Chenlu
Han, Chi
Zhang, Tong
author_facet Hao, Yifan
Ye, Chenlu
Han, Chi
Zhang, Tong
contents Transformer based models have shown remarkable capabilities in sequence learning across a wide range of tasks, often performing well on specific task by leveraging input-output examples. Despite their empirical success, a comprehensive theoretical understanding of this phenomenon remains limited. In this work, we investigate the layerwise behavior of Transformers to uncover the mechanisms underlying their multi-task generalization ability. Taking explorations on a typical sequence model, i.e, Hidden Markov Models, which are fundamental to many language tasks, we observe that: first, lower layers of Transformers focus on extracting feature representations, primarily influenced by neighboring tokens; second, on the upper layers, features become decoupled, exhibiting a high degree of time disentanglement. Building on these empirical insights, we provide theoretical analysis for the expressiveness power of Transformers. Our explicit constructions align closely with empirical observations, providing theoretical support for the Transformer's effectiveness and efficiency on sequence learning across diverse tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2506_01919
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Models
Hao, Yifan
Ye, Chenlu
Han, Chi
Zhang, Tong
Machine Learning
Artificial Intelligence
Transformer based models have shown remarkable capabilities in sequence learning across a wide range of tasks, often performing well on specific task by leveraging input-output examples. Despite their empirical success, a comprehensive theoretical understanding of this phenomenon remains limited. In this work, we investigate the layerwise behavior of Transformers to uncover the mechanisms underlying their multi-task generalization ability. Taking explorations on a typical sequence model, i.e, Hidden Markov Models, which are fundamental to many language tasks, we observe that: first, lower layers of Transformers focus on extracting feature representations, primarily influenced by neighboring tokens; second, on the upper layers, features become decoupled, exhibiting a high degree of time disentanglement. Building on these empirical insights, we provide theoretical analysis for the expressiveness power of Transformers. Our explicit constructions align closely with empirical observations, providing theoretical support for the Transformer's effectiveness and efficiency on sequence learning across diverse tasks.
title Transformers as Multi-task Learners: Decoupling Features in Hidden Markov Models
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2506.01919