Elamur Research⌕
☰
home / papers / 2026 / Combining Semantic Embeddings and Knowledge Graphs for Identifying Decision Patterns in Brazilian Judicial Decisions

Combining Semantic Embeddings and Knowledge Graphs for Identifying Decision Patterns in Brazilian Judicial Decisions

Paper · 2026 · Gustavo Soares Silva, Omar Andres Carmona Cortes, Fábio Manoel França Lobato et al.

Summary

Brazilian courts carry enormous backlogs of repetitive litigation. At the Tribunal de Justiça do Maranhão (TJMA), finding recurring decision patterns is still a manual task. The authors point to three gaps in earlier work: clustering based on text alone struggles when documents are nearly identical in wording, existing pipelines assume a fixed corpus, and LLM-written cluster descriptions are not checked for legal soundness. This work-in-progress paper proposes a system with four parts:

  • document embeddings from Portuguese legal models, joined with TransE embeddings of a knowledge graph that Jurema-7B extracts without a predefined schema;
  • UMAP reduction followed by clustering;
  • incremental assignment of new decisions using a cosine-similarity threshold against cluster centroids;
  • LLM justifications grounded in the subgraph that cluster members share.

The pilot corpus contains 388 TJMA payroll loan decisions with very high pairwise overlap. Only text-only baselines are reported so far. The best combination was BumbaLM embeddings with UMAP and HDBSCAN. The work matters as a locally run, privacy-compliant aid for keeping precedents consistent.

Key points

  • Corpus: 388 TJMA decisions on payroll loan disputes (2016–2023). Average pair similarity is very high (Jaccard 0.86, cosine 0.94 with LegalBERT-pt embeddings), which motivates adding structural knowledge graph features.
  • Embedding models compared: LegalBERT-pt, BERTimbau, BumbaLM-Embedding (a Qwen3-Embedding-4B variant tuned for Brazilian legal text) and a CBOW Word2Vec baseline. Long documents are split into chunks of up to 1,500 characters, and chunk vectors are averaged; chunks are stored in ChromaDB.
  • The hybrid vector is formed by L2-normalizing the text embedding and the TransE graph embedding, then concatenating them. Clustering methods tested: K-Means, HDBSCAN, Agglomerative and Spectral, applied after UMAP with d ∈ {2, 10, 50}.
  • Top text-only setup: BumbaLM + UMAP (d=2) + HDBSCAN, which found 5 clusters with Silhouette 0.752, Davies-Bouldin 0.289, Calinski-Harabasz 8,232.49 and a mean rank of 37.7. All five top configurations used UMAP + HDBSCAN.
  • Still pending: the comparison of hybrid versus text-only representations, sensitivity tests for the threshold θ_s, validation of knowledge graph and entity-linking quality, and expert review of whether the justifications are legally valid. The planned deployment is a Docker microservice with an API.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Gustavo Soares Silva, Omar Andres Carmona Cortes, Fábio Manoel França Lobato and Antonio Fernando Lavareda Jacob Junior. 2026. Combining Semantic Embeddings and Knowledge Graphs for Identifying Decision Patterns in Brazilian Judicial Decisions. Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 2.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{silva2026combining,
  title = {{Combining Semantic Embeddings and Knowledge Graphs for Identifying Decision Patterns in Brazilian Judicial Decisions}},
  author = {Gustavo Soares Silva, Omar Andres Carmona Cortes, Fábio Manoel França Lobato and Antonio Fernando Lavareda Jacob Junior},
  booktitle = {Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 2},
  year = {2026},
  url = {https://aclanthology.org/2026.propor-2.25/}
}

References

14 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. André Aguiar, Raquel Silveira, Vasco Furtado, Vládia Pinheiro, and João A. Monteiro Neto. 2022. Using Topic Modeling in Classification of Brazilian Lawsuits, page 233–242. Springer International Publishing. find
  2. Antoine Bordes, Nicolas Usunier, Alberto Garcia-Durán, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In Proceedings of the 27th International Conference on Neural Information Processing Systems, volume 2 of NIPS’13, page 2787–2795. Curran Associates Inc.
  3. Marcella Queiroz de Castro and Ana Régia Mendonça. 2024. PLN e segurança jurídica identificação de divergências jurisprudenciais com processamento de linguagem natural. In Proceedings of the 15th Brazilian Symposium in Information and Human Language Technology, pages 457–462, Belém do Pará, Brazil. Association for Computational Linguistics. find
  4. CNJ. 2025. Justiça em números. find
  5. José Alfredo F. Costa, Nielsen Castelo D. Dantas, and Esdras Daniel S. A. Silva. 2023. Evaluating text classification in the legal domain using bert embeddings. In Intelligent Data Engineering and Automated Learning – IDEAL 2023, pages 51–63, Cham. Springer Nature Switzerland. find
  6. Fabrício Almeida do Carmo. 2024. Representações Embeddings Orientadas à Linguagem Jurídica Brasileira. Mestrado em engenharia da compuatação e sistemas, Universidade Estadual do Maranhão, São Luís - MA. find
  7. Fernando Martínez-Plumed, Lidia Contreras-Ochando, Cesar Ferri, José Hernández-Orallo, Meelis Kull, Nicolas Lachiche, María José Ramírez-Quintana, and Peter Flach. 2019. Crisp-dm twenty years later: From data mining processes to data science trajectories. IEEE Transactions on Knowledge and Data Engineering, 33(8):3048–3061. ↗
  8. Hugo Mentzingen, Nuno António, Fernando Bacao, and Marcio Cunha. 2024. Textual similarity for legal precedents discovery: Assessing the performance of machine learning techniques in an administrative court. International Journal of Information Management Data Insights, 4:100247–100247. ↗
  9. Raphael Souza de Oliveira and Erick Giovani Sperandio Nascimento. 2025. Analysing similarities between legal court documents using natural language processing approaches based on transformers. PLOS ONE, 20(4):e0320244. ↗
  10. Felipe Polo, Gabriel Mendonça, Kauê Parreira, Lucka Gianvechio, Peterson Cordeiro, Jonathan Ferreira, Leticia Lima, Antônio Maia, and Renato Vicente. 2021. Legalnlp - natural language processing methods for the brazilian legal language. In Anais do XVIII Encontro Nacional de Inteligência Artificial e Computacional, pages 763–774, Porto Alegre, RS, Brasil. SBC. find
  11. Ingrid L. A. da Silva, Rafael Ferreira Mello, Péricles B. C. Miranda, André C. A. Nascimento, Isabel W. S. Maldonado, and José L. M. Coelho Filho. 2021. Assessment of text clustering approaches for legal documents. In Anais do XVIII Encontro Nacional de Inteligência Artificial e Computacional (ENIAC 2021), ENIAC 2021, page 37–48. Sociedade Brasileira de Computação. find
  12. Raquel Silveira, Caio Ponte, Vitor Almeida, Vládia Pinheiro, and Vasco Furtado. 2023. Legalbert-pt: A pre-trained language model for the brazilian portuguese legal domain. In Intelligent Systems, pages 268–282, Cham. Springer Nature Switzerland. find
  13. Fábio Souza, Rodrigo Nogueira, and Roberto Lotufo. 2020. Bertimbau: Pretrained bert models for brazilian portuguese. In Intelligent Systems, pages 403– 417, Cham. Springer International Publishing. find
  14. Yanran Tang, Ruihong Qiu, Yilun Liu, Xue Li, and Zi Huang. 2024. Casegnn: Graph neural networks for legal case retrieval with text-attributed graphs. In Advances in Information Retrieval, pages 80–95, Cham. Springer Nature Switzerland. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/silva-2026-combining-semantic-embeddings-knowledge-graphs/