Topic Similarity of Heterogeneous Legal Sources Supporting the Legislative Process
Authors: Michele Corazza, Leonardo Zilli, Monica Palmirani (Università di Bologna, 2024)
Topic: In-domain IR and IE

Abstract
The legislative process starts with a deep analysis of the existing regulations at European and national levels to avoid conflicts and fostering the into force norms. Also the Constitutional Court decisions play a fundamental role in this analysis for checking the compliance with the constitutional framework and for including the inputs coming from this relevant court in the law-making process. Finally, it is also significant to compare the forthcoming proposal with the already presented bills regarding the same topic. This comparison is crucial to avoid overlapping and to coordinate the democratic dialogue with the different parties. In this light, this paper presents an unsupervised approach for calculating similarity between heterogeneous documents annotated in Akoma Ntoso XML, with the aim to support the information retrieval of similar documents using thematic taxonomy used in legal domain. The prototype has been developed for answering to a call for manifestation of interests launched by the Chamber of Deputy of Italy in order to adopt hybrid AI in the legislation process. It uses a completely unsupervised approach based on Sentence Transformers, meaning that neither annotated data or any fine-tuning process is required.

Introduction
The legislative process inside parliaments and official assemblies includes an initial phase of preliminary discovery of the existing regulations and rules in the same domain of the proposal, in order to synchronize the new bill with the legal system and to avoid conflicting norms. Secondly, a legal preliminary study must be conducted for applying legislative drafting techniques that have the aim of creating transparent and evidence-based legislation (e.g., Better Regulation ). On the other hand, the fragmentation of the legal system imposes the task of an accurate preliminary legal analysis and research at different levels of legislation to the legislative department: at the European level in order to discover the norms in Regulations and Directives; at the national level to avoid overlapping with other existing acts; at the ministerial level to synchronize the technical and operative rules. Notably, it is crucial to check the decisions of the Constitutional Court to avoid to produce norms that are unconstitutional. On the other hand, the legal sources, considering their heterogeneous nature, follow some theory of law principles: i) lex superior derogat inferiori, following a specific hierarchy between the legal sources (e.g., an EU regulation is directly enforceable in the Member States); ii) lex specialis derogat legi generali (e.g., energy regulation overrides general green deal rules); iii) lex posterior derogat legi priori (e.g., the norms should be applied according to the principle of point-in-time with respect to the temporal model of the provisions and facts, the normative references in the preamble are static links fixed in time when the Parliament argues on the justification reasons). Another important check is done with the existing bills already proposed in the assembly to better manage the democratic dialogue between different parties' propositions. For this reason, having a dashboard that, in a unique portal, allows the retrieval, comparison, analysis of different heterogeneous legal sources is a fundamental instrument for this preliminary legal analysis. The documents are annotated in Akoma Ntoso XML AUTHOR for creating a common framework for their representation that is capable of capturing the legal knowledge and metadata (e.g., jurisdiction, hierarchy, temporal model). \par Additionally, we provide an unsupervised approach for classifying legal documents according to their topic, which is used to retrieve the relevant legal documents concerning some main legal topics (e.g., the subject of the Chamber of Deputies Committees defined by law }, or EUROVOC top-level thematic classes) from a user input. This work was conducted on the use-case of the Chamber of Deputy of Italy's needs and documents, answering the call for interests launched in February 2024 concerning the use of AI in Parliament }. \par The legislative language is a peculiar language that includes qualified part of the text like the preamble, normative part, definitions, normative references, exceptions, transitional norms, etc. For this reason, the task is not trivial and should take in consideration these peculiarities.

Conclusion
In this article, we present an unsupervised approach that aims to support the Italian legislative process, by providing useful insights into documents from the relevant European and Italian institutions (European Union, Constitutional Court, Italian Parliament). The system doesn't only provide with a ranking of relevant documents, but it also returns the two most relevant EuroVoc terms (for EU documents) and Chamber commissions (for Italian documents). This allows the user a more thorough exploration of the relevant subjects, while also supplying suggestions in terms of specific documents. \par Our approach is completely unsupervised and it does not rely on any form of annotation, meaning that scaling up the approach to more documents, or even using more performant models do not require any fine-tuning, with the procedure consisting in obtaining the article and title vectors for all documents. Furthermore, the adopted approach leverages the hierarchical nature of legislative documents, as represented in Akoma Ntoso XML in order to produce embeddings that are based on the structure of the document. Moreover, using a structured format as our input allows us to resolve normative references, without which some of the of a document will be impossible to understand for an automatic system. \par The evaluation performed on the classification system showed a promising level of performance for an unsupervised model, which doesn't rely on any information about the specific task. Additionally, the multilingual model used in our method allows users to work both on English and Italian, both in terms of queries and in terms of results, with satisfying results. Nevertheless, it would be possible to improve the quality of the results by testing other models, which might yield better performance. \par The validation of the search by topic task has been assessed by two senior legal researcher in the team, however it is recommendable to organize a session with relevant end-users with some concrete scenarios for returning relevant documents and categories given a user query. For this task, it would be necessary to involve the relevant stakeholders, meaning experts involved in the drafting of legislative documents in Italy. Nevertheless, the project has been evaluated by scientific experts } appointed by the Italian Chamber of Deputies in the context of its manifestation of interest and it was included as part of the work by of one of the two winning consortiums. \par The experimental results obtained in this paper constitute a study of the application of pre-existing Sentence Transformer models in an unsupervised way to the classification and search of Italian legal documents. While we achieved satisfactory results, our approach could still be improved by improving upon the base methodology and conducting a more thorough exploration of other multilingual models. Furthermore, a formal evaluation by the stakeholders would also improve our understanding further specific parameters that arise during the legislative process. This project is funded by the European Union - NextGenerationEU under the National Recovery and Resilience Plan (PNRR) - Mission 4 Education and research - Component 2 From research to business - Investment 1.1 Notice PRIN 2022 (DD N. 104 del 02/02/2022), title Smart Legal Order in DigiTal Society - SLOTS, proposal code “Smart Legal Order in DigiTal Society (SLOTS)”, Proposal code 2022LRL2C2, CUP J53D23005610006. We also thank Salvatore Sapienza, Chantal Bomprezzi, Pier Francesco Bresciani for validating the results.