Research / 01

What a transparent
solver can explain.

A boundary guarantee survives coefficient changes. A component-level story may not survive a change of basis. FR-PIELM makes the difference precise.

Neural numerics · Poisson equation10 min read + demonstrations

Suppose every hidden unit in a neural calculation is visible. Its contribution, derivative and coefficient can all be written down. What, exactly, has been explained? We can reconstruct the output—but that alone does not tell us whether its components have physical meaning or help us make a better scientific decision.

FR-PIELM gives this question a small, controlled setting: a neural collocation method for the one-dimensional Poisson equation with prescribed endpoint values. Its finite computation is directly inspectable. That transparency is the starting condition for the research, rather than its conclusion.

This is the transparent scientific-machine-learning side of my mechanistic fidelity research. It asks what turns a description of neural computation into a faithful and useful explanation. The construction and numerical checks below supply specific kinds of evidence; none should be asked to prove more than it does.

The clearest result is positive: the boundary condition can be explained by a property of the entire correction space, independently of the fitted coefficients. An equivalent-basis argument then shows why individual contribution stories have weaker standing: their signs can change while the represented function stays identical. This case study separates a mechanism we can justify from an interpretation that still needs evidence.

What transparency gives us—and what it leaves open

The implementation fixes the hidden parameters, exposes the basis functions and solves a linear system for their output coefficients. We can inspect the resulting function and its derivatives. This makes it possible to trace a numerical response through the actual computation rather than infer it from a visual fit.

But there are several different claims to test. A basis term can contribute to a function without corresponding to a distinct physical cause. A numerically accurate result can have an unstable component-wise explanation. An exact description of the calculation may still offer no advantage for diagnosing a failure or selecting a correction.

The point of choosing a small solver is to separate those claims. First establish what the construction guarantees. Then identify what the numerical checks justify. Only then ask whether the proposed interpretation survives changes of representation, suitable controls and an independent task.

A guarantee we can locate in the construction

Consider u″(x) = f(x) on [a, b], with prescribed endpoint values uₐ and uᵦ. Start with the straight line B joining the endpoints. For each neural unit, subtract the straight line joining that unit’s own endpoint values.

The resulting correction is zero at both ends. Its coefficient can change the interior without changing the boundary. With t = (x − a)/(b − a), the construction is:

B(x) = (1 − t)uₐ + tuᵦ
φᵢ(x) = g(wᵢx + βᵢ) − (1 − t)g(wᵢa + βᵢ) − tg(wᵢb + βᵢ)
uN(x) = B(x) + ∑ᵢ cᵢφᵢ(x)

At a or b, each activation cancels its subtracted endpoint value. Thus every φᵢ vanishes there, independently of cᵢ. This is an algebraic property under the stated finite-value assumptions; numerical evaluation still warrants an endpoint check.

Interactive explanation

Change the curve. Keep the boundary.

Move the coefficient. Both endpoints stay fixed because the correction vanishes there.

Boundary line B(x) = xu(x) = x + cφ(x)
01xu(0) = 0u(1) = 1

φ(x) = log cosh(4x − 2) − log cosh(2)

Mathematical illustration of the implemented boundary construction. The coefficient is chosen here by hand; this is not a solver run.

Move the coefficient in the illustration. The interior bends while the endpoints stay fixed. It uses g(z) = log(cosh z), boundary values 0 and 1, and a coefficient chosen by the slider. The curve illustrates the representation rather than reporting a fitted solver result.

Here there is a precise explanation: the endpoints are fixed because the correction basis vanishes there. The boundary guarantee comes from that algebraic construction, not merely from the presence of neural units. The coefficients can then be used to match the differential equation inside the interval.

Follow the computation without confusing it with a physical cause

The subtracted chord is affine, so its second derivative is zero. Evaluating the curvature of the basis at interior collocation points xⱼ produces a matrix:

Hⱼᵢ = φᵢ″(xⱼ) = wᵢ²g″(wᵢxⱼ + βᵢ)
Fⱼ = f(xⱼ),   Hc = F

The hidden weights and biases are fixed by the construction. Only the output coefficients c are solved here. In the implementation, curvature is evaluated directly:

