Recent advancements in language technology and Artificial Intelligence have resulted in numerous Language Models being proposed to perform various tasks in the legal domain ranging from predicting judgments to generating summaries. Despite their immense potential, these models have been proven to learn and exhibit societal biases and make unfair predictions. In this study, we explore the ability of Large Language Models (LLMs) to perform legal tasks in the Indian landscape when social factors are involved. We present a novel metric, $\beta$-weighted $\textit{Legal Safety Score ($LSS_{\beta}$)}$, which encapsulates both the fairness and accuracy aspects of the LLM. We assess LLMs' safety by considering its performance in the $\textit{Binary Statutory Reasoning}$ task and its fairness exhibition with respect to various axes of disparities in the Indian society. Task performance and fairness scores of LLaMA and LLaMA--2 models indicate that the proposed $LSS_{\beta}$ metric can effectively determine the readiness of a model for safe usage in the legal sector. We also propose finetuning pipelines, utilising specialised legal datasets, as a potential method to mitigate bias and improve model safety. The finetuning procedures on LLaMA and LLaMA--2 models increase the $LSS_{\beta}$, improving their usability in the Indian legal domain. Our code is publicly released.
翻译:近年来,语言技术和人工智能的进步催生了众多用于法律领域各类任务(从判决预测到摘要生成)的语言模型。尽管潜力巨大,但这些模型已被证实会学习并展现社会偏见,做出不公平的预测。本研究探讨了当涉及社会因素时,大型语言模型(LLM)在印度背景下执行法律任务的能力。我们提出了一种新颖的指标——$\beta$加权$\textit{法律安全分数($LSS_{\beta}$)}$,该指标综合体现了LLM的公平性与准确性。我们通过考量LLM在$\textit{二元法定推理}$任务中的表现及其在印度社会各差异维度上的公平性展现来评估其安全性。LLaMA与LLaMA-2模型的任务表现与公平性评分表明,所提出的$LSS_{\beta}$指标能够有效判定模型在法律领域安全使用的就绪程度。我们还提出了利用专业化法律数据集的微调流程,作为减少偏见、提升模型安全性的潜在方法。对LLaMA与LLaMA-2模型的微调流程提升了$LSS_{\beta}$,从而增强了它们在印度法律领域的可用性。我们的代码已公开发布。