Learning Genuine Poles as Explanations

Many scientific relationships blow up at specific places. Coulomb's force grows without bound as distance shrinks, and lens equations diverge at the focal point. Neural networks that try to represent such behaviour with division or rational activations (ratios of two polynomials) tend to crash in training. The reason is that the gradient of $1/z$ is $-1/z^2$, which grows much faster than the function itself. Every working fix in the literature hides the pole. One family clamps the denominator, another forces it to stay positive, and a third deletes division entirely. The model then trains, but it can no longer say where the blow-up is. Those locations are often the most informative fact a scientist could read off a fitted model.

This note proposes keeping the poles and making them the explanation. The model writes its output as a ratio $N(x)/D(x)$ and builds the denominator from explicit factors whose zero sets are learned surfaces. It is trained on the cross-multiplied residual $yD - N$, an old trick from classical rational approximation, rather than on $y - N/D$. The cross-multiplied residual stays finite near a pole. Its gradients therefore never pass through $1/D^2$, yet the represented function is never capped. After training, the zero set of $D$, together with each factor's order and residue, is an exact, checkable description of where and how the model diverges. It is not a post-hoc approximation of the model. We test this on the setting where pole suppression is known to break interpretability: surrogate-guided symbolic discovery in the style of AI Feynman, plus the division benchmarks where no existing arithmetic module succeeds.

Core Claim

A network with an explicit, factored denominator, trained on a reweighted cross-multiplied loss, can learn real poles of integer order stably in multivariate settings. We make two claims. First, the learned pole set (location, order, residue) recovers the ground-truth singular structure of known physical laws far more accurately than any pole-suppressing architecture, which by construction cannot represent it. Second, using this model as the numerical stand-in for the unknown function inside AI Feynman's symmetry and separability tests should repair the failures those tests show near singular domains.

The model is

$$f_\theta(x) = \frac{N_\theta(x)}{D_\theta(x)}, \qquad D_\theta(x) = \prod_{k=1}^{K} \big(u_k^\top g_\theta(x) - c_k\big)^{m_k}.$$

Here $N_\theta$ is a small network for the numerator, and $g_\theta$ is a feature map, the identity in the low-dimensional physics setting. Each unit vector $u_k$ and offset $c_k$ define a pole surface, and $m_k \in \{0,1,2,3\}$ is its order, selected by sparse relaxation and then snapped to an integer. The training loss is

$$\mathcal{L}(\theta) = \sum_i \frac{\big(y_i D_\theta(x_i) - N_\theta(x_i)\big)^2}{\max\big(\mathrm{sg}[D_\theta(x_i)]^2, \tau\big)},$$

where $\mathrm{sg}$ stops gradients and $\tau$ is a small floor.

At a fixed point of the iteration, the weight cancels and the loss equals ordinary squared error in $y - N/D$. This is the Sanathanan–Koerner reweighting idea. Away from that fixed point, the gradient involves only $yD$, $N$, and derivatives of polynomial factors, all of which are bounded on bounded data. The floor $\tau$ caps how much any near-pole point is weighted. It does not cap the function value. That is the precise sense in which this differs from $\epsilon$-clamping.

Relation to Prior Work

Three papers motivate the proposal by documenting the gap.

  • Neural Arithmetic Units showed that division singularities produce spiky loss landscapes and responded by removing division.
  • A Primer for Neural Arithmetic Logic Modules found that no division module succeeds across all input ranges.
  • AI Feynman left the radiated gravitational-wave power equation unsolved. The research file attributes this to its MLP stand-in fitting singular regions poorly, which corrupts the normalized gradients used for decomposition.

A fourth group of papers constrains the design. These are the pole-suppressing formulations: Padé Activation Units with denominators $1+|Q|$, Enhanced Rational Activations with strictly positive quadratic factors, their reuse in PO-CKAN, and the $\mathrm{sgn}(z)/\max(|z|,\epsilon)$ reciprocal in CoFrNets. These methods show that stability is achievable. They also show that the standard way of achieving it rules out real poles by construction, so we cannot reuse their parameterizations.