def support_second_derivative(self, x):
    x_arr = _as_points(x)
    z = x_arr[:, None] * self.weights[None, :] + self.biases[None, :]
    return self.activation.second_derivative(z) * self.weights[None, :] ** 2

For a square nonsingular H, the solver uses LU. For a taller matrix with full column rank, it uses QR to obtain a least-squares solution. The latter need not have zero residual: the right-hand side may lie outside H’s column space. Underdetermined systems are excluded.

The simplicity of Hc = F should not hide a numerical difficulty. Different basis columns can become almost dependent, and a deterministic rule for placing them does not prevent that. Before solving, the code checks numerical rank and a configured condition-number limit. A failed matrix is rejected.

This is computational transparency with a defined numerical role. It tells us how coefficients are obtained and why a matrix may be rejected. Assigning physical meaning to a particular coefficient would require an additional argument.

How the reference implementation constructs and checks the matrix

The three activation curvature profiles are sech²z, exp(−z²) and 1/(1 + z²). Centers are interpolated across sorted nodes. Weights use wᵢ = s a₀/hₘᵢₙ, where a₀ meets a decay threshold and hₘᵢₙ is the minimum positive spacing including the boundaries. An interpolated center need not coincide with a sampled node.

Singular values determine numerical rank using τ = max(rows(H), columns(H)) × machine epsilon × σ₀. Full column rank and the condition limit must both pass. The default condition cap is 10¹²; it is a numerical admission setting, not an accuracy certificate.

Automatic scale selection begins at s = 1. Only a passing initial matrix with a finite condition cap enters the search toward smaller scales, retaining a passing candidate for up to 32 steps by default. It neither rescues a rejected initial matrix nor optimizes solution error.

A documented historical geometry scan found numerical full rank in 4,655 of 5,400 selected square submatrices; 745 were deficient. These counts concern those selected submatrices, not whole-solver success rates. They support keeping an explicit rejection gate.

strict=False permits inspecting rejected diagnostics, but solve(rhs, boundary_values) still refuses a failed matrix. The evaluation API exposes the solution and its first and second derivatives at arbitrary probe points.

Passing the matrix check leaves a gap

A successful solve establishes a statement about H and the sampled equations. The desired solution is a function on an entire interval. The distance between those two statements is where the next research problem begins.

An elementary example makes the gap visible. The residual

r(x) = (x − 0.2)(x − 0.5)(x − 0.8)

is zero at three sampling points and nonzero between them. It is an illustrative residual, not an output from a solver run. Its purpose is to show why exact agreement at the nodes alone cannot certify the whole interval. Increasing the number of probes is useful evidence, but a finite probe set still needs an argument controlling what happens between probes.

Implementation map

From a boundary value to a global error claim

  1. Boundaryφᵢ(0) = φᵢ(1) = 0

    Satisfied algebraically, before solving.

  2. Linear systemrank(A), κ₂(A)

    Reject deficient or excessively ill-conditioned matrices.

  3. Continuous error‖e‖∞ ≤ L²R / 8

    Requires a certified residual bound over the entire interval.

Matrix diagnostics decide whether a coefficient solve may proceed. They do not replace a continuous error argument.

The boundary construction helps again here. Let e = ucandidate − u and r = ucandidate″ − f. Since candidate and exact solution have the same endpoints, e″ = r with e(a) = e(b) = 0. Error estimation becomes a differential equation with known zero boundary values.

The bound is useful because its premise is explicit

Suppose we can certify |r(x)| ≤ R everywhere on the interval. The one-dimensional Green-function argument then gives:

|e(x)| ≤ R(x − a)(b − x)/2
‖e‖∞ ≤ RL²/8,   L = b − a
Interactive explanation

A residual bound becomes an error envelope.

On a unit interval, a certified |r(x)| ≤ R implies |e(x)| ≤ Rx(1 − x)/2.

zero error01
Maximum absolute error0.100R / 8

The word “certified” is the obligation: a finite set of small residuals does not supply this bound.

For a concrete calculation, take f = −2 on [0, 1] with zero endpoint values. The exact solution is u = x(1 − x). A candidate uε = (1 − ε/2)x(1 − x), with ε ≥ 0, has residual ε everywhere and maximum error ε/8. At ε = 0.04, the error is 0.005: the bound is attained. This is an analytic example with a known answer.

