PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
October 13, 20250 citationsOpen Access

Depth-Width tradeoffs in Algorithmic Reasoning of Graph Tasks with Transformers

View Full Paper
GYGilad YehudaiCSClayton SanfordMBMaya Bechler-Speicher

Key Points

  • Constant depth is sufficient for solving graph-based problems when using transformers with linear width, optimizing inference time.
  • Recent findings indicate that logarithmic depth can solve algorithmic tasks when embedding dimension is kept sub-linear.
  • The study utilizes both theoretical analysis and empirical evaluations to support the findings on transformer models.
  • Quadratic width is necessary for some algorithmic problems, highlighting the diverse requirements for transformer architecture.

Abstract

Transformers have revolutionized the field of machine learning. In particular, they can be used to solve complex algorithmic problems, including graph-based tasks. In such algorithmic tasks a key question is what is the minimal size of a transformer that can implement a task. Recent work has begun to explore this problem for graph-based tasks, showing that for sub-linear embedding dimension (i.e., model width) logarithmic depth suffices. However, an open question, which we address here, is what happens if width is allowed to grow linearly. Here we analyze this setting, and provide the surprising result that with linear width, constant depth suffices for solving a host of graph-based problems. This suggests that a moderate increase in width can allow much shallower models, which are advantageous in terms of inference time. For other problems, we show that quadratic width is required. Our results demonstrate the complex and intriguing landscape of transformer implementations of graph-based algorithms. We support our theoretical results with empirical evaluations.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Yehudai et al. (2025) studied this question.

synapsesocial.com/papers/68ece2abd1bb2827d1297453https://doi.org/10.48550/arxiv.2503.01805
Ask AI
Helpful
Bookmark
Share
View Full Paper