Dual Encoder Contrastive Similarity for Legal Regulation Retrieval in Case-Based Reasoning

Authors

  • Adil Priman Hati Hulu STMIK Methodist Binjai
  • Anzas Ibezato Zalukhu STMIK Methodist Binjai

DOI:

https://doi.org/10.30871/jaic.v10i2.12491

Keywords:

Case Based Reasoning, Contrastive Similarity Learning, Dual Encoder, Legal Regulation Retrieval, Document Similarity

Abstract

The increasing volume and complexity of legal regulations present challenges in retrieving relevant regulatory documents using conventional keyword-based approaches. In practice, similarity assessment among legal regulations requires consideration of structural attributes, contextual content, and temporal characteristics. Case-Based Reasoning (CBR) has been applied in legal decision-support systems due to its ability to retrieve similar cases based on past experiences. However, conventional mechanisms in CBR commonly rely on manually weighted attributes and static distance metrics, which are limited in capturing complex semantic relationships within heterogeneous regulatory data.

This study proposes an integration of Dual Encoder architecture with Contrastive Similarity Learning to enhance similarity measurement in a CBR framework for legal regulation retrieval. Documents are represented through a combination of categorical, numerical, and textual features, which are transformed into dense embeddings using a neural dual encoder model. Positive and negative pairs are constructed to enable contrastive learning that optimizes the embedding space by minimizing the distance between semantically related regulations while maximizing separation from irrelevant ones.

Experimental evaluation was conducted on a dataset of Indonesian legal regulations using standard information retrieval metrics. The proposed model achieved a Precision@5 of 0.7758 and a Mean Average Precision (MAP) of 0.7394, demonstrating substantial improvement in ranking accuracy and retrieval relevance. Results indicate that contrastive representation learning effectively produces adaptive and data-driven similarity functions for regulatory documents within the CBR system.

Overall, proposed CL with CBR approach enhances legal regulation similarity assessment, providing a robust and explainable retrieval mechanism for regulatory analysis and decision-support applications.

Downloads

Download data is not yet available.

References

[1] MF Berry, “Formation of the Theory of Legislation,” Muhammadiyah Law Review , vol. 2, no. 2, pp. 87–91, Jan. 2021, doi: 10.24127/lr.v2i2.1461.

[2] A. Fitryantica, “Harmonization of Indonesian Legislation through the Omnibus Law Concept,” Gema Keadilan , vol. 6, no. 3, pp. 300–316, Dec. 2019, doi: 10.14710/gk.2019.6751.

[3] B. Bhavishya, A. Shukla, and M. Aggarwal, “Automating Legal Expertise: A Rule-Based Approach to Legal Reasoning Systems,” in 2025 2nd International Conference on Computational Intelligence, Communication Technology and Networking (CICTN) , Feb. 2025, pp. 868–872. doi: 10.1109/CICTN64563.2025.10932494.

[4] W. Yuan, “Design and Implementation of Intelligent Reasoning Engine Based on Legal Framework Network Database,” in 2022 4th International Conference on Smart Systems and Inventive Technology (ICSSIT) , Jan. 2022, pp. 1000–1003. doi: 10.1109/ICSSIT53264.2022.9716419.

[5] A. Yan, H. Yu, and D. Wang, “Case-based reasoning classifier based on learning pseudo metric retrieval,” Expert Systems with Applications , vol. 89, pp. 91–98, Dec. 2017, doi: 10.1016/j.eswa.2017.07.022.

[6] D. C. Corrales, A. Ledezma, and J. C. Corrales, “A case-based reasoning system for recommendation of data cleaning algorithms in classification and regression tasks,” Applied Soft Computing , vol. 90, p. 106180, May 2020, doi: 10.1016/j.asoc.2020.106180.

[7] M. Chen, Q.-Y. Liu, S. Chen, Y. Liu, C. Zhang, and R. Liu, “XGBoost-Based Algorithm Interpretation and Application on Post-Fault Transient Stability Status Prediction of Power Systems,” IEEE Access , Jan. 2019, doi: 10.1109/ACCESS.2019.2893448.

[8] G. Izacard et al. , “Unsupervised Dense Information Retrieval with Contrastive Learning,” Aug. 29, 2022, 2112.09118. doi: 10.48550/arXiv.2112.09118.

[9] E. Amador-Domínguez, E. Serrano, D. Manrique, and J. Bajo, “A Case-Based Reasoning Model Powered by Deep Learning for Radiology Report Recommendation.,” International Journal of Interactive Multimedia and Artificial Intelligence , vol. 7, pp. 15–26, Dec. 2021, doi: 10.9781/ijimai.2021.08.011.

