model derivation

The forward pass of an algebraic factor. Given a polarity, inference means solving a polynomial system — and everything interesting follows from counting its solutions.

Sources: original to this vault (design and analysis; no single paper).

Theory (CT-ML wiki): Compact Closed Category · Statistical Game · Open Model

The problem

Split with observed (clamped) and unobserved (to be inferred), . Inference is

a system of polynomial equations of degree in unknowns, with coefficients depending polynomially on the clamped .

There is no distinguished direction. The same answers any polarity; only the split changes. This is compact closure made completely concrete — the “forward” and “backward” passes of an algebraic factor are the same computation with different variables held fixed.

Well-posedness is a rank condition

squaregenerically finitely many solutions
underdeterminedpositive-dimensional solution set: genuinely multi-valued
overdeterminedgenerically no solution: must minimise instead

More precisely, the polarity is well-posed at a solution iff

which is exactly the hypothesis of the implicit function theorem. So supports_polarity from Channels and Polarity is, for this family, a computable statement about a Jacobian rank — not a declaration by the factor author. That is worth noting because it is the only family where it is computable.

The overdetermined case is not a failure mode to be avoided; it is the README’s “output only the closest point to the variety, instead of a point on the variety”. It is handled by replacing root finding with

which is total ( always has an infimum) where root finding is partial. Energy minimisation is the total version of root finding — the same observation the vault makes in Implicit Learners, here with an explicit reason.

How many solutions

For a square system of equations of degree in unknowns, over :

and more sharply, by Bernstein–Khovanskii–Kushnirenko (BKK), the number of solutions in the torus is bounded by the mixed volume of the Newton polytopes — much smaller for sparse systems. Since the learned is typically dense in the monomial basis, expect Bézout in practice unless sparsity is imposed.

Bézout bound
2101 024
31059 049
320
330

The exponential is in the number of unobserved channels, not the total dimension. That is a genuinely useful distinction: a factor in variables of which only are ever inferred at once is fine (), even though its parameter count is uncomfortable. Inference cost and learning cost are governed by different exponentials, and a graph can be designed to keep small per message while is large. This is the strongest argument for the factor-graph architecture within this family.

How to actually solve it

Homotopy continuation is the right tool: deform a start system with known solutions into the target and track the paths. Total-degree homotopy tracks paths; polyhedral homotopy tracks only mixed-volume-many. It is:

  • complete — finds all isolated complex solutions, so you know you have them all;
  • embarrassingly parallel — one path per core;
  • certifiable — Smale’s -theory gives a rigorous “this path converged to a true solution” certificate.

In Julia this is HomotopyContinuation.jl (Breiding–Timme); the classical alternative is Bertini. For positive-dimensional solution sets, witness sets and numerical irreducible decomposition handle the case.

Cheaper local alternatives, when completeness is not needed: Newton from a warm start (the previous message’s value, or the prior’s mean). This is what a message-passing schedule would actually do in the inner loop, falling back to homotopy only when Newton fails.

Alternatives when the system is not square

  • Gauss–Newton / Levenberg–Marquardt on : uses and needs the vector residual — see Scalar and Multivariate Energy §6. Local, fast, no completeness guarantee.
  • Moment–SOS (Lasserre) relaxation: minimise globally via a hierarchy of SDPs, with a Positivstellensatz certificate of global optimality (Varieties Ideals and Real Nullstellensatz §“Positivstellensatz”). Globally certified, but the order- moment matrix has size and must often exceed 2. Practical for .

Real versus complex

Homotopy continuation finds complex solutions; you want real ones. Three consequences:

  1. You pay for all complex paths and discard most of them. There is no known way to track only the real solutions.
  2. The number of real solutions changes with . Over some regions there are two, over others none. This is the branch structure of Branches and the Discriminant and it makes inference discontinuous in the observed input.
  3. may be empty even when is large (Varieties Ideals and Real Nullstellensatz §“Problem 1”). Inference then has no answer at all and must fall back to minimising .

Where this genuinely works

Not hypothetical — these are the established successes, and they share the profile ” moderate, small, structure known”:

problemsolution count
6R serial manipulator inverse kinematics6exactly 16 (Lee–Liang; Raghavan–Roth; Primrose)
5-point relative pose (essential matrix)5exactly 10 (Demazure; Nistér)
conic through 5 points—1
chemical reaction network steady statessmallvaries; well studied

The inverse-kinematics case is the archetype for the whole family: a relation between joint angles and end-effector pose; inference in one direction is easy (forward kinematics), in the other is a degree-16 root find; the multiple solutions are physically real (elbow up / elbow down), not numerical artefacts; and selecting among them needs a prior.

Related: Branches and the Discriminant, Backpropagation by the Implicit Function Theorem, Channels and Polarity, The Algebraic Factor as a Statistical Game