about
Transformers Meet Neural Algorithmic Reasoners (arxiv.org)
1 point by rntn on Dec 30, 2024 | hide | past | pdf | discuss on HN

In plain words: A language model is paired with a graph-based algorithm solver, letting its words look at the solver's step-by-step node states to get precise reasoning. On text versions of classic algorithm tasks, it beat a language model alone, including on unfamiliar inputs.

Abstract · Transformers meet Neural Algorithmic Reasoners

Transformers have revolutionized machine learning with their simple yet effective architecture. Pre-training Transformers on massive text datasets from the Internet has led to unmatched generalization for natural language understanding (NLU) tasks. However, such language models remain fragile when tasked with algorithmic forms of reasoning, where computations must be precise and robust. To address this limitation, we propose a novel approach that combines the Transformer's language understanding with the robustness of graph neural network (GNN)-based neural algorithmic reasoners (NARs). Such NARs proved effective as generic solvers for algorithmic tasks, when specified in graph form. To make their embeddings accessible to a Transformer, we propose a hybrid architecture with a two-phase training procedure, allowing the tokens in the language model to cross-attend to the node embeddings from the NAR. We evaluate our resulting TransNAR model on CLRS-Text, the text-based version of the CLRS-30 benchmark, and demonstrate significant gains over Transformer-only models for algorithmic reasoning, both in and out of distribution.

Wilfried Bounsi, Borja Ibarz, Andrew Dudzik, Jessica B. Hamrick, Larisa Markeeva, Alex Vitvitskyi, Razvan Pascanu, Petar Veličković
arXiv:2406.09308 · cs.CL, cs.LG · submitted Jun 13, 2024
abstract · pdf · html · To appear at CVPR 2024 Multimodal Algorithmic Reasoning (MAR) Workshop. 10 pages, 5 figures

add comment on HN