← Latest papers
🤖 machine learning

Pocket Foundation Models: Distilling TFMs into CPU-Ready Gradient-Boosted Trees

This paper introduces a method to distill slow, GPU-dependent tabular foundation models into fast, CPU-native gradient-boosted trees using stratified out-of-fold labeling to prevent label leakage, achieving near-teacher accuracy with up to an 860x speedup for real-time applications like fraud detection.

Original authors: Aditya Tanna, Nassim Bouarour, Mohamed Bouadi, Vinay kumar Sankarapu, Pratinav Seth

Published 2026-05-19
📖 4 min read☕ Coffee break read

Original authors: Aditya Tanna, Nassim Bouarour, Mohamed Bouadi, Vinay kumar Sankarapu, Pratinav Seth

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Problem: The Genius Who Can't Run

Imagine you have a Genius Professor (the "Foundation Model") who is incredibly smart at solving puzzles. This professor can look at a massive library of past puzzles and instantly figure out the answer to a new one.

However, there's a catch:

  1. They are slow: To solve a puzzle, the Professor has to read through their entire library of notes every single time. This takes a long time (about 150 milliseconds to over a second).
  2. They are expensive: The Professor needs a super-computer (a powerful GPU) to work.
  3. The real world is impatient: In situations like stopping credit card fraud or triaging patients, you need an answer in under 2 milliseconds. The Professor is too slow and too heavy to be useful here.

The Solution: The "Pocket" Student

The authors wanted to create a Student who is as smart as the Professor but runs on a regular laptop (CPU) and answers in a blink of an eye.

They used a technique called Knowledge Distillation. Think of this as the Professor giving the Student a cheat sheet. Instead of just telling the Student the right answer (e.g., "Yes, this is fraud"), the Professor explains how they thought about it (e.g., "I'm 90% sure it's fraud, but there's a 10% chance it's a false alarm"). This nuance helps the Student learn better than just memorizing the answers.

The Trap: The "Mirror" Problem

Here is the tricky part the paper discovered.

If you ask the Professor to grade the exact same puzzles they just used to study, they get confused. Because the Professor has the answers right in front of them in their "context," they don't actually think; they just recall. They say, "I know this one! It's definitely Fraud!" with 100% certainty.

If the Student learns from this, they get a bad cheat sheet. The Professor isn't sharing any "wisdom" or "uncertainty"; they are just repeating the answer key. The Student learns nothing new and ends up dumber than if they had just studied the answer key directly.

The Fix: The "Blind" Test
To fix this, the authors used a method called Stratified Out-of-Fold (OOF) labeling.

  • Imagine splitting the library of puzzles into 5 separate piles.
  • The Professor studies 4 piles and is then tested only on the 5th pile they haven't seen yet.
  • Then, they switch piles. They study the new 4 piles and are tested on the next unseen pile.
  • By doing this, the Professor is forced to actually think and guess, rather than just recall. This creates a high-quality, honest cheat sheet for the Student.

The Results: A Fast, Smart Student

The team tested this on 153 different datasets (ranging from small medical records to large financial data). Here is what they found:

  1. Speed: The new Student (a model called XGBoost) runs 38 to 860 times faster than the Professor. It answers in about 1.9 milliseconds on a standard computer, meeting the strict "under 2ms" requirement.
  2. Smarts: The Student keeps 96.5% of the Professor's intelligence. In fact, on 51% of the tests, the Student actually beat a standard, well-tuned model (CatBoost) that is usually the gold standard for this type of work.
  3. The "Low-Dimension" Sweet Spot: The Student shines brightest on problems with fewer features (like a puzzle with fewer than 21 pieces). On these, the Student is significantly better than the competition. However, on massive, complex puzzles with thousands of features, the Student doesn't gain much advantage over standard models.
  4. Teamwork (Multi-Teacher):
    • For Tree-based Students (like XGBoost), having multiple Professors give advice didn't help much. One strong Professor was enough.
    • For Neural Network Students (MLPs), having multiple Professors average their advice did help, acting like a "smoothing" effect that made the Student more accurate.

The Bottom Line

The paper proves that you don't need a super-computer to use the world's smartest AI models for real-time tasks. By using a clever "blind test" method to generate a cheat sheet, you can train a lightweight, fast "Student" model that runs on a regular CPU.

  • If the Professor is good: The Student becomes a fast, accurate replacement.
  • If the Professor is bad: The Student will also be bad (the method doesn't magically fix a weak Professor).
  • The Golden Rule: You must ensure the Professor is "blind" to the test data, or the Student learns nothing.

The authors have made all the tools to do this open-source, so anyone can build their own "Pocket Foundation Model."

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →