Do Efficient Transformers Really Save Computation?

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Kai, Ackermann, Jan, He, Zhenyu, Feng, Guhao, Zhang, Bohang, Feng, Yunzhen, Ye, Qiwei, He, Di, Wang, Liwei
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929584498278400
author Yang, Kai
Ackermann, Jan
He, Zhenyu
Feng, Guhao
Zhang, Bohang
Feng, Yunzhen
Ye, Qiwei
He, Di
Wang, Liwei
author_facet Yang, Kai
Ackermann, Jan
He, Zhenyu
Feng, Guhao
Zhang, Bohang
Feng, Yunzhen
Ye, Qiwei
He, Di
Wang, Liwei
contents As transformer-based language models are trained on increasingly large datasets and with vast numbers of parameters, finding more efficient alternatives to the standard Transformer has become very valuable. While many efficient Transformers and Transformer alternatives have been proposed, none provide theoretical guarantees that they are a suitable replacement for the standard Transformer. This makes it challenging to identify when to use a specific model and what directions to prioritize for further investigation. In this paper, we aim to understand the capabilities and limitations of efficient Transformers, specifically the Sparse Transformer and the Linear Transformer. We focus on their reasoning capability as exhibited by Chain-of-Thought (CoT) prompts and follow previous works to model them as Dynamic Programming (DP) problems. Our results show that while these models are expressive enough to solve general DP tasks, contrary to expectations, they require a model size that scales with the problem size. Nonetheless, we identify a class of DP problems for which these models can be more efficient than the standard Transformer. We confirm our theoretical results through experiments on representative DP tasks, adding to the understanding of efficient Transformers' practical strengths and weaknesses.
format Preprint
id arxiv_https___arxiv_org_abs_2402_13934
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Do Efficient Transformers Really Save Computation?
Yang, Kai
Ackermann, Jan
He, Zhenyu
Feng, Guhao
Zhang, Bohang
Feng, Yunzhen
Ye, Qiwei
He, Di
Wang, Liwei
Machine Learning
Artificial Intelligence
Computation and Language
As transformer-based language models are trained on increasingly large datasets and with vast numbers of parameters, finding more efficient alternatives to the standard Transformer has become very valuable. While many efficient Transformers and Transformer alternatives have been proposed, none provide theoretical guarantees that they are a suitable replacement for the standard Transformer. This makes it challenging to identify when to use a specific model and what directions to prioritize for further investigation. In this paper, we aim to understand the capabilities and limitations of efficient Transformers, specifically the Sparse Transformer and the Linear Transformer. We focus on their reasoning capability as exhibited by Chain-of-Thought (CoT) prompts and follow previous works to model them as Dynamic Programming (DP) problems. Our results show that while these models are expressive enough to solve general DP tasks, contrary to expectations, they require a model size that scales with the problem size. Nonetheless, we identify a class of DP problems for which these models can be more efficient than the standard Transformer. We confirm our theoretical results through experiments on representative DP tasks, adding to the understanding of efficient Transformers' practical strengths and weaknesses.
title Do Efficient Transformers Really Save Computation?
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2402.13934