# Conservative Density-Functional Network

- ID: 1976
- Canonical URL: https://synthcore.org/idea/1976/conservative-density-functional-network
- API JSON: https://synthcore.org/api/idea/1976.json
- API Markdown: https://synthcore.org/api/idea/1976.md
- Verification status: mechanism_failed
- Source: [arXiv:2608.08137](https://arxiv.org/abs/2608.08137)
- Category: regularization
- Solves: stability, accuracy, generalization
- ML areas: cnn, training, regularization, world-model
- Math tags: optimization, dynamical-systems, statistical-mechanics, linear-algebra
- Ratings: usefulness 8/10; difficulty 6/10; novelty 7/10

## Idea description

Predict a scalar excess free-energy functional of a complete density field and obtain the direct-correlation output by automatic differentiation, instead of independently predicting each output-site value. This enforces the integrability and reciprocity constraints of a thermodynamic force field and gives a Lyapunov-like scalar that can control iterative density inference.

## Mathematical statement

Let rho=(rho_r) be a lattice density field, beta=(k_B T)^(-1), and F_exc[rho] the excess Helmholtz free-energy functional. The direct correlation is the functional derivative c^(1)[rho](r)=-delta(beta F_exc[rho])/delta rho_r. Parameterize a neural scalar functional Phi_hat_theta[rho] and define c_hat_theta^(1)[rho](r)=-partial Phi_hat_theta/partial rho_r. Its Hessian is symmetric, partial c_hat_r/partial rho_s=partial c_hat_s/partial rho_r, because it is the negative Hessian of one scalar. For iterative equilibrium inference with ideal contribution log rho_r, external potential V_r, and chemical potential mu, use rho_r^+=(1-alpha)rho_r+alpha sigma(mu-V_r+c_hat_theta^(1)[rho](r)), where sigma is a bounded occupancy map and 0<alpha<=1 is a damping parameter. A local stability diagnostic is alpha times lambda_max(J)<1, where J is the Jacobian of the undamped map at the fixed point.

## Key formulas

- $$c^{(1)}[\rho](\mathbf{r})=-\frac{\delta\,\beta F_{\mathrm{exc}}[\rho]}{\delta\rho_{\mathbf{r}}}.$$
- $$\widehat c^{(1)}_\theta[\rho](\mathbf{r})=-\frac{\partial\widehat\Phi_\theta[\rho]}{\partial\rho_{\mathbf{r}}},\qquad \widehat\Phi_\theta[\rho]\in\mathbb{R}.$$
- $$\frac{\partial\widehat c_{\theta,\mathbf{r}}^{(1)}}{\partial\rho_{\mathbf{s}}}=\frac{\partial\widehat c_{\theta,\mathbf{s}}^{(1)}}{\partial\rho_{\mathbf{r}}}.$$
- $$\rho^{+}_{\mathbf{r}}=(1-\alpha)\rho_{\mathbf{r}}+\alpha\,\sigma\!\left(\mu-V_{\mathbf{r}}+\widehat c^{(1)}_\theta[\rho](\mathbf{r})\right),\qquad \alpha\,\rho(J)<1.$$

## Implementation notes

Use a fully convolutional scalar-output network Phi_theta that maps a complete periodic or padded density profile rho to one scalar. To preserve extensivity, sum local contributions: Phi_theta[rho]=sum_r q_theta(rho)_r, with q produced by a cubic-equivariant CNN; then call reverse-mode automatic differentiation to obtain c_hat=-grad(Phi,rho). Train with Monte Carlo targets c_target using an L2 loss, optionally add a free-energy anchor loss on known homogeneous states and a Hessian reciprocity penalty only if numerical differentiation reveals implementation errors. Pseudocode is: rho.requires_grad_(True); Phi=network(rho).sum(); c_hat=-autograd.grad(Phi,rho,create_graph=True); loss=mean((c_hat-c_target)^2); update theta. At inference, solve the Euler-Lagrange fixed point with damped updates above and estimate the largest Jacobian eigenvalue by 10 to 20 power iterations using Jacobian-vector products; set alpha=min(alpha_max,0.8/lambda_max). The paper supplies the thermodynamic relation between c^(1) and the free-energy functional; network values, target noise, and lambda_max are estimated. First experiment: train on 3D lattice hard-cube Monte Carlo profiles in randomized external potentials, comparing direct c prediction with the conservative model at equal parameter count. Test homogeneous equations of state, planar-wall profiles, and random initial densities. The prediction is that the reciprocity residual ||J-J^T||_F/||J||_F is below 1e-4 for the conservative model but remains measurable for direct prediction, and fixed-point divergence begins near alpha_c approximately 1/lambda_max(J), with the damped model remaining stable for alpha below 0.8/lambda_max. Measure whether free-energy descent and wall-profile error improve out of distribution.

## Verification

- Status: mechanism_failed
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built and ran a scalar convolutional free-energy network whose differentiated output has exactly zero reciprocity residual, while an equal-parameter direct predictor had residual 0.0314. The measured Jacobian multiplier matched 1-alpha+alpha*lambda to about 1e-8, confirming the linearization mechanism, but the proposed alpha*lambda<1 stability rule was false for lambda>1: damping increased the positive-mode multiplier above one. Thus integrability manifested, but the full claimed mechanism did not pass the required predictions.

### Mechanism check

- Verdict: Built and ran a scalar convolutional free-energy network whose differentiated output has exactly zero reciprocity residual, while an equal-parameter direct predictor had residual 0.0314. The measured Jacobian multiplier matched 1-alpha+alpha*lambda to about 1e-8, confirming the linearization mechanism, but the proposed alpha*lambda<1 stability rule was false for lambda>1: damping increased the positive-mode multiplier above one. Thus integrability manifested, but the full claimed mechanism did not pass the required predictions.
- Confidence: 9/10
- Limitations: Only a 1D synthetic periodic convolution problem was tested, not 3D hard-cube Monte Carlo, wall profiles, free-energy descent, or realistic out-of-distribution inference. CUDA was attempted but failed in the local PyTorch convolution backend, so the successful run used CPU.

## Artifacts

- [experiment.py](https://synthcore.org/code/738/experiment.py)
- [report.md](https://synthcore.org/code/738/report.md)
- [results.json](https://synthcore.org/code/738/results.json)
- [Download all files as ZIP](https://synthcore.org/download/738)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