[10] W. Xu, Y. Huang, S. Song, B. Chen, and X. Qi, “A novel online combustion optimization method for boiler combining dynamic modeling, multi-objective optimization and improved case-based reasoning,” Fuel , vol. 337, p. 126854, Apr. 2023, doi: 10.1016/j.fuel.2022.126854.

[11] H. Zamani and M. Bendersky, “Multivariate Representation Learning for Information Retrieval,” in Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval , in SIGIR '23. New York, NY, USA: Association for Computing Machinery, Jul. 2023, pp. 163–173. doi: 10.1145/3539618.3591740.

[12] K. Amin, G. Lancaster, S. Kapetanakis, K.-D. Althoff, A. Dengel, and M. Petridis, “Advanced Similarity Measures Using Word Embeddings and Siamese Networks in CBR,” in Intelligent Systems and Applications , Y. Bi, R. Bhatia, and S. Kapoor, Eds., Cham: Springer International Publishing, 2020, pp. 449–462. doi: 10.1007/978-3-030-29513-4_32.

[13] H. Sugiharto, “Law Indonesia Dataset,” Kaggle. Accessed: Feb. 10, 2026. [Online]. Available: https://www.kaggle.com/datasets/hermansugiharto/law-indonesia

[14] I. Chalkidis, E. Fergadiotis, P. Malakasiotis, and I. Androutsopoulos, “Large-Scale Multi-Label Text Classification on EU Legislation,” in Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics , A. Korhonen, D. Traum, and L. Màrquez, Eds., Florence, Italy: Association for Computational Linguistics, Jul. 2019, pp. 6314–6322. doi: 10.18653/v1/P19-1636.

[15] H. Zhong, C. Xiao, C. Tu, T. Zhang, Z. Liu, and M. Sun, “How Does NLP Benefit Legal Systems: A Summary of Legal Artificial Intelligence,” May 18, 2020, 2004.12158. doi: 10.48550/arXiv.2004.12158.

[16] GEAPA Batista and MC Monard, “An analysis of four missing data treatment methods for supervised learning,” Applied Artificial Intelligence , vol. 17, no. 5–6, pp. 519–533, May 2003, doi: 10.1080/713827181.

[17] SG Tendulkar, “Efficient Nearest Neighbor Search in Large-Scale Text Data Using Optimized Locality Sensitive Hashing in Distributed Computing Environments,” in 2025 International Conference on Advanced Computing Technologies (ICoACT) , Mar. 2025, pp. 1–6. doi: 10.1109/ICoACT63339.2025.11005204.

[18] J. Han, J. Pei, and H. Tong, Data mining: concepts and techniques , Fourth edition. Cambridge, MA, United States: Morgan Kaufmann Publishers, an imprint of Elsevier, 2023. doi: 10.1016/C2013-0-18660-6.

[19] L. Roḳaḥ and OZ Maimon, Data mining with decision trees: theory and applications , 2nd edition. in Series machine perception and artificial intelligence, no. 81. New Jersey London Singapore Beijing: World Scientific, 2015.

[20] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A Simple Framework for Contrastive Learning of Visual Representations,” in Proceedings of the 37th International Conference on Machine Learning , PMLR, Nov. 2020, pp. 1597–1607. doi: 10.48550/arXiv.2002.05709.

[21] L. Fei and Y. Feng, “A novel retrieval strategy for case-based reasoning based on attitudinal Choquet integrals,” Engineering Applications of Artificial Intelligence , vol. 94, p. 103791, Sep. 2020, doi: 10.1016/j.engappai.2020.103791.

[22] E. Keogh, “Nearest Neighbor,” in Encyclopedia of Machine Learning and Data Mining , C. Sammut and G.I. Webb, Eds., Boston, MA: Springer US, 2017, pp. 897–897. doi: 10.1007/978-1-4899-7687-1_579.

[23] N. Thakur, N. Reimers, A. Rücklé, A. Srivastava, and I. Gurevych, “BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Models,” Oct. 21, 2021, 2104.08663. doi: 10.48550/arXiv.2104.08663.

Downloads

Published

2026-04-16

How to Cite

[1]
A. P. H. Hulu and A. I. Zalukhu, “Dual Encoder Contrastive Similarity for Legal Regulation Retrieval in Case-Based Reasoning”, JAIC, vol. 10, no. 2, pp. 1513–1519, Apr. 2026.

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.