TLDR: This research evaluates various large language model (LLM) strategies—full fine-tuning, parameter-efficient LoRA tuning, and zero-shot prompting—for automatically detecting unfair clauses in Terms of Service (ToS) agreements. It finds that full fine-tuning offers the most balanced performance, while LoRA provides a good accuracy-efficiency trade-off, and zero-shot prompting enables quick deployment with high recall. The study demonstrates the practical application of these methods on real-world web data, offering insights for scalable legal-tech solutions.
In the digital age, Terms of Service (ToS) agreements are everywhere, governing almost every online interaction. However, these documents are often lengthy, complex, and filled with legal jargon, making them difficult for the average user to understand. This often leads users to unknowingly agree to clauses that might be unfair, such as liability waivers or forced arbitration. Manually identifying these unfair clauses is a monumental task, which highlights the critical need for automated, accurate, and efficient detection methods.
A recent study, titled Text to Trust: Evaluating Fine-Tuning and LoRA Trade-offs in Language Models for Unfair Terms of Service Detection, by Noshitha Padma Pratyusha Juttu, Sahithi Singireddy, Sravani Gona, and Sujal Timilsina from the University of Massachusetts Amherst, delves into this challenge. The researchers conducted a comprehensive evaluation of different large language model (LLM) strategies to automatically detect unfair clauses at a clause-by-clause level.
Exploring Different AI Strategies
The study investigated three primary approaches for unfairness detection:
- Full Fine-Tuning: This involved training established transformer models like BERT and DistilBERT extensively on a specific dataset. This method typically requires significant computational resources but can yield highly accurate results.
- Parameter-Efficient Fine-Tuning (PEFT) with LoRA: This approach uses Low-Rank Adaptation (LoRA) combined with 4-bit quantization. It’s a more resource-friendly method, applied to models such as TinyLlama, LLaMA, and SaulLM (a legal domain-specific model). LoRA allows for efficient adaptation of large models with minimal memory usage.
- Zero-Shot Prompting: This method leverages powerful, API-accessible LLMs like GPT-4o and O3-mini without any specific training for the task. The models are given a prompt and expected to classify clauses based on their pre-existing knowledge.
Datasets and Evaluation
To test these strategies, the researchers used two main datasets. The primary one was the CLAUDETTE-ToS dataset, a benchmark containing thousands of English clauses labeled as either fair or unfair. For real-world applicability, the best-performing models were further evaluated on the Multilingual Scraper of Privacy Policies and Terms of Service corpus, a vast collection of ToS documents scraped from the web.
Key Findings
The evaluation revealed distinct trade-offs for each strategy:
- Full Fine-Tuning: Models like BERT and DistilBERT delivered the strongest overall performance, achieving a balanced accuracy and reliability. This approach is ideal when high precision and calibration are crucial, such as in compliance auditing.
- Parameter-Efficient Models (LoRA): These models offered a favorable balance between accuracy and efficiency. Notably, SaulLM-7B, a legal-domain-specific model, achieved very high recall (identifying most unfair clauses) with reduced training costs, though sometimes at the expense of precision. Smaller models like TinyLlama showed high precision but lower recall.
- Zero-Shot Prompting: While enabling fast deployment, these models generally exhibited high recall but lower precision. This means they could identify many potentially unfair clauses but also flagged more borderline cases incorrectly, making them less suitable for production-grade legal analysis where precision is paramount.
Real-World Impact
To demonstrate practical viability, the fine-tuned BERT classifier was deployed on the large-scale web corpus. The system successfully identified potentially unfair contractual language in noisy, real-world web data. By combining the model’s confidence scores with heuristic filters, the researchers showed how these lightweight LLM-based detectors could be used for large-scale compliance auditing and regulatory monitoring.
Also Read:
- Unpacking Financial Narratives: How AI Detects Stance on Debt, EPS, and Sales
- Assessing Language Model Reliability for Global Human Rights Monitoring
Future Directions
The study concludes that while full fine-tuning provides the most robust solution, parameter-efficient methods offer a scalable alternative, and zero-shot prompting is useful for rapid prototyping. Future work aims to extend this research to multilingual settings, integrate explanation generation to provide rationales for predictions, and develop adaptive ensemble strategies for dynamic model selection based on specific needs and resource constraints.
This research provides valuable insights for building scalable and cost-effective systems to detect unfair clauses, empowering consumers and aiding regulatory bodies in auditing online platforms more effectively.


