PML Research LabEquations · v0.3

SmokyCoders Research · PML v0.3 · Mathematical model

E–T–I–G equations

Independent researcher: Prabhat Kumar Manna
Proposed experimental packaging of established math for SAT-3 search. Not a claim that P = NP or P ≠ NP.

1. Unified mathematical structure

PML packages search as one object (call it \(\mathcal{P}\) so it is not confused with “probability” \(p\)):

\[ \mathcal{P} = \bigl(X,\; p,\; G,\; H,\; F,\; \Phi\bigr) \]
SymbolMeaningE–T–I–G role
\(X\)Boolean configuration space \(\{0,1\}^n\)G (discrete)
\(p\)Probability on \(X\) (exact or factorized)I
\(G\)Geometry: Hamming on \(X\); Fisher on parametersG
\(H\)Unsatisfied-clause energyE
\(F\)Free-energy functionalE + I
\(\Phi\)Evolution / update operatorT

Proposed packaging The pieces below that are classical are labeled. What is new is the declarative PML wiring for SAT experiments—not a complexity proof.

2. Geometry (G)

Boolean hypercube

\[ X = \{0,1\}^n \]

Each corner is one full true/false assignment for \(n\) variables.

Hamming distance

\[ d_H(x,y) = \sum_{i=1}^{n} |x_i - y_i| \]

Neighbors: \(d_H(x,y)=1\) (one bit flip). Local search walks these edges.

3. Energy (E)

A 3-SAT instance is \(\Phi_{\mathrm{CNF}} = C_1 \land C_2 \land \cdots \land C_m\). Each clause \(C_j\) has three literals.

Clause indicator

\[ E_j(x) = \begin{cases} 0 & \text{if clause } C_j \text{ is satisfied by } x \\[6pt] 1 & \text{otherwise} \end{cases} \]

Total energy

\[ H(x) = \sum_{j=1}^{m} E_j(x) \]

Meaning: \(H(x)=0\) if and only if \(x\) satisfies every clause (SAT for this assignment).

Expected energy under a distribution

\[ \langle H \rangle_p = \sum_{x \in X} p(x)\, H(x) \]

Individual energy \(H(x)\) is about one assignment. Expected energy is about a whole soft population / belief \(p\).

4. Information (I)

Probability axioms

\[ p(x) \ge 0, \qquad \sum_{x \in X} p(x) = 1 \]

Shannon entropy

\[ S(p) = - \sum_{x \in X} p(x)\, \ln p(x) \]

High \(S\) ≈ “still unsure / spread out.” Low \(S\) ≈ “concentrated.” High entropy alone does not mean useful search diversity (Failure F).

5. Free energy and Gibbs measure

Free-energy functional

\[ F[p] = \langle H \rangle_p - \tau\, S(p) \]

Equivalently (using \(S(p)=-\sum p\ln p\)):

\[ F[p] = \sum_{x} p(x) H(x) + \tau \sum_{x} p(x) \ln p(x) \]

Here \(\tau > 0\) is an algorithmic temperature (knob), not necessarily physical temperature.

Gibbs distribution (minimizer of \(F\) at fixed \(\tau\))

\[ p_\tau(x) = \frac{e^{-H(x)/\tau}}{Z(\tau)}, \qquad Z(\tau) = \sum_{x \in X} e^{-H(x)/\tau} \]

\(Z(\tau)\) is the partition function. Low \(\tau\) concentrates on low-energy states; high \(\tau\) flattens.

Lagrange-multiplier sketch

Minimize \(F[p]\) subject to \(\sum_x p(x)=1\). Stationarity gives

\[ H(x) + \tau\bigl(\ln p(x) + 1\bigr) + \lambda = 0 \quad\Rightarrow\quad p(x) \propto e^{-H(x)/\tau}. \]

Analytically derived (classical statistical mechanics). Using it as a SAT search engine is experimental.

6. Factorized Bernoulli model (what the lab runs)

Exact \(p\) over \(2^n\) states is impossible for large \(n\). v0.3 uses independent Bernoullis:

