Symbolic Density Estimators for Unnormalized Distributions
Organizations: Department of Electrical Engineering IIT Kanpur · Department of Computer Science and Engineering IIT Kanpur · Department of Physics IIT Kanpur · Department of Electrical Engineering KU Leuven
Abstract
Estimating the symbolic or analytical form of probability density functions (PDFs) from observed samples is a fundamental challenge in statistical and computational modelling. This process is critical for deriving interpretable and generalizable relationships characterizing the underlying phenomenon. Traditionally, this estimation depends strongly on domain expertise and prior field-specific knowledge, with experts selecting appropriate functional forms or parametric families based on empirical evidence and theoretical understanding. The coefficients of these forms are then typically determined through parameter estimation. In this paper, we develop a framework for estimating symbolic expressions of unnormalized distributions from observed samples using domain-specific prior knowledge, such as the range of interactions and a predefined set of primitive functions. We integrate deep generative models with symbolic regression (SR), incorporating inductive biases, such as factorizing large distributions, to keep the problem tractable. The deep generative models we examine include likelihood-based models, viz., flow models, and score-based models. Experiments show the effectiveness of the proposed framework for estimating density functions for multivariate toy distributions as well as lattices from computational physics, namely, XY model and theory. When applied to the renormalization problem in theory, the proposed framework estimates compact symbolic approximations of the hamiltonian function at different scales directly from samples, yielding expressions that may be challenging to derive using traditional perturbative or analytic approaches in nonperturbative settings.
Figures & tables
| MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated | |||
|---|---|---|---|---|---|---|---|---|---|
| MeSSY | 0.0114 | 0.99 | 0.0433 | 1 | 0.80 | 1.00 | 0.89 | 0.48x_{1}^{2}-{\color[rgb]{0.5,0.5,0.5}0.02x_{1}x_{2}}+0.50x_{2}^{2}+1.39x_{1}-1.41x_{2} | |
| NF + PySR | 0.0001 | 0.99 | 0.0017 | 0 | 1.00 | 1.00 | 1.00 | ||
| NF + EQL | 0.0011 | 0.99 | 0.0033 | 0 | 1.00 | 1.00 | 1.00 | ||
| SM + PySR | 0.0013 | 0.99 | 0.0150 | 0 | 1.00 | 1.00 | 1.00 | ||
| SM + EQL | 0.0014 | 0.99 | 0.0230 | 0 | 1.00 | 1.00 | 1.00 | ||
| MeSSY | 0.0493 | 0.95 | 0.1199 | 0 | 1.00 | 1.00 | 1.00 |
| Model | MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | ||
| 2 | MeSSY | 0.02 | 0.98 | 0.2396 | 2 | 0.67 | 1.00 | 0.80 | 0.96x_{1}^{4}+{\color[rgb]{0.5,0.5,0.5}0.1x_{1}^{3}}-5.77x_{1}^{2}-0.83x_{1}+0.61x_{2}^{2}-{\color[rgb]{0.5,0.5,0.5}0.23x_{2}} |
| NF + PySR | 0.00 | 0.99 | 0.0008 | 0 | 1.00 | 1.00 | 1.00 | ||
| NF + EQL | 0.00 | 0.99 | 0.0196 | 0 | 1.00 | 1.00 | 1.00 | ||
| SM + PySR | 0.00 | 0.99 | 0.0142 | 0 | 1.00 | 1.00 | 1.00 | ||
| SM + EQL | 0.00 | 0.99 | 0.0617 | 0 | 1.00 | 1.00 | 1.00 | ||
| 4 | NF + PySR | 0.00 | 0.97 | 0.0296 | 0 | 1.00 | 1.00 | 1.00 |
| Model | MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated | |
|---|---|---|---|---|---|---|---|---|
| MeSSY | - | - | - | - | - | - | - | - |
| NF + PySR | 4.83 | 0.92 | 0.1127 | 0 | 1.00 | 1.00 | 1.00 | |
| DSM + PySR | 42.22 | 0.30 | 0.6200 | 2 | 0.50 | 0.50 | 0.50 | -0.27\cos(x_{0}-x_{1})-{\color[rgb]{0.5,0.5,0.5}0.04x_{0}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.04x_{3}^{2}} |
| NF + EQL | 6.74 | 0.87 | 0.0141 | 4 | 0.67 | 1.00 | 0.80 | -0.72\cos(x_{0}-x_{1})-0.72\cos(x_{0}-x_{2})+{\color[rgb]{0.5,0.5,0.5}0.11\cos(x_{0}-x_{3})}+{\color[rgb]{0.5,0.5,0.5}0.19\cos^{2}(x_{3})}-{\color[rgb]{0.5,0.5,0.5}0.28\cos(x_{0})+{\color[rgb]{0.5,0.5,0.5}0.32\cos(x_{3})}} |
| DSM + EQL | 47.72 | 0.21 | N/A | 2 | 0.33 | 0.50 | 0.40 | -{\color[rgb]{0.5,0.5,0.5}0.46\cos(0.34x_{0}-0.59x_{2}+0.30x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.64\cos(0.48x_{0}-0.61x_{2}-0.33x_{3}))} |
| Model | MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated | ||
|---|---|---|---|---|---|---|---|---|---|
| (A) | MeSSY | - | - | - | - | - | - | - | - |
| NF + PySR | 0.02 | 0.99 | 0.0175 | 0 | 1.00 | 1.00 | 1.00 | ||
| NF + EQL | 0.29 | 0.99 | 0.1583 | 4 | 0.43 | 1.00 | 0.60 | 3.42x_{0}^{4}-2.33x_{0}x_{1}-2.33x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}0.29x_{0}x_{1}^{3}}+{\color[rgb]{0.5,0.5,0.5}0.40x_{1}^{3}x_{3}}-{\color[rgb]{0.5,0.5,0.5}0.13x_{0}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.49x_{1}x_{2}} | |
| DSM + PySR | 0.01 | 0.99 | 0.0108 | 0 | 1.00 | 1.00 | 1.00 | ||
| DSM + EQL | 0.06 | 0.99 | 0.0358 | 1 | 0.75 | 1.00 | 0.86 | 3.65x_{0}^{4}-2.01x_{0}x_{1}-2.03x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}0.12x_{0}^{2}} | |
| (B) | MeSSY | - | - | - | - | - | - | - | - |
| MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated | |||
|---|---|---|---|---|---|---|---|---|---|
| PySR | 0.003 | 0.99 | 0.0241 | 0 | 1.00 | 1.00 | 1.00 | ||
| 0.006 | 0.99 | 0.0199 | 0 | 1.00 | 1.00 | 1.00 | |||
| 0.008 | 0.99 | 0.0158 | 0 | 1.00 | 1.00 | 1.00 | |||
| EQL | 0.07 | 0.99 | 0.0516 | 4 | 0.50 | 1.00 | 0.67 | 3.69x_{0}^{4}+5.27x_{0}^{2}-2.01x_{0}x_{2}-2.14x_{0}x_{1}-{\color[rgb]{0.5,0.5,0.5}0.68x_{1}x_{2}^{3}}-{\color[rgb]{0.5,0.5,0.5}0.27x_{2}^{3}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.14x_{0}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.45x_{1}x_{2}} | |
| 0.98 | 0.98 | 0.0330 | 4 | 0.50 | 1.00 | 0.67 | 3.86x_{0}^{4}+5.21x_{0}^{2}-2.1x_{0}x_{1}-1.99x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}0.42x_{1}x_{2}}-{\color[rgb]{0.5,0.5,0.5}1.01x_{0}^{3}x_{2}}-{\color[rgb]{0.5,0.5,0.5}0.14x_{0}^{3}x_{1}}-{\color[rgb]{0.5,0.5,0.5}0.13x_{0}^{3}x_{5}} | ||
| 0.11 | 0.99 | 0.0409 | 7 | 0.36 | 1.00 | 0.53 | 3.61x_{0}^{4}+4.97x_{0}^{2}-2.09x_{0}x_{1}-2.03x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}0.11x_{0}^{3}x_{3}}-{\color[rgb]{0.5,0.5,0.5}0.12x_{0}^{3}x_{8}}-{\color[rgb]{0.5,0.5,0.5}0.1x_{0}x_{9}}+{\color[rgb]{0.5,0.5,0.5}0.28x_{1}x_{4}}+{\color[rgb]{0.5,0.5,0.5}0.27x_{0}x_{5}}+{\color[rgb]{0.5,0.5,0.5}0.14x_{0}x_{2}}+{\color[rgb]{0.5,0.5,0.5}0.13x_{0}x_{8}} |
| 32x32 | 16x16 | 8x8 | ||||
|---|---|---|---|---|---|---|
| Observable | % Overlap( ) | EMD ( ) | % Overlap( ) | EMD ( ) | % Overlap( ) | EMD ( ) |
| Magnetization, M | 98.116 | 98.845 | 98.759 | |||
| Absolute Magnetization, |M| | 98.197 | 98.794 | 98.749 | |||
| Magnetic Susceptibility | 98.244 | 99.187 | 99.187 | |||
| Magnetization, M | Absolute Magnetization, |M| | Magnetic Susceptibility | |||||
|---|---|---|---|---|---|---|---|
| Mean | Std Dev ( ) | Mean | Std Dev ( ) | Mean | Std Dev ( ) | ||
| Coarsened Data | 0.0066 | 0.0053 | 0.0039 | 0.0441 | 0.0609 | ||
| Generated Data | 0.0068 | 0.0055 | 0.0041 | 0.0481 | 0.0681 | ||
| Coarsened Data | 0.0066 | 0.0053 | 0.0039 | 0.0110 | 0.0152 | ||
| Generated Data | 0.0067 | 0.0053 | 0.0040 | 0.0115 | 0.0161 | ||
| Coarsened Data | 0.0066 | 0.0053 | 0.0039 | 0.0028 | 0.0038 | ||
| Dataset | MSE | MSE | |
|---|---|---|---|
| PySR | EQL | ||
| Many Well, | 0.01 | 0.00 | 0.00 |
| Many Well, | 0.05 | 0.00 | 0.00 |
| Many Well, | 1.60 | 0.00 | 0.23 |
| XY; | 9.79 | 4.83 | 6.74 |
| 1.43 | 0.02 | 0.29 | |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Experiment | Operator Library | Layers | Patch Size | Range of Interaction | Exact Terms Present |
|---|---|---|---|---|---|
| Multivariate Gaussian | Const(2), Id(2), Cos(1), Square(2), Exp(2), Mul(2), Pow4(2) | 2/3 | – | – | Yes |
| Many-Well | Const(2), Id(2), Square(3), Exp(2), Mul(1), Pow4(2) | 2/3 | Yes | ||
| Const(1), Id(2), Square(2), Exp(1), Mul(2), Pow4(2) | 2 | , , | Yes | ||
| XY | Const(1), Id(1), Cos(1), Sin(1), Square(1), Mul(2) | 2 | , | Yes |
| Experiment | Operator Library | Population | Complexity | Patch Size | Range of Interaction | Exact Terms Present |
|---|---|---|---|---|---|---|
| Multivariate Gaussian | 10 | 20 | – | – | No | |
| Many-Well | 30 | 30 | Yes | |||
| 30 | 30 | , , | Yes | |||
| XY | 30 | 30 | , | Yes |
| No. of Samples | MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | |
|---|---|---|---|---|---|---|---|---|
| 10K | 0.47 | 0.994 | 0.09 | 0 | 1 | 1 | 1 | |
| 50K | 0.07 | 0.999 | 0.03 | 0 | 1 | 1 | 1 | |
| 100K | 0.01 | 0.999 | 0.02 | 0 | 1 | 1 | 1 |
| MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 0.00 | 0.999 | 0.024 | 0 | 1.00 | 1.00 | 1.00 | |
| 2 | 0.02 | 0.999 | 0.063 | 0 | 1.00 | 1.00 | 1.00 | |
| 3 | 0.01 | 0.999 | 0.136 | 0 | 1.00 | 1.00 | 1.00 | |
| 4 | 0.04 | 0.998 | 0.075 | 1 | 0.75 | 0.75 | 0.75 | 5.93x_{0}^{2}-2.04x_{0}x_{1}-2.04x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}4.21x_{0}^{6}} |
| 5 | 0.11 | 0.996 | 0.042 | 0 | 1.00 | 1.00 | 1.00 | |
| 6 | 0.05 | 0.998 | 0.016 | 1 | 0.75 | 0.75 | 0.75 | 5.01x_{0}^{2}-2.01x_{0}x_{1}-2.08x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}3.65x_{0}^{6}} |
| MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 0.07 | 0.99 | 0.058 | 4 | 0.50 | 1.00 | 0.67 | 3.69x_{0}^{4}+5.27x_{0}^{2}-2.01x_{0}x_{2}-2.14x_{0}x_{1}-{\color[rgb]{0.5,0.5,0.5}0.68x_{1}x_{2}^{3}}-{\color[rgb]{0.5,0.5,0.5}0.27x_{2}^{3}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.14x_{0}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.45x_{1}x_{2}} |
| 2 | 0.054 | 0.998 | 0.067 | 11 | 0.27 | 1.00 | 0.42 | 3.46x_{0}^{4}+4.78x_{0}^{2}-2.14x_{0}x_{1}-2.01x_{0}x_{2}-{\color[rgb]{0.5,0.5,0.5}0.13x_{0}x_{1}^{3}-0.32x_{0}x_{2}^{3}+\cdots\text{Other terms}} |
| 3 | 0.048 | 0.998 | 0.089 | 17 | 0.19 | 1.00 | 0.32 | 3.32x_{0}^{4}+5.08x_{0}^{2}-2.07x_{0}x_{1}-2.28x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}0.06x_{0}x_{3}^{3}+0.23x_{0}x_{1}^{3}+\cdots\text{Other terms}} |
| 4 | 0.054 | 0.098 | 0.065 | 9 | 0.31 | 1.00 | 0.47 | 3.46x_{0}^{4}+4.78x_{0}^{2}-2.14x_{0}x_{1}-2.04x_{0}x_{2}-{\color[rgb]{0.5,0.5,0.5}0.32x_{0}x_{2}^{3}-0.13x_{0}x_{1}^{3}+\cdots\text{Other terms}} |
| 5 | 0.041 | 0.998 | 0.066 | 24 | 0.14 | 1.00 | 0.25 | 3.61x_{0}^{4}+5.06x_{0}^{2}-2.26x_{0}x_{1}-2.05x_{0}x_{2}-{\color[rgb]{0.5,0.5,0.5}0.16x_{1}^{2}x_{2}^{2}+0.28x_{0}^{2}x_{1}^{2}+\cdots\text{Other terms}} |
| MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 0.72 | 0.985 | 0.279 | 0 | 1.00 | 1.00 | 1.00 | |
| 2 | 0.46 | 0.990 | 0.126 | 0 | 1.00 | 1.00 | 1.00 | |
| 3 | 0.32 | 0.993 | 0.242 | 1 | 0.80 | 1.00 | 0.89 | |
| 4 | 0.28 | 0.994 | 0.160 | 0 | 1.00 | 1.00 | 1.00 | |
| 5 | 0.40 | 0.991 | 0.179 | 0 | 1.00 | 1.00 | 1.00 | |
| 6 | 0.42 | 0.991 | 0.189 | 0 | 1.00 | 1.00 | 1.00 |
| MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 0.57 | 0.997 | 0.583 | 3 | 0.57 | 1.00 | 0.73 | 1.03x_{1}^{4}-6.01x_{1}^{2}-1.64x_{1}+0.49x_{2}^{2}-{\color[rgb]{0.5,0.5,0.5}0.22x_{1}^{5}}+{\color[rgb]{0.5,0.5,0.5}0.64x_{1}^{3}}+{\color[rgb]{0.5,0.5,0.5}0.23x_{1}x_{2}} |
| 2 | 0.92 | 0.971 | 1.452 | 2 | 0.67 | 1.00 | 0.80 | 0.89x_{1}^{4}-5.65x_{1}^{2}+2.30x_{1}+0.48x_{2}^{2}+{\color[rgb]{0.5,0.5,0.5}0.14x_{1}^{5}-1.09x_{1}^{3}} |
| 3 | 1.78 | 0.953 | 0.868 | 4 | 0.50 | 1.00 | 0.67 | 0.51x_{1}^{4}-5.14x_{1}^{2}+0.89x_{1}+0.47x_{2}^{2}+{\color[rgb]{0.5,0.5,0.5}0.16x_{1}^{6}-0.12x_{1}^{5}-0.24x_{1}^{3}-0.14x_{1}x_{2}} |
| 4 | 0.57 | 0.976 | 1.517 | 2 | 0.67 | 1.00 | 0.80 | 0.81x_{1}^{4}-5.52x_{1}^{2}+2.38x_{1}+0.48x_{2}^{2}+{\color[rgb]{0.5,0.5,0.5}0.16x_{1}^{5}-1.16x_{1}^{3}} |
| 5 | 2.01 | 0.949 | 1.570 | 3 | 0.57 | 1.00 | 0.73 | 0.73x_{1}^{4}-5.46x_{1}^{2}+2.44x_{1}+0.48x_{2}^{2}+{\color[rgb]{0.5,0.5,0.5}0.19x_{1}^{5}-1.23x_{1}^{3}+0.13x_{1}x_{2}} |
| 6 | 2.58 | 0.928 | 1.205 | 2 | 0.67 | 1.00 | 0.80 | 1.33x_{1}^{4}-6.49x_{1}^{2}+1.69x_{1}+0.48x_{2}+{\color[rgb]{0.5,0.5,0.5}0.13x_{1}^{5}-0.89x_{1}^{3}} |
| Method | MSE( ) | RCE( ) | ST( ) | P( ) | R( ) | F1( ) | Estimated Equation | |
|---|---|---|---|---|---|---|---|---|
| NF + PySR | 0.7711 | 0.9704 | 0.1428 | 0 | 1.00 | 1.00 | 1.00 | |
| DSM + PySR | 0.8372 | 0.9680 | 0.0570 | 0 | 1.00 | 1.00 | 1.00 | |
| NF + EQL | 13.8171 | 0.4225 | 1.5385 | 1467 | 0.003 | 1.00 | 0.005 | 0.26x_{12}^{4}+1.62x_{12}^{2}+2.07x_{2}x_{12}+1.47x_{10}x_{12}-2.11x_{12}x_{14}-1.97x_{12}x_{22}+\cdots\text{{\color[rgb]{0.5,0.5,0.5}Higher order terms}} |
| DSM + EQL | 23.8519 | 0.0031 | 0.9181 | 4 | 0.50 | 0.67 | 0.57 | 0.03x_{12}^{4}-0.12x_{2}x_{12}-0.10x_{10}x_{12}-0.10x_{12}x_{14}-{\color[rgb]{0.5,0.5,0.5}0.16x_{7}x_{12}+0.03x_{11}x_{12}-0.05x_{12}x_{13}+0.06x_{12}x_{17}} |
| Method | MSE( ) | ( ) | Estimated |
|---|---|---|---|
| NF + PySR | 0.0085 | 0.99 | |
| NF + EQL | 2.2872 | 0.90 | 5.10x_{0}^{2}-2.16x_{0}x_{1}-1.75x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}2.62x_{0}x_{3}}+{\color[rgb]{0.5,0.5,0.5}0.25x_{1}x_{2}}+\cdots+{\color[rgb]{0.5,0.5,0.5}\text{higher-order polynomial terms}}+\cdots+{\color[rgb]{0.5,0.5,0.5}\text{nested }\sin,\cos\text{ terms}} |
| Method | MSE( ) | ( ) | Estimated |
|---|---|---|---|
| NF + PySR | 8.84 | 0.81 | -0.03x_{0}^{2}x_{1}^{2}-0.03x_{0}^{2}x_{2}^{2}+0.03x_{0}x_{1}^{3}+0.02x_{0}x_{2}^{3}+0.02x_{0}^{3}x_{2}+0.15x_{0}^{2}+0.56x_{1}^{2}-0.43x_{0}x_{1}-0.30x_{0}x_{2}-{\color[rgb]{0.5,0.5,0.5}0.07x_{1}^{3}-0.07x_{0}x_{1}^{2}+0.15x_{0}^{2}x_{1}}+{\color[rgb]{0.5,0.5,0.5}0.15x_{1}} |
| NF + EQL | 7.13 | 0.85 | 0.46x_{0}^{2}+0.14x_{1}^{2}+0.17x_{2}^{2}-0.37x_{0}x_{1}-0.24x_{0}x_{2}+{\color[rgb]{0.5,0.5,0.5}0.14x_{1}+0.11x_{0}} |
| Method | |||
|---|---|---|---|
| NF + PySR | 0.22 | 0.01 | |
| NF + EQL | 2.29 | ||
| XY; | NF + PySR | 9.79 | 8.84 |
| NF + EQL | 7.13 |