potentialpaper

TreeWalker: Partial Evaluation for Grouped Tree-Ensemble Inference

Durmus U Karatay, Richard Newman

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Many prediction tasks evaluate a trained tree ensemble on groups of rows that share feature values: discrete-time survival models expand each patient into GG time steps, click-through-rate models score every item in a search session, and scenario analyses vary a few inputs while holding the rest fixed. Standard inference treats each row independently and ignores this input-side correlation.

We present TreeWalker, which instantiates partial evaluation for grouped tree-ensemble inference: constant features are static, varying features dynamic. TreeWalker walks each tree once per group, partitions a row bitmask at varying splits, and skips empty subtrees via an unsplit shortcut. It reads standard LightGBM and XGBoost models; training is unchanged.

We prove a structural work decomposition: per-tree work splits into the constant-projected subtree size ∣Tc∣|T_c|, GG leaf writes, and a predicate-mask provisioning cost QQ. For the trace evaluator, per-row work approaches (dv+1)/(d+1)(d_v+1)/(d+1) as G→∞G \to \infty, giving asymptotic speedup 1/(1−ρˉG)1/(1-\bar\rho_G).

On Intel, TreeWalker is ∼3×{\sim}3\times faster than a row-independent traversal at the reference model size (T=500T{=}500, L=8L{=}8; G=16G{=}16 for SUPPORT/FLCHAIN and empirical groups for Expedia) and 7.77.7--9.1×9.1\times faster at G=128G{=}128 on the survival datasets; on Arm, 2.52.5--2.9×2.9\times and 5.55.5--6.0×6.0\times. On a scenario-analysis benchmark it is faster in all 1616 configurations on both machines. For f64 models, outputs match treelite GTIL up to tree-ordering roundoff; for f32 models, TreeWalker's f64 leaf accumulation is closer than native f32 to an exactly rounded reference on every audited row.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
1 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:47 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper proposes TreeWalker, an exact inference algorithm for tree ensembles applied to groups of rows that share many feature values. the method traverses each tree once per group and partitions the active rows only at varying-feature splits.

The main strengths are the simplicity and clarity of the core idea. Reviewers liked the careful separation of algorithmic gains from implementation effects, and the thorough numerical-precision analysis. empirical results are convincing.

Weakness is limited scope. TreeWalker is most applicable when grouped inputs arise naturally and grouping can be obtained cheaply. The cost of constructing groups for unstructured batches is not evaluated. The experiments are also limited to CPU execution, three datasets, and small groups. Broader workloads and an analysis of larger or chunked groups would strengthen the paper. Some presentation, notation, and related-work issues should also be addressed.

Area Chair DLZP · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

This paper proposes TreeWalker, an exact inference algorithm for tree ensembles applied to groups of rows that share many feature values. the method traverses each tree once per group and partitions the active rows only at varying-feature splits.

The main strengths are the simplicity and clarity of the core idea. Reviewers liked the careful separation of algorithmic gains from implementation effects, and the thorough numerical-precision analysis. empirical results are convincing.

Weakness is limited scope. TreeWalker is most applicable when grouped inputs arise naturally and grouping can be obtained cheaply. The cost of constructing groups for unstructured batches is not evaluated. The experiments are also limited to CPU execution, three datasets, and small groups. Broader workloads and an analysis of larger or chunked groups would strengthen the paper. Some presentation, notation, and related-work issues should also be addressed.

Reviewer EfGvOpenReview ↗
Rating
4/6
Confidence
2/5
Quality
2/4
Clarity
3/4
Significance
2/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The authors propose an algorithm that speeds up the fitting of gradient boosted tree-based models for datasets with groups (ie time series and multilevel data). The algorithm does not rely on approximations and yields the same outputs as LightGBM and XGBoost while showing computation time improvements.

Strengths and weaknesses

Strengths:

  • The computation time reduction results on the chosen datasets are appealing

Weaknesses:

  • The proofs are poorly written
  • The framing is a bit weird and there is a lack of related work to multilevel, nested data and time series to position the applications better
  • The paper is not very well written, with many repetitions and verbose language which makes the reading unnatural.
  • undefined notation hth_t l. 64, and I believe it is O(TL)O(TL) instead of O(Td)O(Td) in that paragraph
  • I find the applications (grouped datasets with many observations per groups, and many constant features) maybe a bit narrow or specific
Questions
  • Could this work with random forests too?
  • Why is the speed up reduced as LL increases
  • Are there situations where treewalker is slower than lightgbm
