In order to constrain the parameters of a theory, we usually identify specific observables that are sensitive to those parameters. By modeling how the distribution of those observables depend on the parameters we are able to infer their value from data. In many cases it is not obvious what observables to use. For instance, the coefficients of higher dimensional operators of an EFT impact the distribution of many kinematic distributions at the LHC in subtle ways. While it is easy to simulate these effects, the inverse problem is challenging, particularly once one includes detector effects. I will describe a recently-developed simulation-based inference techniques that uses machine learning techniques to learn likelihood-based observables that are optimal in a precise sense. I will compare these techniques to the simplified template cross-section approach currently in use at the LHC and describe briefly how these techniques can also be applied to dark matter substructure and strong lensing.