The implemented certificate accepts a supplied continuous bound R and performs this conversion. It also supports the L² relations ‖e′‖₂ ≤ (L/π)‖r‖₂ and ‖e‖₂ ≤ (L²/π²)‖r‖₂. It checks that supplied bounds are finite and nonnegative. It does not establish that a supplied number actually encloses the residual everywhere.

That premise is the central unfinished work. A useful certificate must account for behavior between nodes and for the numerical reliability of the bound itself. Reporting a small maximum over a dense grid would not complete that obligation.

Would the explanation survive another representation?

An elementary change of coordinates illustrates the challenge. Keep the function fixed while replacing its basis with an invertible linear mixture. Transform the coefficients accordingly, and their sum represents the same function. The contributions attached to individual coordinates can nevertheless change.

Analytical counterexample · exact arithmetic

The same function tells two component stories.

Original coordinates

φ₁ + φ₂

Coefficients: (1, 1)
Mixed coordinates

−φ₁ + (2φ₁ + φ₂)

Coefficients: (−1, 1)
Same total · same endpoints · same derivatives
The first contribution reverses sign. Its partner compensates exactly. Mixed basis functions are not claimed to be individual neurons from the original activation family; this is a mathematical identity, not a fitted experimental result.

Start with coefficients (1, 1). Replace the second basis function by 2φ₁ + φ₂ and use coefficients (−1, 1). The first contribution changes from φ₁ to −φ₁, while the total remains φ₁ + φ₂ at every point. Because this is the same function, its derivatives, sampled residual and true solution error also remain the same. Numerical conditioning of the coordinate system need not remain the same.

The equivalent-basis identity

Write the correction as Φ(x)c, with a row of basis functions Φ and a coefficient column c. For any invertible matrix M, let Φ̃(x) = Φ(x)M and c̃ = M⁻¹c. Then Φ̃(x)c̃ = Φ(x)c. If the original basis vanishes at the endpoints, the mixed basis does too.

This is an algebraic illustration, not a reported perturbation experiment or a claim that the mixed functions are individual units from the original activation family. It shows why a decomposition needs a stated interpretation: equivalent coordinates preserve the represented function while potentially changing component-level stories.

A faithful description may legitimately depend on the chosen coordinates, provided it says so. A stronger claim that a component identifies a physical mechanism needs to explain why that mechanism survives—or how the interpretation transforms. Transparency makes this question testable; it does not answer it automatically.

The resulting conclusion is narrow but useful: the output cannot uniquely identify a component-level physical explanation. The boundary guarantee is stronger in this respect. Both bases span the same zero-boundary correction space, so both preserve the same endpoint relation. Explanation gains stability when it identifies the property responsible for the behavior, instead of relying only on the names and coefficients of its parts.

Make the mechanism claim useful

The proposed next stage starts from a trusted numerical solution and asks a neural correction to improve it under an explicit error budget:

ucandidate = uanchor + vneural
vneural(a) = vneural(b) = 0

The existing basis provides the zero-boundary correction space. Rank and condition diagnostics can reject an unusable coefficient problem. The residual-to-error result explains what a valid global certificate would buy. Choosing the anchor, constructing the continuous enclosure, and combining these pieces into an acceptance-and-fallback procedure remain research tasks.

Passing the tolerance and improving on the anchor are separate outcomes. The comparison must establish whether an accepted correction improves accuracy or reduces the cost of reaching that accuracy, after including certification. It should also report cases where a correction is rejected. Clustered nodes and localized sources are useful challenges because a smooth, forgiving example can conceal weaknesses. Under the proposed procedure, a correction that cannot justify its error budget gives way to the anchor.

Numerical acceptance is one task on which an explanation could matter. Others include localizing a failure or choosing which correction to try. A proposed mechanism should be compared with suitable non-neural representations and simpler diagnostics under a stated task and criterion. Those comparisons are research questions here; the available construction and certificate routines do not establish their outcome.

The link to generated executable worlds is direct. The solver provides a positive case: a represented relationship holds across allowed coefficient changes because the construction enforces it. The animations provide counterexamples: locally plausible components do not ensure that their shared relations hold. Together, the cases shift attention from how many components are visible to what their organization actually guarantees—and whether that guarantee helps predict or improve behavior.