Stepwise Forward Reason (R())
- Stepwise Forward Reason (R()) is a family of residual-oriented algorithms that enable iterative feature selection and differentiable inference in regression and neuro-symbolic logic.
- It utilizes a greedy, iterative routine in regression, updating residuals using the Moore–Penrose inverse to minimize prediction error effectively.
- In neuro-symbolic reasoning, R() integrates differentiable clause composition and soft logical operations, facilitating end-to-end gradient-based optimization.
Stepwise Forward Reason () encompasses a family of residual-oriented algorithms and differentiable reasoning operators used for feature selection in statistical modeling and neuro-symbolic logic inference. In regression, formalizes the greedy addition of variables to minimize prediction error, while in differentiable reasoning, expresses one-step forward inference under weighted clause composition. The function is central in stepwise regression, Relevance Matching Pursuit (RMP), and Neuro-Symbolic Forward Reasoning (NSFR), and exhibits fundamental connections to best subset selection, the lasso, and differentiable logic programming.
1. Mathematical Definition and Selection Rule
In the classical regression context, represents the residual norm after inclusion of a candidate variable. With the feature matrix, the response, and active set indexing the selected features, the residual is
where is the Moore–Penrose inverse. For candidate , the residual-based scoring function is
and the variable selected is
with and (Ament et al., 2021). This selection fundamentally seeks maximal decrease in squared residual.
For neuro-symbolic reasoning, is defined as
where is batch size, is the number of ground atoms, clauses, substitutions, clause body-length, and the number of soft programs. orchestrates clause instantiation, body aggregation, weighted clause composition, and soft logical OR, producing a new batch of truth-valued facts (Shindo et al., 2021).
2. Algorithmic Sequence and Implementation
The regression version of stepwise is instantiated via a greedy, iterative routine:
1 2 3 4 5 6 7 8 9 10 |
A = [] r = y for t in range(k): scores = [] for j in complement(A): score = (a_j.T @ r)**2 / (a_j.T @ a_j) scores.append(score) jstar = argmax(scores) A.append(jstar) r = y - X_A @ (X_A^+ @ y) |
For NSFR, integrates perceptual neural networks, tensorized object constants, neural predicate valuation, and batched differentiable reasoning:
1 2 3 4 5 6 7 8 9 10 11 12 |
Z = f_percept(X; Phi) V = zeros([B, G]) for j in 1..G: T_list = [to_tensor(t_i; Z) for i in 1..n] V[:,j] = v_p(T_list; Theta) for t in 0..T-1: for i in 1..C: C_i = clause_function(V, I[i,:,:,:], gamma) H = sum_over_C(Wstar * C) V_new = softor(H, dim=0, gamma) V = softor_stack([V, V_new], dim=1, gamma) y_hat = f_predict(V) |
3. Connections Among Regression, Neuro-symbolic, and Bayesian Learning
Relevance Matching Pursuit (RMP) introduces a coordinate-ascent algorithm for Sparse Bayesian Learning. As the noise variance , RMP’s atom addition criterion
where , converges to the stepwise-forward regression rule (Ament et al., 2021). This ties Bayesian sparsification procedures to residual-based variable selection.
Similarly, NSFR operationalizes as a forward-chaining inference routine within neural logic programming. It constructs new probabilistic facts from antecedent valuations using weighted clause-program composition and iterative soft logical OR, forming a differentiable reasoning pipeline (Shindo et al., 2021).
4. Exact-recovery Guarantees and Statistical Properties
Stepwise does not guarantee globally optimal subset selection via forward moves alone. However, backward elimination coupled with a computable bound produces optimal recovery:
Theorem ((Ament et al., 2021), Theorem 4.2): Let have full column rank and be the true support. In with , if then backward elimination from exactly recovers the support .
This result depends exclusively on the smallest singular value of the design matrix, enabling polynomial-time computation of the bound. A plausible implication is that backward-augmented stepwise regression can be certifiably optimal under strong signal conditions.
5. Computational Complexity and Efficient Implementation
For regression, each forward step requires computations to score and update; the full -step selection runs in . Cholesky or QR factorization of accelerates scoring and residual updates to per step, completing steps in . Updating “energy-norm” quantities in RMP adds overhead, often negligible (Ament et al., 2021).
Empirical timings confirm efficiency: on , FS takes $0.006$ s; for , up to , $0.82$ s; for , $0.14$ s—contrasted with minute-level runtimes for best subset selection via mixed integer optimization (Hastie et al., 2017).
6. Comparative Performance and Practical Applications
Forward stepwise selection using matches best subset selection in medium/high SNR scenarios and outperforms the lasso in these regimes, but tends to overfit under low SNR where the lasso's shrinkage yields lower generalization error. The relaxed lasso, which refits least squares on lasso-selected supports, interpolates between the benefits of forward and shrinkage selection (Hastie et al., 2017). FS is algorithmically tractable and interpretable for large feature sets and is often preferred over computationally intensive combinatorial subset search.
In neuro-symbolic domains, propagates differentiable logical entailments and is foundational in high-fidelity, object-centric reasoning pipelines such as those validated on CLEVR-Hans and Kandinsky datasets (Shindo et al., 2021).
7. Loss Functions and Optimization in Differentiable Reasoning
Stepwise for logic inference enables end-to-end supervised learning:
where (Shindo et al., 2021). Gradients flow from the classification loss to perception, predicate parameters, and clause weights via the differentiable pipeline. Additional concept-specific losses and rule-weight learning objectives refine the logical and probabilistic inference.
In summary, Stepwise Forward Reason () encodes the incremental, residual-driven mechanics underlying greedy feature selection, Bayesian sparsification, and differentiable logic inference. It admits rigorous mathematical formulation, efficient algorithmic implementation, and provable recovery guarantees, and bridges the statistical, computational, and neuro-symbolic domains with interpretable operators and empirically validated efficacy (Ament et al., 2021, Shindo et al., 2021, Hastie et al., 2017).