econ-ark/HARK

Bayesian Optimization for Structural Estimation

Closed this issue · 9 comments

cc @alanlujan91

This article outlines Bayesian Optimization, a method of computing $x$ that optimizes $f(x)$ when $f(x)$ is hard to sample and non-differentiable.

https://towardsdatascience.com/the-beauty-of-bayesian-optimization-explained-in-simple-terms-81f3ee13b10f

It looks like this might be an improvement on our current grid-based way of doing structural estimation.

[I learned about this technique in a conversation with other colleagues about surrogate models; this accomplishes some of what surrogate models accomplish, but the algorithm is simpler and requires, I believe, somewhat less infrastructural overhead because it depends on Gaussian Processes rather than full fledged neural network architecture. ]

then proposes a method that samples the parameter space in a semi-disorganized way.

I disagree with this. The sampling strategy is well motivated and more or less the point.

The article also says that the derivative "isn't known", not that it's not differentiable.

Fair enough. That was perhaps my error in representing the article. Which, granted, is a readable public intro to the method not a formal description or proof of its validity.

I don't think many structural papers use a grid search for their parameters.

Is there a concrete example of a structural estimation algorithm you would point to as being superior to Bayesian Optimization?

My understanding is that DistributionOfWealthMPC, the current estimation exemplar in the HARK ecosystem, just uses a grid search.

Yesterday, we discussed how we would like HARK to logically separate several different aspects of its functionality:

  • Configuration Files (DARK files ?)
  • Model objects
  • Solvers (e.g. packaging generic algorithms, and also hand-crafted options)
  • Simulators (e.g. transition matrix, Monte Carlo)

I think we should add 'structural estimators' to this list. Depending on the model, and the computational expense of the viable solvers, and the available simulators, you would want to use different Estimators.

Bayesian Optimization strikes me as one good general Estimation technique worth including in the library. Please tell me if you have a better one in mind!

It sounds like Bayesian Optimization is exotic to economics, but that the idea that we should support Estimators is valid.
It would be interesting to compare Bayesian Optimization directly with Newton and polytope methods on different models.

Hmmm.

Do you mean HARK.estimation ? (I see from the history that this was renamed from HARKestimation in 2018):
https://github.com/econ-ark/HARK/blob/master/HARK/estimation.py

It looks like these are implementations of generic optimization algorithms.
I wonder:

I think I'm suggesting something slightly different, which would be to provide a standard interface for estimating models that builds on what a Model is, so that different techniques can be directly compares. Perhaps that is too far out to be actionable at this point.

Hmm. Interesting. I hadn't realized that this was deemed out of scope for HARK.

The other day CDC asked me to look at uses of deep surrogate models for estimation, in connection to this paper, so maybe the scope has changed.

What I've learned (fortuitously, through conversations around the SHARKFin project) is that there is more to surrogate modeling than "deep" surrogate modeling. Perhaps "deep" surrogate modeling is just the surrogate modeling technique du jour.

Here is the scikit-learn documentation for their Bayesian Optimization implementation, which may be more mathematically specific than the Medium post, and comparison of surrogate models.

https://scikit-optimize.github.io/stable/auto_examples/bayesian-optimization.html

https://scikit-optimize.github.io/stable/auto_examples/strategy-comparison.html

Maybe you're right that this is better demonstrated in a REMARK, DEMARK, or example rather than included in the library.

I'll close out this issue, since there's clearly higher priority stuff to do in the short term. Thanks for talking me through it.