ReadingResearchRadarInvestment framework
Sign in / Sign up
← Back to reading
TopicDisconfirmAI EditorialUpdated 2026-12-03 17:31

TreeWalker

3 steps1 pieces3 Sources

TreeWalker is an open-source Rust inference engine developed by Shopify engineers Durmus Karatay and Richard Newman to accelerate grouped tree-ensemble scoring. The tool applies partial evaluation techniques to machine learning workloads where multiple rows share constant feature values, such as delivery date predictions or survival analysis models. By resolving shared-feature decisions once per group using bit-vector masks rather than repeating them for every row, TreeWalker significantly reduces redundant computation.

In internal tests at Shopify, the engine achieved a 3.96× speedup in evaluating their main delivery prediction model compared to their previous evaluator, with identical training data and results. On public datasets like SUPPORT and FLCHAIN, when grouping 128 rows, the speedup reached up to 9.1× on Intel architectures. The system reads standard LightGBM and XGBoost models without requiring changes to the training process.

The core innovation lies in exploiting input-side correlation across rows within a group. While existing fast inference systems optimize per-visit cost (via compilation or vectorization) or per-walk cost (via early termination), they typically treat each row independently. TreeWalker walks each tree once per group, maintaining a row bitmask that partitions at varying splits and skips empty subtrees. This approach is particularly effective when a high percentage of features are constant within a group; in Shopify's factorial-grid benchmarks, this fraction ranged from 48% to 70%.

However, the authors note operational constraints: TreeWalker targets workloads whose request semantics naturally supply grouped rows, such as discrete-time expansion or session-level ranking. It does not construct groups from unstructured batches and offers no advantage when rows share no feature values. Setup costs can also outweigh savings in small or highly varied groups. The code and benchmark harness are available on GitHub under the MIT license.

How it got here

  1. 2026-12-02

    Shopify engineers published a blog post detailing TreeWalker, an open-source Rust engine for tree-ensemble inference that uses partial evaluation to speed up grouped scoring.

Sign in / Sign up
ReadingResearchRadarInvestment framework
shopify.engineering ↗
  • 2026-10-01

    The arXiv preprint 'TreeWalker: Partial Evaluation for Grouped Tree-Ensemble Inference' was released, providing theoretical proofs and empirical validation against baselines like LightGBM and XGBoost.

    arxiv.org ↗
  • 2026-10-01

    The official GitHub repository for TreeWalker was made public, containing the library source, benchmark harness, and experiment scripts.

    github.com ↗
  • What is still unsettled

    • How does TreeWalker's performance scale on different hardware architectures beyond the tested Intel and Arm platforms?
    • What are the specific latency budgets in production environments where the setup overhead might negate the benefits for smaller group sizes?

    Sources

    • shopify.engineeringShopify Engineering Blog↗
    • arxiv.orgarXiv Preprint v2↗
    • github.comGitHub Repository↗

    Coverage in this topic

    • TreeWalker: How Partial Evaluation Speeds Up Grouped Tree-Ensemble Inference2026-12-03News

      Shopify engineers describe TreeWalker, an open-source Rust engine that applies partial evaluation to tree-ensemble scoring: it resolves shared-feature decisions once per group of related rows using bit-vector masks, achieving 3.96× faster delivery-model evaluation in internal tests and up to 9.1× on public survival datasets at 128-row groups, while acknowledging that setup costs can outweigh savings in small or highly varied groups.