Baszta: Data-Centric Fine-Tuning of a Polish Multi-Label Safety Classifier
Abstract
We develop a multi-label Polish content-safety classifier by fine-tuning allegro/herbert-base-cased (124M) across five categories (hate, vulgarity, sexual content, crime, self-harm) using a Focal + R-Drop objective, and evaluate the resulting model against Bielik Guard (Sójka) on the shared out-of-distribution Gadzi Język benchmark. Both systems are given per-category threshold tuning on the same calibration split. Under that matched protocol our model holds a small but statistically significant lead in micro F1, while an apparent macro-F1 lead does not survive: it was an artifact of comparing a tuned model against an untuned one. We also report what that micro figure is worth. Because Gadzi Język is 97% crime-positive, a classifier that flags crime on every input and nothing else already scores 0.910 micro F1 on the same test split, so micro separates neither system from a degenerate strategy and macro is the column that does. Per-category and per-protocol figures are reported in Section 4. The residual out-of-distribution gap is one of calibration rather than discrimination. Ranking quality stays high while positive probabilities collapse, and per-category temperature scaling recovers the loss where Platt scaling and isotonic regression do not. That recovery turns out to be conditional on the calibration set containing safe text. Gadzi Język contains almost none, so thresholds fitted on it flag crime on every safe input, and a balanced refit buys a deployable operating point at the cost of adversarial recall. We report both operating points rather than only the flattering one. Two changes that are standard practice, per-class cost-sensitive weighting and mean pooling, each raise in-distribution macro F1 while lowering the out-of-distribution figure, which indicates that robustness has to be selected for directly rather than inherited from in-distribution accuracy.
Create a lesson
Related papers
Frequency-Conditioned Privacy Auditing of Fine-Tuned Language Models
Shared title terminologycs.AIAymen Noor, Ke Lyu, Honglu Jiang
MoMHa: Multi-Objective Optimization of LLM Harnesses over Accuracy, Safety, and Tokens
Shared title terminologycs.AISubhojyoti Mukherjee, Md Mehrab Tanjim
When Is a Multi-Agent Code Judge Actually Grounded? Two Label-Free Measurements, and a Judge That Declines to Guess
Shared title terminologycs.AISalma Roshdy Aly, Hussein Assaf, Ziad Kobti
SciFig2Data: A Workflow for Recovering Structured Data from Scientific Figures
Shared title terminologycs.AIXinhe Wu, Yicheng Ye, Yadong Jin
Multi-agent System for Automatic Discovery of Pareto-optimal Meta-solvers for PDEs
Shared title terminologycs.AIYoungkyu Lee, Shanqing Liu, Jerome Darbon et al.
What People Choose Not to Say: A Multimodal Benchmark for Fine-Grained Information Manipulation in Conversations
Shared title terminologycs.AIYuhan Bian, Zhaokai Liang, Jia Wang et al.