Limitations

yes

Final justification

/

Formatting concerns

/

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the detailed comments and concrete questions; the notation catches in particular improve the paper.

Setting. We would first like to clarify the setting, since the summary describes a speedup to model fitting: TreeWalker accelerates inference for already-trained ensembles. Training is unchanged; we consume standard LightGBM/XGBoost models via treelite, and outputs match the trained model exactly for f64 models and to documented roundoff for f32. We will sharpen the abstract's opening so this is unambiguous.

Proofs (W1). We will add a short roadmap to the analysis (work-decomposition theorem, then the trace corollary, then the provisioning corollary) and sharpen one statement in revision: the 1/L1/L precompute limit is a structural leaf-write floor, and the corollary text will state that the provisioning share is small at measured GG (within 12% at G=128G = 128) rather than vanishing asymptotically. If specific steps are unclear we would welcome pointers and will address them directly.

Framing and related work (W2). We will add a related-work paragraph positioning grouped inference relative to multilevel/nested-data and time-series modeling. Those literatures concern model specification for grouped data; TreeWalker is orthogonal: it accelerates exact inference for any tree ensemble evaluated on grouped rows, whatever model produced them. Multilevel and panel settings are sources of grouped workloads rather than competing methods, and we agree the paper should say so.

Prose (W3). We will do a consolidation pass; the algorithmic-versus-layout framing and the group definitions are currently restated across sections.

Notation (W4). Both points will be fixed. We will define hth_t at first use ("where hth_t is the tt-th tree"), and reword the complexity claim as worst-case O(TL)O(TL), with average cost tracking T⋅dT \cdot d for average root-to-leaf depth d≤Ld \le L. (dd is defined in the Notation paragraph; we agree the big-O phrasing obscured the average-case intent.)

Applicability (W5). We ran a scenario-analysis benchmark (UCI Default of Credit Card Clients, 30,000 rows, 23 features; LightGBM T=500T = 500, L=8L = 8; k∈{1,2,4,8}k \in \{1, 2, 4, 8\} perturbed features, G∈{4,16,64,128}G \in \{4, 16, 64, 128\}): TreeWalker is never slower than the same-layout full walk in any of the 32 cells on either architecture, speedup reaches 21.7×21.7\times (k=1k = 1, G=64G = 64, Arm) and holds 1.85×1.85\times on Arm and 1.07×1.07\times on Intel at the unfavorable corner (k=8k = 8, G=4G = 4), and the measured work ratio tracks the (dv+1)/(d+1)(d_v + 1)/(d + 1) prediction (0.195 to 0.611 vs predicted 0.188 to 0.601 for k=1k = 1 to 88 at G=128G = 128, with dvd_v measured on realized groups). Discrete-time survival expansion is the special case where the varied feature is time, so the new benchmark covers the general pattern. The regime is common where such models are deployed: every production discrete-time survival model pays the GG-fold expansion on every prediction. We will report this benchmark in Section 5 and the appendix.

Q1, random forests. The algorithm applies: traversal and mask partitioning are independent of the training procedure, and a random forest differs only in output aggregation (average instead of sum, no link function). Our implementation currently targets binary-logistic GBDTs and rejects other postprocessors; extending aggregation to RF is mechanical.

Q2, why speedup falls with depth. At fixed GG the constant-projected subtree grows faster than path depth. Going L=4L = 4 to 88 (T=500T = 500, G=16G = 16), more of each tree survives constant projection, so the shared fraction of work falls and algorithmic speedup declines:

dataset control visits per group per tree distinct leaves per group per tree speedup
SUPPORT 4.10→12.834.10 \to 12.83 1.57→2.321.57 \to 2.32 3.01×→2.88×3.01\times \to 2.88\times
FLCHAIN 3.90→11.133.90 \to 11.13 1.54→2.331.54 \to 2.33 3.43×→2.93×3.43\times \to 2.93\times
Expedia 6.32→19.426.32 \to 19.42 2.99→4.642.99 \to 4.64 2.92×→2.49×2.92\times \to 2.49\times

Q3, slower than LightGBM? Against LightGBM's native predictor we did not measure such a case: TreeWalker is faster in all 272 grid cells per architecture (minimum 2.03×2.03\times on Intel, 2.21×2.21\times on Arm). The boundary cases are elsewhere, and we will add them to the limitations. Against our own same-layout full walk, TreeWalker is slower in 64 of 544 cells, all at G∈{1,2}G \in \{1, 2\} where there is no sharing to exploit (worst 1.50×1.50\times, FLCHAIN, T=2000T = 2000, L=2L = 2, G=1G = 1). XGBoost's native predictor is faster in 38 of 272 Intel cells, concentrated at large deep models (worst 6.3×6.3\times, Expedia, T=2000T = 2000, L=16L = 16); the same-layout comparison attributes this gap to engine implementation rather than the algorithm, since TreeWalker beats its own full walk at those cells.

