Balancing Coherence and Granularity in Legal Topic Modeling: A BERTopic-based Study on Portuguese Appellate Court Decisions

Marjory S. S. Lima, Felipe R. Ahad, Vih A. S. Silva, Thiago M. Ventura, Josiel M. Figueiredo, Allan G. de Oliveira


Abstract
The growing backlog of the Brazilian Judiciary demands scalable semantic organization beyond keyword-based retrieval. This study investigates the trade-off between topic coherence and thematic granularity in neural topic modeling for legal texts. We cluster 1,831 Brazilian labor summaries using BERTopic with LegalBERT-pt embeddings and evaluate the impact of the min_topic_size parameter on coherence (Cv), granularity, and diversity. We propose a balanced evaluation score integrating coherence and granularity. Results show higher coherence (Cv ≈ 0.78) than Latent Dirichlet Allocation (Cv ≈ 0.49), while enabling controlled topic resolution. These findings provide a practical criterion for tuning topic models in large-scale legal systems.
Anthology ID:
2026.stil-1.19
Volume:
Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology
Month:
October
Year:
2026
Address:
Cuiabá, Mato Grosso, Brazil
Editors:
Bryan Khelven da Silva Barbosa, Aline Paes, Ariani Di Felippo
Venue:
STIL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
218–230
Language:
URL:
https://aclanthology.org/2026.stil-1.19/
DOI:
10.5753/stil.2026.26502
Bibkey:
Cite (ACL):
Marjory S. S. Lima, Felipe R. Ahad, Vih A. S. Silva, Thiago M. Ventura, Josiel M. Figueiredo, and Allan G. de Oliveira. 2026. Balancing Coherence and Granularity in Legal Topic Modeling: A BERTopic-based Study on Portuguese Appellate Court Decisions. In Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology, pages 218–230, Cuiabá, Mato Grosso, Brazil. Association for Computational Linguistics.
Cite (Informal):
Balancing Coherence and Granularity in Legal Topic Modeling: A BERTopic-based Study on Portuguese Appellate Court Decisions (Lima et al., STIL 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.stil-1.19.pdf