LG Aimers 5th: Product Defect Detection with Stacking and SMOTE-ENN
Loading comments...
Loading comments...
This summer I joined LG Aimers 5th, Product Defect Detection. The crux was extreme class imbalance: defects were under 1% of all rows. This post records the technical choices that got me to the top 5.5% among ~1,400 participants.
The metric was F1. Predicting everything as “normal” still yields ~99% accuracy, the classic accuracy trap. The goal was to lift minority-class detection without drowning in false positives. I structured the work as:
Plain oversampling risks overfitting; undersampling wastes information. SMOTE-ENN is a hybrid that mitigates both.
Ablation: Versus SMOTE alone, SMOTE-ENN lifted Precision by about 8 percentage points. Cutting boundary noise was key to fewer false positives.
That balance helped both precision and recall, the two halves of F1.
I built a stacking ensemble. Unlike averaging, stacking trains a meta-model to learn which base model to trust.
I finished in the top 5.5% of ~1,400 teams. End-to-end, from heavy preprocessing through tuning, I compressed a lot of real ML practice into one sprint.
I missed the finals by a hair, and that stings more. In hindsight three gaps were obvious:
Looking back, skipping feature work was the biggest regret. On process and measurement data, ratios between variables, binned distributions, and similar domain features would almost certainly have helped. Next time I will budget EDA and feature creation separately from day one.
I also scribbled scores in Notion without a real tracker and sometimes re-ran the same experiment twice. I learned the hard way that MLflow (or any tracker) should be there from the first commit.
Missing finals by a sliver hurts, but the skill gap was real, especially on feature depth. Now that the weak spots are explicit, the next competition feels less like roulette.