Hierarchical Multilabel Document Classification

Hierarchical multi-label document categorization using a label taxonomy (tree/DAG) and neural + classical baselines.

Overview

This project focuses on hierarchical multi-label document classification (HMLC) — assigning multiple labels to each document, where labels are organized in a hierarchy (e.g., Category → Subcategory → Group → Subgroup). Unlike “flat” multi-label classification, HMLC explicitly models parent–child relations between categories.

  • Task: multi-label document classification with a predefined taxonomy
  • Output: one or more paths in the hierarchy (multiple labels per document)


How it works

A hierarchical label structure has been emplyed to classify documents into their appropriate categories with the goal to explore:

  • how hierarchical constraints affect prediction quality,
  • how multi-level labels can be represented (per-level indices vs. global label ids),
  • and how different models behave when labels are not independent.

Data & label structure (example)

Documents are represented with text fields (e.g., title/abstract) and assigned (hierarchical) labels.
A typical record contains tokenized text plus labels at each level and a combined list of label ids:

  • title, abstract: tokenized text
  • section / subsection / group / subgroup: indices at each hierarchy level
  • labels: encoded into label ids (using per-level offsets)

Modeling

Approaches explored/used (depending on experiment scope):

  • Hierarchy-aware neural model (e.g., attention + recurrent encoder with hierarchical output heads)
  • Multi-label baselines (flat vs. hierarchical)
  • Evaluation with hierarchy in mind (per-level accuracy/F1 and overall multi-label metrics)

Why hierarchy helps

A hierarchy provides:

  • regularization (predictions are constrained by parent labels),
  • better interpretability (you can explain predictions as paths),
  • and a natural way to handle fine-grained label spaces.