TreeBranchMarks

Experiment: woodelf_vs_shapiq_path_dependent_experiment
About this Experiment

This report compares Woodelf against shapiq's TreeExplainer on path-dependent Shapley values and Shapley interaction values. It is the sibling of the interventional report; same datasets, same three interaction orders, same question — where is the turn-over point?

There is no m here. Path-dependent explainers read coverage off the tree itself and take no background set, so n is the only data-size axis.

What is being compared

TaskWoodelfshapiq
Path-dependent SHAP (order 1) ShapleyValues() mode="pathdependent", max_order=1, index="SV"
Path-dependent interactions (order 2) ShapleyInteractionValues() mode="pathdependent", max_order=2, index="SII"
Path-dependent interactions (order 3) GeneralShapleyInteractionValues(min_order=1, max_order=3) mode="pathdependent", max_order=3, index="SII"

Both sides compute the same quantity, verified before the benchmark was run (XGBoost, California Housing, D=4, T=20, n=3): order 1 agrees to 2.1e-07, order 2 to 2.5e-08 after undoing Woodelf's shap-package convention of reporting each pair twice at half value, and order 3 to 1.4e-08.

Both timings include the model parse — shapiq's TreeExplainer construction and Woodelf's load_decision_tree_ensemble_model. That matters more here than in the interventional report, for the reason below.

The two libraries have opposite cost shapes

Woodelf is dominated by a fixed cost — parse the model, build its tree structures — and is then nearly flat in n. shapiq builds cheaply (usually) and pays per row. The crossing is therefore just the point where shapiq's per-row charge has eaten Woodelf's fixed cost: a single threshold in n, rather than the n × m curve the interventional report traces.

Measured at D=6, T=100:

DatasetOrderWoodelf (flat) shapiq buildshapiq per rowCrossing n
California Housing11.35 s0.08 s0.0103 s≈ 120
California Housing21.42 s0.41 s1.56 s< 1
California Housing31.66 s0.75 s2.33 s< 1
Breast Cancer10.19 s0.05 s0.0100 s≈ 14
Breast Cancer20.19 s0.14 s0.12 s< 1
Breast Cancer30.21 s0.21 s0.19 s< 1
Fraud Detection11.50 s0.11 s0.033 s≈ 42
Fraud Detection21.80 s6.0 s2.0 s< 1
Fraud Detection32.20 s105 s33 s< 1

Only order 1 has a crossing inside the measurable range. At orders 2 and 3 Woodelf already leads at n = 1 on every dataset — and on Fraud it leads before a single row is explained, because shapiq's TreeSHAP-IQ construction over 397 features costs 6 s at order 2 and 105 s at order 3, both more than Woodelf's entire run.

Sweeps

How long runs are handled

shapiq explains one row at a time in both modes — explain_X is a plain Python loop. Path-dependent orders 2 and 3 cost over a second per row even on an 8-feature model, so the far end of an n-sweep would run for hours. Instead shapiq explains rows until a 45 s wall-clock budget is spent and the result is extrapolated linearly in n:

total = build_time + (loop_time / rows_done) × n

Such cells are marked estimated and are still scored — an extrapolated time is real performance data. Per-row cost is stable across rows, and rows are drawn from an already-randomised permutation, so the explained prefix is an unbiased sample. Note that the budget bounds the per-row loop but not the explainer build: on Fraud order 3 that build is 105 s of unavoidable fixed cost per cell, which is precisely why those sweeps are kept short.

Woodelf is left uncapped. Its slowest cell in calibration was 7.5 s (Fraud, n = 10,000, order 3).

Reading the report

Per group (dataset, mission, task, n, D, ensemble) the faster method scores 100 and the slower scores (winner / loser) × 100. Each n-sweep crosses at most once: read off the smallest n at which Woodelf takes the lead.

One caveat on the trimmed design: the calibration above was used to choose which cells to run, so measured crossings will land near the middle of each order-1 sweep by construction. That is selection of where to look, not of what is found — every reported time is measured (or extrapolated in n) independently of the numbers that picked the cell. What the trimming forfeits is the far field: this report cannot say how large Woodelf's margin grows at n = 10,000 for orders 2 and 3, only that it is already decisive at n = 1.

How to Use This Report

This is an interactive benchmarking report comparing the runtime of different SHAP algorithms across a range of decision tree ensembles and dataset configurations. The sections below explain each part of the report.

Score. Each run compares all methods on the same task and parameters. The fastest method of each run scores 100; every other method scores (winner time / its time) × 100, so a method that took twice as long scores 50. Methods that crashed or are not supported for that task score 0. The overall score is the average across all runs.

Filtered score. The filter bar lets you narrow the score to a specific subset of runs by task type and parameter range. The key parameters are: n — the number of explained samples, m — the background dataset size (relevant for Background SHAP), and D — the maximum tree depth. The score updates instantly to reflect only the selected runs.

Experiment Analysis. The report contains many experiments. Each experiment changes one parameter while keeping the others fixed (for example, changing the tree depth D while keeping n and m fixed, or changing n while keeping D and m fixed). Use the Dataset and Mission dropdowns to choose an experiment. The plot will then show the runtime of each method in any value of the swept parameter. This makes it easy to compare methods and see how the parameter affects performance.

Open the Details: dataset, model & approaches panel below the controls to inspect the exact configuration of the selected experiment.

All Results. A full table of every individual run, including measured and extrapolated runtimes, the task type, and all parameter values. Times marked with * were extrapolated from runs with fewer trees and/or fewer samples.

Analytics. Summary statistics and method win-rate charts aggregated over all runs. Use the filters in this section to focus on a specific task type or a narrower parameter range.

Experiment Analysis

Details: dataset, model & approaches

Analytics

Missions

Methods

All Results