What is DeepHAM?
There are currently two main approaches for solving HA models with aggregate shocks: the first is the Krusell-Smith (KS) method, a global solution method proposed in Krusell and Smith (1998)1; and the second is the local perturbation method proposed in Reiter (2009)2. In this paper, Han et al. propose a new solution method called “Deep learning-based algorithm for Heterogeneous Agent Models,” or DeepHAM, for solving high dimensional heterogeneous agent models with aggregate shocks. The novelty of their approach relies on the way they use deep learning: they introduce generalized moments to represent the state distribution efficiently, and solve the value and policy outcomes as functions of the generalized moments. Generalized moments extract useful information from the state distribution like classical moments, and are automatically solved from the algorithm. The introduction of the generalized moments also ensures that the agent’s optimal policy and value functions are invariant with respect to the permutation of the ordering of the agents.
DeepHAM improves over the existing method in three ways:
- It shows better global accuracy compared to existing methods. In the baseline model they study, DeepHAM with only the first moment in the state vector reduces the Bellman equation error by 37.5% compared to the KS method. DeepHAM with one generalized moment reduces the error by 54.2%.
- The computational cost of DeepHAM is quite low in solving complex HA models, and it does not suffer from the curse of dimensionality.
- The use of generalized moments allows to revisit the classical question in the macroeconomic literature on whether and how heterogeneity matters to aggregate welfare and dynamics.

DeepHAM: A Global Solution Method for Heterogeneous Agent Models with Aggregate Shocks
Authors: Jiequn Han, Yucheng Yang, Weinan E
From: Princeton University and Peking University
Exploring symmetry in heterogeneous agent models
Kahou et al. develop a different method for solving high-dimensional dynamic programming problems and recursive competitive equilibria with a large (but finite) number of heterogeneous agents using deep learning. Their method is based on the Krussel and Smith method mentioned above. The novelty of their method is in introducing the notion of permutation-invariant dynamic programming and describe how it is possible to use powerful theorems to represent functions invariant to permutations. This theorem can lead to an exponential reduction in the dimensionality of the state space.
In particular, most heterogeneous agent models in economics have a latent but obvious symmetry imposed by the presence of a Walrasian auctioneer. In general equilibrium, the auctioneer collects all the excess supplies of each agent, aggregates them, and sells them. This aggregation removes the indices of agents in the economy and the solution of the model is invariant under all the permutations of other agents’ states. For symmetry to hold, they require that the agents behave the same when they happen to have the same state values.
Their approach has two clear advantages:
- First, they can build from theorems that tell them which representation functions they need, instead of relying on the intuition of the researcher.
- Second, their representation theorem is easily implementable with deep neural networks.
Symmetry, together with concentration of measure, allowed us to break the curse of dimensionality. The method is easy to implement using standard, open-source software libraries and fast to run on a standard laptop. Our results open the door to many applications of interest, including macro, finance, international finance, industrial organization, international trade, spatial economies, and other fields.
Exploiting Symmetry in High-Dimensional Dynamic Programming
Authors: Mahdi Ebrahimi Kahou, Jesús Fernández-Villaverde, Jesse Perla, Arnav Sood
From: University of British Columbia, University of Pennsylvania, Carnegie Mellon University
1. Krusell, Per and Anthony A Smith, Jr (1998), “Income and wealth heterogeneity in the macroeconomy.” Journal of Political Economy, 106, 867–896. 2. Reiter, Michael (2009), “Solving heterogeneous-agent models by projection and perturbation.” Journal of Economic Dynamics and Control, 33, 649–665.