r/learnmachinelearning • u/Rich-Engineering-167 • 1d ago
How do you train a detection model when you only have 14 positive examples?
I'm working on a project that tries to spot insider trading on a public prediction market (Polymarket). The data side is fine: I have about four years of trades from around 526,000 accounts, plus the money flowing between accounts.
The problem is the labels. I only know of 14 accounts that were confirmed or credibly reported as insiders. My first idea was the textbook one: label insiders vs everyone else and train a classifier. With 14 positives, that hasn't worked. Every pattern I've found either fell apart on new data or matched hundreds of normal traders who were just lucky or good. One example: a rule that beat the market by +4.5 points on the known cases did -2.2 on accounts it hadn't seen.
A few things I'm unsure about:
- Is it even worth training a model here, or should I build a ranked list of "most unusual accounts" and have a human check the top?
- I keep reading about positive-unlabelled learning and anomaly detection. Which one fits a case like this, and what should I read first?
- How do you test a model honestly when 14 examples can't tell you much about accuracy?
Would love to hear from all the data experts here! And how you recommend i should approach this problem.
Any pointers, papers or "here's what I'd do first" answers are really welcome. Also happy to share more detail on any part.
5
u/hidetoshiko 1d ago
You have a highly imbalanced set. Sounds like you should be treating this as anomaly detection instead regular classification.
1
u/FastSlow7201 1d ago
Have you tried a gradient boosted tree like XGBoost?
1
u/Disastrous_Room_927 1d ago
Look into label propagation or similar
1
u/identicalParticle 1d ago
The term you're likely looking for is PU learning (for positive/unlabeled).
1
u/Massive_Distance_616 15h ago
I'd skip the classifier and build the ranked list for a person to check. The drop from +4.5 to -2.2 is what you'd expect if you tried lots of candidate rules and kept the ones that fit 14 cases, because some will fit by luck.
For testing it honestly, accuracy isn't useful here. Pick your rules or features using some of the 14 (say 10), then see where the other 4 land in the ranking of the 526k accounts, compared with where a random ranking would put them.
Repeating that over different splits of the 14 gives you a rough range. Split by time as well, since patterns that fit earlier accounts may not hold for later ones. And track how many of the top 100 a person agrees look suspicious, because that's how you'd actually use it.
One catch with PU learning: it assumes the labelled positives are a random sample of all insiders, and yours probably aren't. They're the ones who got caught or reported, so a model could just learn what the obvious cases look like.
As far as I know, the Bekker and Davis survey on PU learning is the standard place to start reading. I'd also treat the list as leads to check, since being unusual or very profitable isn't proof of insider trading on its own.