Datasets:
Download README.md from TsinghuaNLP/LexReward: direct link, hf CLI and curl.
- Browser
- Download file 5.38 kB
-
https://huggingface.co/datasets/TsinghuaNLP/LexReward/resolve/main/README.md
- Command line
-
hf download hf://datasets/TsinghuaNLP/LexReward/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/TsinghuaNLP/LexReward/resolve/main/README.md
license: mit
LexReward: A Taxonomy-Driven Reward Framework for Legal Language Models
News
- Our preprint LexReward: A Taxonomy-Driven Reward Framework for Legal Language Models has released.
Introduction
High-quality legal responses require more than a correct final answer. They should use precise and objective language, identify relevant legal subjects and facts, apply appropriate statutes, and present complete and coherent reasoning. Coarse-grained holistic rewards can obscure these distinct requirements.
LexReward is a taxonomy-driven reward framework that decomposes legal response quality into three complementary dimensions:
| Dimension | Evaluation criteria |
|---|---|
| Style | Word specificity, subjective-word control, sentence coherence, sentence structure, and collocation correctness. |
| Element | Legal subjects, case facts, statutory grounds, and judicial decisions. |
| Chain | Reasoning order, completeness, correctness, and non-redundancy. |
The framework operationalizes these criteria with interpretable rule-based evaluators and LLM judges. Rubric scores guide preference construction from diverse model-generated responses. We then train LexRM, a family of dimension-specific reward models, with a Bradley-Terry pairwise objective.
The paper evaluates rubric rewards and LexRM through preference selection and test-time scaling, and studies downstream policy optimization with DPO and GRPO. Its experiments show that rubric-guided preference data and learned reward models improve legal response quality across the three dimensions.
Dataset Statistics
The following statistics describe the paper's experiments, not dataset files distributed in this code package.
| Dimension | Source data | Training or construction data | Evaluation data |
|---|---|---|---|
| Style | CLASE | 4,000 training queries used for preference construction | 1,000 official test instances |
| Element | JEC-QA and LexChain | 2,736 source instances yielding 2,244 preference pairs | 3,000 LegalDelta in-domain test instances |
| Chain | LexChain | 9,550 training instances, including 4,000 queries allocated to preference training | 1,000 official test instances |
Dataset Format
Both constructors output chat-format RM preference pairs:
{
"chosen": [
{"role": "user", "content": "Case facts and task instructions..."},
{"role": "assistant", "content": "Preferred model-generated response..."}
],
"rejected": [
{"role": "user", "content": "Case facts and task instructions..."},
{"role": "assistant", "content": "Dispreferred model-generated response..."}
],
"meta": {
"source_row_id": 0,
"pair_group": "A",
"tier_ratio": "5:3:2",
"chosen_index": 0,
"rejected_index": 1,
"chosen_score": -0.2,
"rejected_score": -0.8
}
}
Field Descriptions
| Field | Description |
|---|---|
chosen |
Chat messages containing the prompt and preferred generated response. |
rejected |
Chat messages containing the same prompt and dispreferred generated response. |
meta.source_row_id |
Identifier of the source query in the candidate pool. |
meta.pair_group / meta.tier |
Pair category A, B, or C. CLASE uses pair_group; LexChain uses tier. |
meta.tier_ratio |
Construction ratio, 5:3:2. |
meta.chosen_index / meta.rejected_index |
Selected candidate indices in the original five-response pool. |
| Scores | CLASE records selected scores in meta; LexChain also provides top-level chosen_score and rejected_score. Higher scores are preferred. |
LexChain outputs additionally preserve chosen_model, rejected_model, all five scores in meta.row_scores, and meta.judge_model. Both training scripts consume the shared chosen and rejected fields.
Dataset Example
The following pair is synthetic and shown in English for readability. The experiments use Chinese legal text.
{
"chosen": [
{
"role": "user",
"content": "Rewrite the following case summary as a formal judicial explanation without adding facts: the loan is due and remains unpaid."
},
{
"role": "assistant",
"content": "The loan has matured, and the borrower has not fulfilled the repayment obligation. The outstanding loan therefore remains payable."
}
],
"rejected": [
{
"role": "user",
"content": "Rewrite the following case summary as a formal judicial explanation without adding facts: the loan is due and remains unpaid."
},
{
"role": "assistant",
"content": "The money is due and they have not paid it back, so they still need to pay."
}
],
"meta": {
"source_row_id": 0,
"pair_group": "A",
"tier_ratio": "5:3:2",
"chosen_index": 0,
"rejected_index": 1,
"chosen_score": -0.2,
"rejected_score": -0.8
}
}
Citation
If you use this work, please cite our arXiv preprint:
@article{cai2026lexreward,
title = {{LexReward}: A Taxonomy-Driven Reward Framework for Legal Language Models},
author = {Yida Cai and Xin Dai and Bingxiang He and Huiyuan Xie and Yuxiao Ye and Zhenghao Liu and Yang Bai and Zhiyuan Liu},
year = {2026},
journal = {arXiv preprint arXiv:2609.39071}
}