Reviewer EfGv · CommentOpenReview ↗

Thank you for your answer. On Q1: Since you mention your method works on random forests, I'd be curious to see the time-reduction on this. Of course I am not expecting this from you now but it might be a good direction for your paper. I raise my score to 4

Authors · CommentOpenReview ↗

We thank the reviewer for the response and for raising the score. We agree that measured random-forest timings are a natural next step: the work decomposition depends on the same quantities (∣Tc∣|T_c|, dvd_v versus dd), and RF trees are typically deeper than boosted trees, so the mechanism carries over while the constants may differ. We will name this direction explicitly in the future-work discussion, and the revision will state the current implementation boundary (binary-logistic GBDTs) in the limitations.

Reviewer tn9uOpenReview ↗
Rating
4/6
Confidence
1/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper propose TreeWalker, a tree-ensemble inference algorithm for the setting where prediction queries arrive in groups of rows that share most feature values (e.g., a patient expanded into G discrete time steps for survival analysis, or a search session with G candidate items). The idea is to instantiate online partial evaluation over grouped inputs: features constant within a group are treated as static, features that vary become dynamic. The algorithm walks each tree once per group instead of once per row, maintaining a bitmask of "still-active" rows that is partitioned at varying-feature splits and pruned via an "unsplit shortcut" when one side becomes empty. With that, The authors contributes to (i) the algorithm, (ii) a structural work-decomposition theorem with two corollaries giving an asymptotic per-row work ratio of (d_v + 1)/(d + 1) and a forest-level provisioning bound, and (iii) an empirical study on SUPPORT, FLCHAIN, and Expedia. Reported evaluation shows speedups are ~3× at the reference config and 6.8–7.8× at G=128 on the survival datasets.

Strengths and weaknesses

Strengths: The writing quality is good ans straightforward.

The evaluation shows some significance, with ~3x algorithmic speedup at the reference configuration.

Careful numerical precision audit. Bit-exactness against treelite GTIL for f64, and the f32 comparison against a Kahan-compensated reference, are unusually thorough. I appreciate for the correctly framing of the f32 result as a roundoff property rather than a model-quality claim.

Weaknesses:

Empirical coverage is somewhat narrow relative to the generality of the framing: the two survival datasets are structurally similar (both discrete-time expansions with covariate-time interactions as the varying features), and the scenario-analysis use case named in the introduction is not benchmarked. Broader coverage would help readers gauge how well the reported speedups generalize.

The G ≤ 128 limit is a real practical constraint that comes from the u128 bitmask choice. The authors acknowledge this but I would have liked to see a discussion of how a chunked or hierarchical bitmask would interact with the analysis — does the work decomposition still hold cleanly when groups are split into 128-row chunks?

Questions

See weaknesses

Limitations

yes

Formatting concerns

N/A

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the precise summary and for engaging with the numerical-precision audit; the reading of the f32 result as a roundoff property is exactly the framing we intended.

Scenario analysis and empirical coverage (W1). The reviewer is right on both counts: the introduction names scenario analysis without benchmarking it, and SUPPORT and FLCHAIN share the discrete-time expansion structure. We have run the missing benchmark. Scenario analysis is the general form of our survival workloads: discrete-time expansion is the special case where the varied feature is the time index (plus its interactions), while general scenario analysis varies an arbitrary small feature subset. On the UCI Default of Credit Card Clients dataset (30,000 rows, 23 features; LightGBM T=500T = 500, L=8L = 8) we sweep the number of perturbed features k∈{1,2,4,8}k \in \{1, 2, 4, 8\} and the group width G∈{4,16,64,128}G \in \{4, 16, 64, 128\}: TreeWalker is never slower than the same-layout full walk in any of the 32 cells on either machine (GCE Axion Arm and Xeon 8581C, SMT off, core-pinned), with speedup of 3.8 to 21.7×21.7\times at k=1k = 1 and 1.85 to 11.0×11.0\times at k=8k = 8 on Arm, 2.0 to 11.9×11.9\times and 1.07 to 6.1×6.1\times on Intel; at SUPPORT's varying-dimension count this sweep matches our Section 5 SUPPORT speedups within about 5% on the same machines. The measured work ratio tracks the (dv+1)/(d+1)(d_v + 1)/(d + 1) prediction as kk grows, including at the unfavorable end (k=8k = 8, G=4G = 4: 1.85×1.85\times on Arm, 1.07×1.07\times on Intel, still never slower). At G=128G = 128, with counters identical on both architectures:

kk measured work ratio predicted (dv+1)/(d+1)(d_v + 1)/(d + 1) speedup (Arm) speedup (Intel)
1 0.195 0.188 17.2×17.2\times 8.4×8.4\times
2 0.276 0.268 15.7×15.7\times 7.8×7.8\times
4 0.395 0.386 13.6×13.6\times 7.1×7.1\times
8 0.611 0.601 11.0×11.0\times 6.1×6.1\times

Since perturbations are multiplicative, a selected zero-valued feature stays constant across variants; kk counts selected features, mean realized varying dimensionality at k=8k = 8 is 6.8 of 8, and dvd_v is measured on the realized groups. We will add this workload to Section 5 and report the full sweep in the appendix.

Chunked groups (W2). The decomposition composes over chunks. Split XX into K=⌈G/128⌉K = \lceil G/128 \rceil chunks X1,…,XKX_1, \ldots, X_K; applying the theorem per chunk bounds total work by ∑j∣Tc(τ,Xj)∣+G+∑jQ(τ,Xj)\sum_j |T_c(\tau, X_j)| + G + \sum_j Q(\tau, X_j). The constant-projected subtree is identical across chunks (it depends only on the constant features), so the structural term is paid KK times instead of once and the per-row ratio plateaus at the chunk width G=128G = 128 rather than continuing to fall; leaf writes remain GG in total. One caveat we will state explicitly: the cost model charges one unit per GG-bit mask operation, which holds for fixed 32/64/128-bit words. An arbitrary-width or hierarchical mask would make each operation Θ(K)\Theta(K), which is why we chunk rather than widen the mask. Measured, with 128-row chunks at G∈{256,512,1024}G \in \{256, 512, 1024\} under fixed total work (same row count and same chunk multiset in every cell), no chunked cell was slower than the G=128G = 128 plateau in either run:

logical GG Arm μ\mus/row (Δ\Delta vs 128) Intel μ\mus/row (Δ\Delta vs 128)
128 0.987 0.977
256 0.980 (-0.7%) 0.962 (-1.5%)
512 0.960 (-2.8%) 0.942 (-3.5%)
1024 0.932 (-5.6%) 0.917 (-6.1%)

That sweep checks that realized chunked serving stays at the plateau; the KK-fold structural repayment is quantified by the per-chunk decomposition above, not by the sweep. Since the ratio saturates well before G=128G = 128 on our datasets (Table 2), chunking forfeits little. We will add the per-chunk analysis and the measured sweep to the appendix.

Reviewer tn9u · CommentOpenReview ↗

Thanks for the rebuttal! Those points sound good to me.

Authors · CommentOpenReview ↗

We thank the reviewer for confirming and for the engagement throughout; the scenario-analysis benchmark and the chunked-group treatment will be in the revision as described.

Reviewer z8yJOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes TreeWalker, an inference method for tree ensembles when predictions are made over groups of rows that share many feature values. The key idea is to treat shared features as static inputs and row-varying features as dynamic inputs. Instead of traversing every tree independently for every row, TreeWalker walks each tree once per group, follows constant-feature splits once, and only partitions the active row set when the tree encounters a varying-feature split. The method is evaluated on survival and ranking-style grouped prediction tasks and shows substantial speedups.

Strengths and weaknesses

Strength:

  • The paper identifies a real inefficiency in standard tree-ensemble inference. Many practical workloads create structured groups of similar rows, but they usually treat all rows independently.
  • The core algorithm is simple and intuitive. It is essentially partial evaluation applied to tree inference.
  • The evaluation is fair by comparing it against LightGBM, XGBoost, tl2cgen, lleaves, and QuickScorer. The authors separate algorithmic speedup from implementation/layout speedup using a same-layout full-walk baseline.

Weaknesses:

  • The applicability is narrower than the headline speedups may suggest. The method works best when groups are already naturally available, such as survival time expansion or session-level ranking. For arbitrary tabular batches, one would first need to group rows by shared constant features, which may require hashing/sorting and could erase the benefit. Also, the paper does not fully account for grouping cost. In the evaluated workloads, the grouping structure appears to be given by the task. That is reasonable, but the paper should be clearer that TreeWalker is not a drop-in improvement for unstructured inference batches unless grouping can be obtained cheaply.
  • The evaluation is limited to CPU, a maximum group width of 128, and three datasets. More workloads, e.g., GPU inference, larger groups, would make the practical case stronger.
Questions
  • How expensive is it to form groups when the input data is not already grouped by the application? Any discussion here?
  • Can TreeWalker handle partially overlapping constants, where different subsets of rows share different features?
  • How would the method scale beyond 128 rows per group?
Limitations

see my comments in weakness and questions

Formatting concerns

The format should be further improved, e.g., Figure 3 is too large and take too much space, Figure 1 can be more compact.

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the careful reading, and for recognizing the same-layout full-walk baseline as the control that separates algorithmic gains from implementation effects.

Scope and grouping cost (W1, Q1). We agree the paper should state the operational contract explicitly, and we will add it to the introduction: "TreeWalker targets workloads whose request semantics supply grouped rows; it does not construct groups from unstructured batches, and it offers no advantage when rows share no feature values." In the target workloads the group is created by the task itself: discrete-time expansion materializes G rows from one entity, ranking sessions arrive grouped, and scenario analysis generates the variants. Grouping cost is therefore zero by construction in the motivating regime. For batches without group structure, width-1 groups share nothing and we claim no speedup; TreeWalker is not a drop-in replacement for unstructured batch inference, and we will say so.

Partially overlapping constants (Q2). Constancy is defined per group. A feature constant on only a subset of rows is treated as varying: its splits partition the row mask, correctness is unaffected, and the unsplit shortcut still prunes one-sided outcomes. What is lost is the sharing within that subset. Exploiting subset-level structure would require hierarchical subgrouping, which we consider future work.

Beyond G=128G = 128 (Q3, W2). The 128-bit word bounds a single mask, not the method. A group of width G>128G > 128 splits into K=⌈G/128⌉K = \lceil G/128 \rceil chunks and the work decomposition applies per chunk: the constant-projected walk ∣Tc∣|T_c| is paid KK times instead of once, leaf writes remain GG in total, and the per-row work ratio plateaus at the chunk width rather than continuing to fall. Because the ratio saturates well before G=128G = 128 on our datasets (Table 2), the amortization forfeited by chunking is small. A fixed-work chunked sweep at G∈{256,512,1024}G \in \{256, 512, 1024\} (same total rows and the same multiset of 128-row chunks in every cell) confirms realized chunked serving stays at the plateau, with no chunked cell slower in either run:

logical GG Arm μ\mus/row (Δ\Delta vs 128) Intel μ\mus/row (Δ\Delta vs 128)
128 0.987 0.977
256 0.980 (-0.7%) 0.962 (-1.5%)
512 0.960 (-2.8%) 0.942 (-3.5%)
1024 0.932 (-5.6%) 0.917 (-6.1%)

The sweep holds engine work fixed by construction, so it checks the plateau; the KK-fold repayment of ∣Tc∣|T_c| above is quantified by the decomposition, not by this sweep. We deliberately avoid arbitrary-width masks: a KK-word mask makes each mask operation Θ(K)\Theta(K), which the unit-cost model would then have to charge.

Breadth (W2). We ran a scenario-analysis benchmark on the UCI Default of Credit Card Clients dataset (30,000 rows, 23 features; LightGBM T=500T = 500, L=8L = 8), sweeping the number of perturbed features k∈{1,2,4,8}k \in \{1, 2, 4, 8\} and G∈{4,16,64,128}G \in \{4, 16, 64, 128\}: algorithmic speedup over the same-layout full walk ranges from 1.85×1.85\times (k=8k = 8, G=4G = 4) to 21.7×21.7\times (k=1k = 1, G=64G = 64) on Arm and from 1.07×1.07\times to 11.9×11.9\times on Intel, never below 1×1\times in any of the 32 cells, and the measured work ratio tracks the (dv+1)/(d+1)(d_v + 1)/(d + 1) prediction (0.195 to 0.611 measured vs 0.188 to 0.601 predicted for k=1k = 1 to 88 at G=128G = 128; dvd_v is measured on realized groups, since multiplicative shocks leave zero-valued features constant). We will report this benchmark in Section 5 and the appendix. GPU execution is outside this paper's scope: our target regime is latency-critical CPU serving, the regime all five baselines target as well.

Formatting. We will shrink Figure 3 and compact Figure 1 as suggested.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…