\[ p_\theta(x) = \prod_{i=1}^{n} q_i^{x_i}\,(1-q_i)^{1-x_i}, \qquad q_i = \sigma(\theta_i) = \frac{1}{1+e^{-\theta_i}} \]

Factorized entropy

\[ S(q) = - \sum_{i=1}^{n} \Bigl( q_i \ln q_i + (1-q_i)\ln(1-q_i) \Bigr) \]

Expected clause failure under independence

For a 3-clause, \(\mathbb{E}[E_j]\) is the product of “each literal is false” probabilities. Example: clause \((x_a \lor \neg x_b \lor x_c)\)

\[ \mathbb{E}[E_j] = (1-q_a)\, q_b\, (1-q_c) \]

Then

\[ \langle H \rangle_{\mathrm{fac}} = \sum_{j=1}^{m} \mathbb{E}[E_j]. \]

Limitation Factorization ignores variable correlations. This is exact for the factorized model, not for the true posterior.

7. Fisher metric and natural gradient

Fisher information metric

\[ g_{ij}(\theta) = \mathbb{E}_{p_\theta} \Bigl[ \partial_i \log p_\theta(x)\; \partial_j \log p_\theta(x) \Bigr] \]

Diagonal Fisher for independent Bernoullis

In \(q\)-coordinates:

\[ g_{ii}(q) = \frac{1}{q_i(1-q_i)}, \qquad g_{ij}=0\ (i\neq j). \]

In logit coordinates \(\theta_i=\mathrm{logit}(q_i)\):

\[ g_{ii}(\theta) = q_i(1-q_i). \]

Natural-gradient flow

\[ \dot\theta = -\,\eta\, G(\theta)^{-1}\, \nabla F(\theta) \]

Under continuous NG flow with \(G \succ 0\) and smooth \(F\), dissipation holds:

\[ \frac{dF}{dt} \le 0. \]

Near \(q_i \to 0\) or \(1\), regularize with a floor \(\varepsilon\) (singular / degenerate Fisher). Regularization required

8. Lagrangian / Hamiltonian extension

Proposed dynamics

\[ L(\theta,\dot\theta) = \tfrac12\, \dot\theta^{\!\top} G(\theta)\, \dot\theta - F(\theta) \]

Mechanically inspired total energy:

\[ H_{\mathrm{tot}} = \tfrac12\, \dot\theta^{\!\top} G\, \dot\theta + F(\theta) \]

Under positive-definite \(G\), time-independent potential, and appropriate damping:

\[ \frac{d}{dt} H_{\mathrm{tot}} \le 0 \quad\text{(stated assumptions only).} \]

Do not copy constant-metric identities blindly onto time-varying \(G(\theta)\). Global convergence to a satisfying assignment is not established.

9. Time dynamics (T) — discrete updates used in the lab

A. Natural gradient (discrete)

\[ q \leftarrow \Pi_{[\varepsilon,\,1-\varepsilon]} \Bigl( q - \eta\, G(q)^{-1}\, \nabla_q F \Bigr) \]

(Implementation may finite-difference \(\nabla F\) and use the diagonal Fisher.)

B. Momentum

\[ v \leftarrow \mu\, v - \eta\, G^{-1}\nabla F, \qquad q \leftarrow \Pi(q + v) \]

C. Energy-only

Same as NG with \(\tau \to 0\) so \(F \approx \langle H\rangle\).

Decode to Boolean assignment

\[ \hat x_i = \mathbf{1}[q_i \ge 1/2] \]

Then run the independent verifier on \(\hat x\) (and optionally on samples from \(q\)).

10. Independent verification (non-negotiable)

\[ \mathrm{SAT}(\hat x) \;\Longleftrightarrow\; H(\hat x) = 0 \;\Longleftrightarrow\; \forall\, j:\ E_j(\hat x)=0 \]

The optimizer’s internal \(\langle H\rangle\) is never trusted as a certificate. Optimizer failure is never an UNSAT proof.

Try it live. Numbers on charts come from these formulas in the simulator (pml-core.js). Narrative: full paper.