← Latest papers
💻 computer science

Correcting Class Imbalance in Prior-Data Fitted Networks for Tabular Classification

This paper addresses the challenge of class imbalance in Prior-data Fitted Networks (PFNs) for tabular classification by adapting classical mitigation techniques, finding that thresholding leverages PFN calibration for superior performance while downsampling offers comparable results with reduced inference costs.

Original authors: Samuel McDowell, Nathan Stromberg, Lalitha Sankar

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

Original authors: Samuel McDowell, Nathan Stromberg, Lalitha Sankar

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

Imagine you have a super-smart, pre-trained detective named PFN. This detective has read millions of made-up stories during their training and is incredibly good at solving new cases just by looking at a few clues (a technique called "In-Context Learning"). They don't need to retrain their brain for every new job; they just look at the evidence you give them and make a guess.

However, this detective has a major blind spot: Class Imbalance.

The Problem: The "Majority Vote" Bias

Imagine you ask the detective to find a rare, specific type of coin in a pile of 1,000 coins.

  • 950 coins are common pennies (the Majority Class).
  • 50 coins are rare gold coins (the Minority Class).

Because the detective has seen so many pennies in their training, they get lazy. When they see a new coin, they just guess "Penny" every time.

  • Result: They are right 95% of the time (because most coins are pennies).
  • The Catch: They miss every single gold coin. If you are looking for that rare gold coin (like a rare disease or a cyberattack), the detective is useless.

The paper asks: How do we fix this detective without making them study for a new exam (retraining), which they can't do?

The Solution: Three Ways to Tweak the Detective

The researchers tried three different "tricks" to make the detective pay attention to the rare coins.

1. The "Lower the Bar" Trick (Thresholding)

Normally, the detective says, "I'm 51% sure this is a gold coin, so I'll call it gold." But because they are biased toward pennies, they rarely reach that 51% confidence for gold coins.

The researchers realized the detective is actually very honest about their confidence levels (they are "well-calibrated"). They just need a nudge.

  • The Fix: Instead of waiting for 51% confidence, we tell the detective: "If you are even 10% sure it's a gold coin, call it gold!"
  • The Analogy: It's like lowering the passing grade on a test. If the student usually needs 90% to pass, but the test is hard, you might lower the bar to 60% so they don't fail everyone.
  • Result: This worked amazingly well. The detective started catching the rare gold coins without losing too many pennies. It was the simplest and most effective fix.

2. The "Hide the Pennies" Trick (Downsampling)

Instead of changing the rules, we change the evidence. We take the pile of 1,000 coins and throw away 900 of the pennies, leaving only 50 pennies and 50 gold coins.

  • The Fix: Now the pile is balanced. The detective can't just guess "penny" and be right most of the time; they have to actually look at the clues.
  • The Bonus: Because there are fewer coins to look at, the detective solves the case faster (less computer power needed).
  • Result: This also worked very well, almost as good as the "Lower the Bar" trick.

3. The "Fake Coins" Trick (Oversampling & Synthetic Upsampling)

This is where the other methods tried to help.

  • Oversampling: We take the 50 gold coins and photocopy them until we have 500 gold coins.
  • Synthetic Upsampling: We use a robot to invent new fake gold coins that look like the real ones and add them to the pile.
  • The Result: These methods failed.
    • Photocopying the coins (Oversampling) confused the detective because the pile looked weird and "spiky."
    • The fake coins (Synthetic) weren't good enough to teach the detective anything new. In fact, they made the detective worse at spotting the real rare coins.

The Big Takeaway

The paper found that you don't need complex AI magic to fix this problem.

  1. Don't generate fake data. It just makes things messy.
  2. Do adjust the decision rule. Simply telling the model, "Be more willing to guess the rare thing," works better than almost anything else.
  3. Do remove the common data. If you have too much of the common stuff, throw some away. It makes the model faster and fairer.

In short: The super-smart detective was just being too cautious about the rare items. By simply telling them to be a little less cautious (lowering the threshold) or giving them a smaller, fairer pile of evidence (downsampling), they became excellent at finding the rare things they were missing.

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 →