Jump Like A Squirrel: Optimized Execution Step Order for Anytime Random Forest Inference

This paper proposes optimizing anytime random forest inference on resource-constrained systems by reordering execution at the granularity of individual tree steps, introducing heuristics like the Backward Squirrel Order that achieve near-optimal accuracy with polynomial runtime.

Daniel Biebert, Christian Hakert, Kay Heider, Daniel Kuhse, Sebastian Buschjäger, Jian-Jia Chen

Published 2026-03-03
📖 5 min read🧠 Deep dive

Imagine you are trying to guess the flavor of a mystery smoothie. You have a team of 100 expert tasters (a Random Forest). Usually, to get the final answer, you force every single taster to take a sip, chew, swallow, and write down their full opinion before you combine their votes.

But what if you only have 5 seconds before the smoothie melts? Or what if the power goes out mid-sip?

In the old way, if you stopped halfway, you'd have zero information because no one finished their "sip." You'd have to guess blindly.

This paper introduces a new way to run these teams of tasters, called "Jump Like A Squirrel." Here is the simple breakdown:

1. The Problem: The "All or Nothing" Trap

Traditionally, decision trees (the logic behind these tasters) work like a game of "20 Questions." You ask a question, get an answer, and move to the next question. You only know the final answer when you reach the very last question (the "leaf" of the tree).

If you are in a rush (like on a battery-powered device or a self-driving car), you might not have time to ask all 20 questions. The old method says, "If you stop at question 10, throw away the whole thing and guess randomly." That's a waste of the 10 questions you did ask!

2. The Solution: The "Squirrel" Strategy

The authors realized that even after just a few questions, you already have a pretty good idea of the answer.

  • The Old Way: Finish one whole tree (ask all 20 questions), then move to the next taster.
  • The New Way: Ask question #1 of Taster A, then question #1 of Taster B, then question #2 of Taster A. You can jump between tasters at any moment.

If the power cuts out after 15 jumps, you take the current "best guess" from all the partial answers you have so far. You never lose the progress you made.

3. The Big Challenge: Which Jump Comes Next?

Now that you can jump between trees, you have a massive choice: Which tree should you jump to next?

  • Do you jump to the tree that is easiest to solve?
  • Do you jump to the tree that is most likely to be right?
  • Do you jump to the tree that gives you the most new information right now?

If you jump randomly, you might waste time on a tree that doesn't help much. If you jump smartly, you get the most accurate answer possible in the shortest time.

4. The Three "Jump Plans"

The paper proposes three ways to decide the order of jumps:

  • The "Perfect Planner" (Optimal Order): This is like a super-computer that simulates every single possible path you could take to see which one gives the best average result.

    • Pros: It's perfect.
    • Cons: It takes forever to calculate the plan. If you have a big forest, it would take longer to plan the jumps than to actually drink the smoothie.
  • The "Forward Squirrel" (Forward Squirrel Order): This is a greedy approach. It looks at the current moment and asks, "Which single jump right now gives me the biggest boost in accuracy?" It jumps there, then asks the same question again.

    • Analogy: It's like a squirrel running forward, always picking the nut that looks biggest right now.
  • The "Backward Squirrel" (Backward Squirrel Order): This is the paper's star player. Instead of starting at the beginning and guessing forward, it starts at the end (where all trees are finished) and works backward. It asks, "If I had to stop one step early, which step should I have skipped to keep the accuracy highest?"

    • Analogy: Imagine a squirrel looking at the whole pile of nuts and working backward to figure out the most efficient path to gather them.
    • Result: This method is incredibly fast to calculate and performs almost as well as the "Perfect Planner" (94% as good) but beats all other random or intuitive methods by a huge margin (99% better).

5. Why This Matters

This isn't just about smoothies. This is about resource-constrained systems:

  • Self-driving cars: They need to make decisions in milliseconds. If the computer is busy, it can stop the calculation early and still have a safe, high-confidence answer.
  • Medical devices: A heart monitor might need to classify a heartbeat instantly. If the battery is low, it can stop early and still give a reliable diagnosis.
  • Smartphones: Apps can run complex AI without draining your battery, because they can stop the "thinking" process the moment they are confident enough.

The Bottom Line

The paper teaches us how to turn a rigid, "finish the whole job or nothing" AI into a flexible, "give me the best answer you can in the time I have" AI. By using the Backward Squirrel method, we can organize the thinking process so that every single second of computing time counts, ensuring we get the most accurate result possible, even if we are interrupted.

Get papers like this in your inbox

Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.

Try Digest →