The closest existing work is Learning Equations for Extrapolation and Control (EQL÷). It keeps true division, zeroes both value and gradient when $|b|<\theta$, anneals $\theta$, and penalizes small denominators. Our proposal differs on three points. It never zeroes the function or its gradient near the pole; EQL÷'s dead zone is exactly where its flat loss regions and local minima come from. It actively models the pole rather than penalizing proximity to it. And its explanation object is the factored pole set, not a sparse expression with a single output-layer division.

Mistry et al. supply a useful technique: their NMRU feeds explicit reciprocals and reaches up to 99% success on mixed-sign redundant inputs. We treat it as the strongest arithmetic competitor. Note that it represents $1/x_j$ only on the raw inputs, so it cannot place a pole on a learned surface.

Research Program

The program has three parts.

Training dynamics. We will show empirically, and argue formally in a simplified single-factor case, that the cross-multiplied objective with reweighting has bounded gradients. We will also show that its fixed points coincide with least-squares rational fits. The known weakness is that the plain unweighted cross-multiplied loss (Levy's method) is biased toward small $|D|$. Without the reweighting it will place poles poorly. We will measure this bias directly instead of assuming it away. A normalization (unit $u_k$, fixed leading numerator scale) prevents the trivial solution $N=D=0$.

Interpretation. The explanation of a trained model is its partial-fraction summary. For each active factor $k$, it records the surface $u_k^\top g(x)=c_k$, the order $m_k$, and the leading residue, estimated from $N/\partial D$ along the surface. When $g$ is the identity, this is an exact statement about the model rather than an approximation of it. Integrated Gradients has no clear meaning along a path that crosses a pole. We will show that the residues give the analytic replacement: the attribution of the divergent part to each input is the corresponding component of $u_k$, weighted by the residue.

Plugging into symbolic discovery. We replace AI Feynman's MLP stand-in with the pole-explicit model and leave the rest of the pipeline unchanged. The pipeline then queries $(N, D)$ rather than $N/D$ when computing normalized gradients near singular regions. We will also test whether the discovered pole surfaces can seed the formula search directly. For example, a learned factor $(x_1 - x_2)^2$ in a Coulomb-type law suggests the substitution $r = x_1 - x_2$.

Scope is limited honestly. Branch-point singularities such as $1/\sqrt{1-v^2/c^2}$ are not integer-order poles. We include a learnable non-integer exponent only as a stretch experiment and report it separately.

Baselines

Naive reference: a standard MLP. This is the MLP stand-in AI Feynman uses, trained with mean squared error. It answers whether any special handling is needed at all. On EQL÷'s 4D extrapolation formula, an MLP is reported at 0.46 extrapolation error versus 0.01 for EQL÷ (Sahoo et al.), which sets the scale of what "doing nothing" costs.

Pole-suppressing rational baselines. These are Safe PAU, ERA-factored denominators, and the CoFrNet clamped reciprocal. All are matched in parameter count and given the same data. Each gets the same hyperparameter budget (a fixed number of random-search trials over learning rate, polynomial degree, and $\epsilon$ where applicable). We expect them to fit well away from poles. They should fail on pole recovery near poles, because they cannot represent divergence. Beating them means lower error on test points within a shrinking neighbourhood of the true pole, and a non-trivial pole-location estimate where they can only report "none."

EQL÷. This is the strongest existing method that keeps true division and yields symbolic output. We run it with its published three-phase schedule and curriculum on $\theta$, and give it the same number of restarts as our method. Its reported numbers are the 0.01 extrapolation error above and its status as the only method among those it compared that identified division-based formulas. Beating it means two things. On the singular Feynman subset, we must recover the correct pole structure more often across seeds. We must also show lower variance across initializations, since the dead zone is where its local minima arise.

Arithmetic division modules. These are iNALU, Real NPU, NRU and NMRU, run on the single-module division task from A Primer for Neural Arithmetic Logic Modules, using its ranges and success criterion. The reported reference is that no module achieved full success across all ranges, and iNALU solved 3 of 9. NMRU is reported at up to 99% on mixed-sign redundant inputs (Mistry et al.). Beating them means full success on more than 3 of 9 ranges, without losing ground on the redundant mixed-sign setting.

AI Feynman as the end-to-end baseline. Reported results: AI Feynman 1.0 solved 100% of the 100 Feynman equations and 90% of the 20 bonus equations, against 71% and 15% for Eureqa. AI Feynman 2.0 solved all 100 plus 17 mystery equations and tolerated up to 10% noise (AI Feynman 2.0). Because these headline numbers are near ceiling, the comparison must happen on harder versions of the singular equations. We resample them so the domain approaches the pole, and we add noise at the 2.0 tolerance. The same pipeline and search budget are used with each stand-in.

Ablations. Three ablations isolate the key ingredients:

  • explicit factored denominator trained with plain mean squared error, which tests whether the loss matters;
  • cross-multiplied loss without reweighting, which tests Levy bias;
  • capping the function value instead of the weight, which tests whether "cap the weight, not the function" is what helps.

Why not just…?

Why not just fit $1/y$ or $\log|y|$ with an ordinary network? This is a real threat for targets whose only singular feature is a pole and that never vanish. Inverting the target turns poles into smooth zeros. The weakness is that $1/y$ develops poles wherever $y$ has zeros. Many physical laws have both, for example sign-changing fields or $(a-b)/(a+b)$-type ratios, and $\log|y|$ fails at sign changes. We include both transforms as baselines on every singular equation, and we separately report equations with and without zeros in the domain. If the transforms match us on the pole-only subset, we will say so and narrow the claim to mixed zero/pole structure.

Why not just use larger safe rational activations? With enough degree, Safe PAU or ERA can mimic steep growth inside the training range. But a strictly bounded or positive denominator cannot diverge. Extrapolation toward the pole and any reading of its location are therefore structurally unavailable. The near-pole error curve as the test neighbourhood shrinks will show this directly.

Why not just use EQL÷'s curriculum threshold, or symbolic search with no neural network at all? EQL÷ already keeps division, so the question is whether its dead-zone clamp actually hurts. The seed-variance comparison and the "plain MSE" ablation are designed to answer exactly that. For pure symbolic search, the AI Feynman pipeline is our test bed. If brute-force search alone solves the near-pole variants as well as it does with our stand-in, then the contribution narrows to the arithmetic and explanation results.

Proposed Experiments

First check: is the explanation correct? On the Feynman equations that have rational poles inside or at the edge of the sampled domain (Coulomb and gravitational inverse-square laws, thin-lens forms, and the gravitational-wave power equation), we will measure:

  • pole-surface angular error and offset error;
  • order accuracy;
  • residue relative error, across 10 seeds and noise levels from 0 to 10%.

Success means correct order and sub-1% location error on most of these equations at low noise. No pole-suppressing baseline can produce this output.

Second check: does it repair symbolic discovery? We will measure:

  • agreement of separability and symmetry test outcomes with the ground-truth equation structure;
  • full-formula recovery rate, comparing AI Feynman with its MLP stand-in against the same pipeline with our model.

The decisive result is a recovery gain specifically on near-pole resampled equations, with no loss on the regular ones.

Third check: arithmetic division. We compare success rate over the nine ranges of the single-module division task and over the redundant mixed-sign setting against the arithmetic modules above. A secondary check is end-to-end MNIST digit division, where Real NPU is reported at 97.1% (Mistry et al.). This tests whether learned feature maps $g_\theta$ keep the training stable.

Fourth check: gradient health. Throughout, we log per-step gradient norms and count NaN events for every method. This lets us confirm that the stability claim holds empirically and does not just follow from the algebra.

If the ablation without reweighting performs as well as the full method, the reweighting is unnecessary and we will drop it. If plain mean squared error with the factored denominator performs as well, the loss is not the key ingredient. Either outcome sharpens what the contribution actually is.