Recursive Residual Searching (RRS)
- Recursive Residual Searching (RRS) is a recursive algorithm framework that decomposes function outputs, residuals, or embeddings into structured, interpretable components across various applications.
- It iteratively selects and prunes candidate decompositions based on domain-specific criteria, ensuring unique assignments and efficient extraction of dominant contributions.
- The approach guarantees theoretical uniqueness and competitive empirical performance while highlighting challenges in tuning and potential for hybrid method integration.
Recursive Residual Searching (RRS) is a class of recursive, data-driven or data-free algorithms for iteratively decomposing function outputs, residuals, or embeddings into interpretable, structured components or paths. Prominent applications of RRS span semantic indexing for LLMs, jet expansions for residual computation in deep networks, and hybrid linear/nonlinear time-series forecasting. RRS is united by its recursive structure: at each stage, it evaluates multiple candidate expansions/decompositions, scores or prioritizes based on domain-specific criteria, and prunes or selects to efficiently identify dominant, unique, or interpretable contributions in complex models (Zhang et al., 19 Sep 2025, Chen et al., 2024, Yu et al., 2024).
1. Formal Definitions and Mathematical Foundations
In the context of semantic indexing, RRS operates on an embedding , which is recursively quantized at each of levels. At each level , a candidate set of nearest centroids in a codebook is identified, producing a residual vector via
where denotes the chosen centroid at level (Zhang et al., 19 Sep 2025). The overall goal is to construct an -token code (ID) for such that all assignments in a dataset are unique, avoiding ID conflicts without breaking semantic fidelity by adding non-semantic tokens.
In neural network interpretability, RRS is formalized via jet expansions, where the functional output of a residual network 0 is expanded as a sum over polynomial “jet paths.” This yields an explicit sum over all 1 computational paths in a depth-2 residual net, with each path corresponding to a sequence of skip/take decisions at each block (Chen et al., 2024). The expansion is:
3
where 4 is the unembedding, 5 denotes each jet path polynomial, and 6 captures the remainder.
In time-series forecasting, RRS underlies frameworks such as LiNo, alternating recursive extraction of linear (LiBlock) and nonlinear (NoBlock) components at each step:
7
As 8, 9, reflecting full decomposition of the original signal (Yu et al., 2024).
2. Core Algorithmic Procedures
The essential mechanism in RRS is a recursive, beam- or depth-first search through possible expansions at each level. The following table summarizes the RRS procedures in three domains:
| Application Domain | RRS Step | Key Decision Criterion |
|---|---|---|
| Semantic Indexing (Zhang et al., 19 Sep 2025) | Recursively select among 0 nearest centroids at each level, backtracking on conflict | Uniqueness among assigned codes |
| Jet Expansion in Residual Nets (Chen et al., 2024) | Recursively expand paths by “skip/take” at each residual block using jet operators | Path contribution (polynomial norm) |
| Time Series Decomposition (LiNo) (Yu et al., 2024) | Alternately apply linear and nonlinear extraction, recurse on residuals | Minimize residual energy (implicitly) |
In semantic indexing, for embedding set 1, RRS maintains a global set of assigned codes and recursively attempts to build a unique 2-level ID for each 3, always starting with the locally closest centroids and backtracking upon conflict. In jet expansion, RRS explores the exponentially many computational paths efficiently, scoring partial paths and prioritizing those with greatest effect on output. In time series, RRS is realized as a fixed-depth cascade, updating residuals at each step.
3. Theoretical Guarantees and Structural Properties
RRS algorithms guarantee uniqueness of assignments in indexing tasks, since a code is only accepted if not in the set of assigned IDs. Jet expansion RRS is exact for linear residual networks (remainder term vanishes for 4) and approximate for nonlinear networks with explicit, controllable error (Chen et al., 2024). In LiNo, by construction 5 as 6, ensuring that all information is captured in the extracted components (Yu et al., 2024).
A key property in jet-based RRS is (super-)exponential path growth: for depth 7 and truncation order 8, the number of unique monomials in the expansion is 9, which scales as 0 for fixed 1, and super-exponentially if 2 scales with 3.
4. Empirical Behavior and Benchmarks
RRS in semantic indexing delivers strong empirical improvements in both overall and cold-start scenarios. For instance, Recall@5 on Amazon-Sports (RQ-VAE indexer) improved from 0.0124 to 0.0133 (+7.3%), and cold-start Recall@5 on Amazon-Toys increased by 25% (Zhang et al., 19 Sep 2025). In some domains, RRS yields even higher accuracy than exhaustive, globally optimal approaches (ECM), particularly where the latent space is structured and code conflicts are sparse.
In jet expansion, RRS enables identification and ranking of the most influential “jet paths,” allowing efficient interpretability without exhaustive enumeration of all 4 paths. In recursive time-series decomposition, models leveraging RRS with more recursion depths outperform shallow decompositions, especially in data with multi-periodicities (Yu et al., 2024).
5. Computational Complexity and Practical Scalability
RRS exhibits favorable scaling in practice compared to exhaustive approaches:
- In semantic indexing, in the best case (low conflicts), RRS requires 5 distance computations versus 6 for ECM, where 7 is the number of embeddings and 8 is the candidate count per level (Zhang et al., 19 Sep 2025).
- In jet expansion, the number of active “centers” (paths) doubles at each depth, but pruning strategies or beam search restrict computational cost, as only the highest-contributing paths are expanded (Chen et al., 2024).
- In LiNo, recursion depth 9 is typically small (2–4), and each block (Li/No) is realized via fast convolutional or transformer layers (Yu et al., 2024).
Caching of intermediate Jacobians or Hessians (in jet expansions), candidate pruning, and limiting depth/candidate counts are all used in practice to limit memory and computation.
6. Limitations and Open Research Directions
While effective, RRS is fundamentally greedy. It does not guarantee global optimality with respect to the total residual norm in the presence of heavy code conflicts (semantic indexing) or complex nonlinear interactions (jet/path expansions). Tuning candidate widths 0 is required for balancing efficacy and efficiency, and runtime can increase substantially in high-conflict regimes (Zhang et al., 19 Sep 2025).
Open questions include:
- Adaptive tuning of 1 per level based on observed conflicts.
- Integration of lightweight global scoring into the DFS branch ordering of RRS.
- Extension to variable-length codes (hierarchical trees) or to structured model families.
- Formal approximation bounds versus exhaustive globally-optimal solutions.
A plausible implication is that as models and datasets become more heterogeneous, hybrid methods dynamically combining RRS and ECM or other heuristics may be necessary for optimal trade-offs.
7. Connections to Broader Methodologies
RRS subsumes and extends earlier approaches:
- In network interpretability, zeroth-order (2) jets recover logit-lens and early-exit methods, showing that jet expansion RRS forms a strict generalization (Chen et al., 2024).
- In time series, RRS overcomes limitations of one-shot “trend+season” decomposition by recursively alternating linear/nonlinear extraction, improving robustness to diverse data (Yu et al., 2024).
By operating directly on model functionals or representations without the need for auxiliary data, retraining, or sampling, RRS provides a unified, scalable paradigm for analysis and indexing in high-dimensional, multi-stage systems.