[π GitHub] β’ [π ArXiv] β’ [π€ HF Results] β’ [π€ HF Dataset]
This is the official implementation of the paper:
Shubham Kumar Nigam, Tanuj Tyagi, Siddharth Shukla, Aditya Kumar Guru, Balaramamahanthi Deepak Patnaik, Danush Khanna, Noel Shallum, Kripabandhu Ghosh, and Arnab Bhattacharya:
ReGal: A First Look at PPO-based Legal AI for Judgment Prediction and Summarization in India (AAAI 2025)
ReGal presents an early exploration of Reinforcement Learning (RL) methodologies for legal AI in the Indian context. We introduce a framework that integrates Multi-Task Instruction Tuning with Reinforcement Learning from AI Feedback (RLAIF) using Proximal Policy Optimization (PPO). Our approach is evaluated across two critical legal tasks: (i) Court Judgment Prediction and Explanation (CJPE), and (ii) Legal Document Summarization.
While ReGal underperforms compared to supervised and proprietary models, it provides valuable insights into the challenges of applying RL to legal texts, including reward model alignment, legal language complexity, and domain-specific adaptation. This work establishes a foundation for future improvements in RL-based legal AI systems.
If you have any questions about this work, please open a GitHub issue or email the authors at:
shubhamkumarnigam@gmail.com, tanujtyagiofficial@gmail.com, danush.s.khanna@gmail.com
Ensure you have the necessary hardware and software requirements in place to replicate our experimental setup. Follow the steps below to configure your environment for optimal performance.
Hardware Specifications:
Software Setup:
git clone https://github.com/ShubhamKumarNigam/ReGal.git
cd ReGal
pip install -r requirements.txt
Task 1A - Judgment Prediction: Predict whether an appeal/petition from the Supreme Court of India was accepted (1) or rejected (0).
Task 1B - Rationale Explanation: Generate natural language explanations supporting the predicted outcome.
Dataset - PredEx: The largest annotated dataset for Indian legal judgment prediction and explanation with 15,222 Supreme Court judgment documents.
| Metric | Value |
|---|---|
| Train Documents | 12,178 |
| Test Documents | 3,044 |
| Avg. Tokens per Document | 4,586 |
| Max Tokens | 117,733 |
| Acceptance Rate | 53.44% |
Generate concise, abstractive summaries capturing essential components (background, legal issues, arguments, verdict) from full judgment texts.
Dataset - In-Abs: Expert-curated abstractive summaries from Indian Supreme Court judgments.
| Metric | Value |
|---|---|
| Total Documents | 7,130 |
| Train/Test Split | 7,030 / 100 |
| Avg. Document Size | 4,376.98 words |
| Avg. Summary Size | 842.52 words |
| Compression Ratio | 0.235 |
Stage 1: Supervised Fine-Tuning (SFT)
Stage 2: Proximal Policy Optimization (PPO)
| Hyperparameter | Value |
|---|---|
| Base Model | Llama-2-7B |
| Learning Rate | 1.41e-5 |
| Batch Size | 4 |
| Mini-batch Size | 2 |
| PPO Epochs | 1 |
| Output Length | 100-500 tokens |
| Clipping Parameter (Ξ΅) | 0.1 |
| GPU | NVIDIA A100 80GB |
| Total Training Cost | ~$100 |
In-Abs Summarization Dataset
The ReGal framework exhibits significant hallucination issues, particularly when:
Examples include fabricated legal principles, invented precedent citations, and claims unsupported by source documents.
Conclusion: Success hinges on strong initialization and precisely aligned reward functions.
If you use this work, please cite our paper:
@article{nigam2025regal,
title={ReGal: A First Look at PPO-based Legal AI for Judgment Prediction and Summarization in India},
author={Nigam, Shubham Kumar and Tyagi, Tanuj and Shukla, Siddharth and Guru, Aditya Kumar and Patnaik, Balaramamahanthi Deepak and Khanna, Danush and Shallum, Noel and Ghosh, Kripabandhu and Bhattacharya, Arnab},
journal={arXiv preprint arXiv:2512.18014},
year={2025}
}
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or collaborations, reach out to:
Repository: GitHub - ReGal
Python
100.0%
[π GitHub] β’ [π ArXiv] β’ [π€ HF Results] β’ [π€ HF Dataset]
This is the official implementation of the paper:
Shubham Kumar Nigam, Tanuj Tyagi, Siddharth Shukla, Aditya Kumar Guru, Balaramamahanthi Deepak Patnaik, Danush Khanna, Noel Shallum, Kripabandhu Ghosh, and Arnab Bhattacharya:
ReGal: A First Look at PPO-based Legal AI for Judgment Prediction and Summarization in India (AAAI 2025)
ReGal presents an early exploration of Reinforcement Learning (RL) methodologies for legal AI in the Indian context. We introduce a framework that integrates Multi-Task Instruction Tuning with Reinforcement Learning from AI Feedback (RLAIF) using Proximal Policy Optimization (PPO). Our approach is evaluated across two critical legal tasks: (i) Court Judgment Prediction and Explanation (CJPE), and (ii) Legal Document Summarization.
While ReGal underperforms compared to supervised and proprietary models, it provides valuable insights into the challenges of applying RL to legal texts, including reward model alignment, legal language complexity, and domain-specific adaptation. This work establishes a foundation for future improvements in RL-based legal AI systems.
If you have any questions about this work, please open a GitHub issue or email the authors at:
shubhamkumarnigam@gmail.com, tanujtyagiofficial@gmail.com, danush.s.khanna@gmail.com
Ensure you have the necessary hardware and software requirements in place to replicate our experimental setup. Follow the steps below to configure your environment for optimal performance.
Hardware Specifications:
Software Setup:
git clone https://github.com/ShubhamKumarNigam/ReGal.git
cd ReGal
pip install -r requirements.txt
Task 1A - Judgment Prediction: Predict whether an appeal/petition from the Supreme Court of India was accepted (1) or rejected (0).
Task 1B - Rationale Explanation: Generate natural language explanations supporting the predicted outcome.
Dataset - PredEx: The largest annotated dataset for Indian legal judgment prediction and explanation with 15,222 Supreme Court judgment documents.
| Metric | Value |
|---|---|
| Train Documents | 12,178 |
| Test Documents | 3,044 |
| Avg. Tokens per Document | 4,586 |
| Max Tokens | 117,733 |
| Acceptance Rate | 53.44% |
Generate concise, abstractive summaries capturing essential components (background, legal issues, arguments, verdict) from full judgment texts.
Dataset - In-Abs: Expert-curated abstractive summaries from Indian Supreme Court judgments.
| Metric | Value |
|---|---|
| Total Documents | 7,130 |
| Train/Test Split | 7,030 / 100 |
| Avg. Document Size | 4,376.98 words |
| Avg. Summary Size | 842.52 words |
| Compression Ratio | 0.235 |
Stage 1: Supervised Fine-Tuning (SFT)
Stage 2: Proximal Policy Optimization (PPO)
| Hyperparameter | Value |
|---|---|
| Base Model | Llama-2-7B |
| Learning Rate | 1.41e-5 |
| Batch Size | 4 |
| Mini-batch Size | 2 |
| PPO Epochs | 1 |
| Output Length | 100-500 tokens |
| Clipping Parameter (Ξ΅) | 0.1 |
| GPU | NVIDIA A100 80GB |
| Total Training Cost | ~$100 |
In-Abs Summarization Dataset
The ReGal framework exhibits significant hallucination issues, particularly when:
Examples include fabricated legal principles, invented precedent citations, and claims unsupported by source documents.
Conclusion: Success hinges on strong initialization and precisely aligned reward functions.
If you use this work, please cite our paper:
@article{nigam2025regal,
title={ReGal: A First Look at PPO-based Legal AI for Judgment Prediction and Summarization in India},
author={Nigam, Shubham Kumar and Tyagi, Tanuj and Shukla, Siddharth and Guru, Aditya Kumar and Patnaik, Balaramamahanthi Deepak and Khanna, Danush and Shallum, Noel and Ghosh, Kripabandhu and Bhattacharya, Arnab},
journal={arXiv preprint arXiv:2512.18014},
year={2025}
}
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or collaborations, reach out to:
Repository: GitHub - ReGal
Python
100.0%