Project · NLP · 2026 · solo
Interpretable text classification at INSEE
Lightweight, explainable classifiers that file French company descriptions under ~700 NAF codes, with a model that predicts all five levels at once.
Problem
INSEE codes each new company’s free-text activity description against the five-level NAF nomenclature (section → division → group → class → sub-class). Can lightweight models match the production FastText baseline at a fraction of an LLM’s cost, and can their predictions be explained faithfully?
Method
Built on INSEE’s torchTextClassifiers: FastText and
small transformer encoders (FATE), each with mean pooling or label attention, benchmarked on Amazon Reviews,
CLINC150 and NAF 2025 (~1.2M training examples). A multi-level model feeds one shared encoder into five
per-level heads. Explanations from Captum Integrated Gradients and label-attention weights were checked with a
word-deletion faithfulness test.
Results
Per-level heads change how the models are wrong rather than how often (table below). The heads can still disagree with each other, which remains open. The full interactive report is at julber95.github.io/interpretable-text-classification.
Measurements
| Setting | Value |
|---|---|
| “Completely wrong” errors (miss even the section), single-level | ≈ 47% |
| “Completely wrong” errors, multi-level heads | 29–34% |
| Section / division recovered vs truncation (FastText) | +8.6 / +9.6 pp |
| Section / division recovered vs truncation (Label Attention) | +9.9 / +13.1 pp |
Multi-level vs single-level NAF models, among wrong sub-class predictions (report and defense slides).
Stack
Python · PyTorch · PyTorch Lightning · Hydra · MLflow · Captum · uv · Argo Workflows · Quarto