• Print
  • Email

Working Papers, No. 2026-14, August 2026 Crossref
Neural Attention in Heterogeneous-Agent Economies

Transformers, the neural-network architecture behind much of modern AI, combine flexible nonlinear approximation with an attention mechanism that learns how information is combined across inputs. Can neural attention reveal which parts of an agent distribution matter for aggregate dynamics? I represent economic states as tokens—such as wealth bins, capital, debt, and productivity—and embed a transformer in a recursive Krusell–Smith-style solution method. The transformer forecasts the continuation tokenized distribution entering individual Bellman equations. Its neural-network component approximates nonlinear aggregate policy functions, while attention learns how distributional information is aggregated and yields interpretable weights. In Krusell–Smith benchmarks, the transformer rediscovers approximate aggregation, assigning nearly uniform attention across the distribution when aggregate capital is nearly sufficient. In a heterogeneous-firm economy with endogenous default, attention instead concentrates near the default margin and rises during crises for financially constrained firms when their default risk becomes more consequential for aggregate dynamics. Attention therefore serves simultaneously as a solution device and a diagnostic of economic aggregation.


Working papers are not edited, and all opinions and errors are the responsibility of the author(s). The views expressed do not necessarily reflect the views of the Federal Reserve Bank of Chicago or the Federal Reserve System.

Having trouble accessing something on this page? Please send us an email and we will get back to you as quickly as we can.

Federal Reserve Bank of Chicago, 230 South LaSalle Street, Chicago, Illinois 60604-1413, USA. Tel. (312) 322-5322

Copyright © 2026. All rights reserved.

Please review our Privacy Policy | Legal Notices