EconPapers    
Economics at your fingertips  
 

Neural Attention in Heterogeneous-Agent Economies

Alessandro Villa
Additional contact information
Alessandro Villa: https://www.chicagofed.org/people/v/villa-alessandro

No WP 2026-14, Working Paper Series from Federal Reserve Bank of Chicago

Abstract: Transformers, the core architecture behind modern large language models, combine flexible nonlinear approximation with attention, a mechanism that learns how information is aggregated across inputs. Can attention reveal which parts of an agent distribution matter for aggregate dynamics? I represent cross-sectional distributions as economic tokens and embed a transformer in a recursive Krusell–Smith-style solution method. The transformer forecasts the continuation distribution entering individual Bellman equations. I establish an analytical link between transformer attention and the sensitivity of aggregate policy functions to distributional components, with attention recovering their normalized marginal sensitivities under a restricted representation. In Krusell–Smith benchmarks, the transformer rediscovers approximate aggregation and assigns nearly uniform attention when aggregate capital is nearly sufficient. In a heterogeneous-firm economy with endogenous default, attention concentrates near the firm default margin and becomes state dependent: during downturns attention shifts toward financially fragile firms, whose balance sheets become more consequential for leverage and aggregate dynamics.

Keywords: heterogeneous-agent economies; heterogeneous firms; firm dynamics; financial frictions; endogenous default; transformer attention; computational economics; distributional dynamics; neural networks; machine learning (search for similar items in EconPapers)
JEL-codes: C45 C63 C68 D22 E21 E32 E44 G33 (search for similar items in EconPapers)
Pages: 77 pages
Date: 2026-08-19
References: Add references at CitEc
Citations:

Downloads: (external link)
https://doi.org/10.21033/wp-2026-14 Persistent link (text/html)
https://www.chicagofed.org/-/media/publications/wo ... s/2026/wp2026-14.pdf Full text (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:fip:fedhwp:104142

Ordering information: This working paper can be ordered from

DOI: 10.21033/wp-2026-14

Access Statistics for this paper

More papers in Working Paper Series from Federal Reserve Bank of Chicago Contact information at EDIRC.
Bibliographic data for series maintained by Lauren Wiese ().

 
Page updated 2026-11-22
Handle: RePEc:fip:fedhwp:104142