Study evaluated a novel framework for improving classification accuracy in Fiqh, indicating significant advancements for low-resource classes.
Background/Introduction: Fine-grained text classification in the field of Islamic Jurisprudence (Fiqh) is difficult because of the structural interdependence of the legal concepts and the extremely multi-class long-tail data distribution (667 classes with 5,979 samples, 52.2% of which contain less than 5 samples). The main problem with traditional flat classifiers is that they assume that target classes are independent and orthogonal output neurons which discards very important relational semantics. Objectives: This paper seeks to remediate this extreme imbalance and maintain structural taxonomy by modeling the structural space of classification label space itself as an object to be learned, while giving a high-resource neighbor a statistical advantage. Models Used: We propose HeG-Fiqh, a novel dual-encoder retrieval-based framework that integrates a Supervised Contrastive (SupCon) fine-tuned AraBERT text encoder with a Heterogeneous Graph Attention Network (HAN) label encoder. A custom Fiqh Knowledge Graph (HKG) is dynamically constructed from text centroids (semantic lateral edges) and historical domain taxonomies (hierarchical edges) using only training data to guarantee zero data leakage. Both text and graph-encoded label embeddings are projected and aligned in a shared latent metric space. Classification is executed via Maximum Inner Product Search (MIPS) at inference. Results: The extensive evaluations conducted using stratified 5-fold cross validation protocol demonstrate the Top-1 Accuracy of HeG-Fiqh being 93.42 ± 0.15% and a Macro-F1 of 90.32 ± 0.21%, outperforming flat AraBERT by 25.62% in Accuracy and 54.93% in Macro-F1 (which achieves a Macro-F1 of 35.39 ± 0.40%). Notably, on rare categories with four or fewer training examples, HeG-Fiqh increases the Macro-F1 score from 12.4% (flat AraBERT) to 87.6%. These performance improvements are highly statistically significant ( under McNemar’s test). Conclusion: Modeling the label space explicitly via heterogeneous graph attention neural networks provides strong representational borrowing for low-resource classes, offering a robust and scalable solution for extreme multi-class classification in structured, highly domain-specific knowledge regions.
No takes yet. Share an insight, caveat, or question.
Ali A. Jalil (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: