File size: 7,901 Bytes
54b5d76
 
61ecbda
 
 
 
 
 
 
 
 
 
 
 
 
 
54b5d76
61ecbda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1c0d8db
61ecbda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
---
license: apache-2.0
base_model:
  - Qwen/Qwen3.5-9B
library_name: transformers
pipeline_tag: text-generation
language:
  - en
tags:
  - anestrace
  - anesthesia
  - perioperative-medicine
  - medical-evaluation
  - llm-as-a-judge
  - dpo
  - qwen3.5
---

# AnesTRACE-Eval

AnesTRACE-Eval is a specialized evaluator for AnesTRACE, a benchmark of clinical reasoning and sequential decision-making in anesthesia and perioperative care. The model assigns structured scores to candidate responses using the AnesTRACE evaluation rubrics.

This repository contains the merged inference checkpoint. It can be loaded directly with Transformers and does not require a separate LoRA adapter.

## Intended use

AnesTRACE-Eval is designed for research evaluation of model outputs on AnesTRACE tasks, including:

- Level Two single-point perioperative decision-making;
- Level Three multi-turn clinical reasoning and intervention decisions;
- clinical correctness;
- evidence-based reasoning and grounding;
- task completeness;
- safety severity for intervention-related outputs;
- temporal adaptation and longitudinal management coherence for multi-turn trajectories.

The model is intended to be used with the official AnesTRACE evaluator prompts and output schemas. It is not intended to generate or validate autonomous clinical care.

## Model details

| Item | Value |
|---|---|
| Model name | AnesTRACE-Eval |
| Base model | Qwen/Qwen3.5-9B |
| Architecture | Qwen3.5 conditional generation model |
| Primary language | English |
| Parameter precision | BF16 |
| Context length in configuration | 262,144 tokens |
| Training framework | LLaMA-Factory |
| Final alignment method | Direct Preference Optimization (DPO) with LoRA |
| Release format | Merged safetensors checkpoint |

The vision tower was frozen during fine-tuning. The released evaluator is used as a text-based judge in the AnesTRACE evaluation pipeline.

## Training

Training was performed in two stages.

### Stage 1: supervised evaluator fine-tuning

The base Qwen3.5-9B model was fine-tuned on AnesTRACE evaluator examples using LoRA. The supervised data teach the model the Level Two and Level Three evaluation rubrics, structured score schemas, and safety labels.

Key SFT settings:

| Setting | Value |
|---|---:|
| LoRA rank | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Learning rate | 1e-4 |
| Epochs | 5 |
| Sequence cutoff | 8,192 tokens |
| Scheduler | Cosine |
| Warmup ratio | 0.05 |
| Precision | BF16 |

### Stage 2: preference optimization

The merged SFT model was further aligned using true preference pairs derived from Level Three action evaluation data. DPO was applied through a new LoRA adapter, which was subsequently merged into the SFT model.

Key DPO settings:

| Setting | Value |
|---|---:|
| Objective | Sigmoid DPO |
| Preference beta | 0.1 |
| LoRA rank | 8 |
| LoRA alpha | 16 |
| LoRA dropout | 0.05 |
| Learning rate | 3e-6 |
| Epochs | 1 |
| Sequence cutoff | 6,144 tokens |
| Per-device training batch size | 1 |
| Gradient accumulation steps | 16 |
| Scheduler | Cosine |
| Warmup ratio | 0.05 |
| Seed | 42 |
| Precision | BF16 |
| Released checkpoint | Step 105 |

The final checkpoint contains the merged model weights in four safetensors shards.

## Usage

Install a recent Transformers version with Qwen3.5 support:

```bash
pip install -U "transformers>=5.8.0" accelerate safetensors
```

The following example performs deterministic text-only evaluation. Replace the abbreviated prompts with the official AnesTRACE system prompt and case input for the target evaluation level.

```python
import torch
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration

model_id = "DataXAI/AnesTRACE-Eval"

processor = AutoProcessor.from_pretrained(
    model_id,
    trust_remote_code=True,
)
model = Qwen3_5ForConditionalGeneration.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)

messages = [
    {
        "role": "system",
        "content": "You are the AnesTRACE clinical evaluation model. Follow the supplied rubric and return only the required JSON object.",
    },
    {
        "role": "user",
        "content": "[Evaluation Instruction]\nEvaluate the candidate response using the official AnesTRACE rubric.\n\n[Case]\n...\n\n[Reference Answer]\n...\n\n[Candidate Answer]\n...",
    },
]

inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_dict=True,
    return_tensors="pt",
    enable_thinking=False,
)
inputs = inputs.to(model.device)

with torch.inference_mode():
    generated = model.generate(
        **inputs,
        max_new_tokens=2048,
        do_sample=False,
    )

new_tokens = generated[:, inputs["input_ids"].shape[1]:]
output = processor.batch_decode(
    new_tokens,
    skip_special_tokens=True,
    clean_up_tokenization_spaces=False,
)[0]
print(output)
```

For reproducible benchmark scoring, use the complete official prompt for the selected level, disable sampling, validate the returned JSON against the corresponding schema, and derive aggregate totals from the validated dimension scores.

## Output interpretation

AnesTRACE-Eval uses discrete rubric scores. For Level Two, each B1–B4 task is evaluated independently on:

- `d1_clinical_correctness`;
- `d2_evidence_based_reasoning`;
- `d3_task_completeness`.

Each dimension uses an integer score from 0 to 2. Intervention Decision and Reassessment Plan additionally receive a safety severity label: `safe`, `minor`, `major`, or `critical`.

Level Three turn evaluation applies the same three dimensions to diagnosis and intervention decisions. A separate trajectory evaluation measures temporal evidence and response adaptation, and longitudinal management coherence.

The evaluator's raw output should be schema-validated before scores are aggregated. Application code should recompute total scores from validated dimension scores rather than trusting a model-generated total.

## Limitations

- AnesTRACE-Eval is a learned evaluator and can make scoring or calibration errors.
- Scores may be sensitive to prompt formatting, missing reference evidence, truncated candidate answers, and outputs that do not follow the expected schema.
- The model was optimized for the English AnesTRACE evaluation format. Performance on other languages, unrelated medical specialties, or arbitrary free-form judging tasks has not been established.
- Agreement with this evaluator does not establish clinical correctness or patient safety.
- The model must not be used as a medical device, for diagnosis or treatment, or as the sole basis for clinical, regulatory, or deployment decisions.
- High-stakes results should be reviewed by qualified clinicians, with disagreement analysis and human adjudication where appropriate.

## Data and privacy

The model is intended for evaluation on de-identified research data. Users are responsible for ensuring that inputs comply with applicable privacy, institutional, and data-governance requirements. Do not submit identifiable patient information.

## License

This model is released under the Apache 2.0 license, subject to the terms and restrictions of the Qwen3.5 base model and any applicable AnesTRACE data licenses.

## Citation

If you use AnesTRACE-Eval, please cite our work.

```bibtex
@misc{huang2026anestrace,
  title={AnesTRACE: Benchmarking Intraoperative Anesthesia from Multimodal Perception to Multi-step Decision-Making},
  author={Huang, Ziwei and Gao, Qi and Ji, Zhe and Yao, Yuanyuan and Zhang, Fengjiang and Yan, Min and Xie, Zhongle and Chen, Gang},
  year={2026},
  eprint={2609.32740},
  archivePrefix={arXiv},
  url={https://arxiv.org/abs/2609.32740}
}
```

## Acknowledgements

AnesTRACE-Eval was developed using Qwen3.5 and LLaMA-Factory. We thank the developers and maintainers of these projects.