File size: 4,180 Bytes
acca3ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78cb345
 
 
acca3ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c44346
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
---
license: apache-2.0
language:
- en
base_model: convaiinnovations/laya
library_name: laya
pipeline_tag: text-classification
tags:
- laya
- non-autoregressive
- clinical-nli
- medical
- claim-verification
- evidence-intelligence
datasets:
- presencesw/mednli
model-index:
- name: ceis
  results:
  - task:
      type: text-classification
      name: Clinical Claim Verification & Evidence Intelligence (5-Question Multi-Task)
    dataset:
      name: MedNLI
      type: presencesw/mednli
      split: test
    metrics:
    - type: accuracy
      value: 0.7908
    - type: f1
      name: Macro F1
      value: 0.7930
---

# ceis

[IEEE Research Paper (PDF)](https://huggingface.co/reddyshailesh1/ceis/resolve/main/CEIS_IEEE_Paper.pdf) · [GitHub Codebase](https://github.com/reddyshailesh1/Ceis)


An advanced **Clinical Evidence Intelligence System (CEIS)** model built on top of [LAYA](https://github.com/NandhaKishorM/laya) (`convaiinnovations/laya`) and fine-tuned on **MedNLI** with multi-task supervision.

Unlike conventional generative LLMs or single-head classifiers, this model utilizes LAYA's **non-autoregressive System-1 decision architecture** to simultaneously evaluate five typed clinical reasoning questions in a single forward pass.

## 🩺 Evaluated Clinical Decision Primitives

For any clinical input pair (`claim`, `evidence`), the model evaluates:

1. **`verdict`** (*choice*): Entailment relationship between evidence and claim (`supported` | `unsupported` | `contradicted`).
2. **`explicitly_mentioned`** (*noul / boolean*): Does the clinical evidence explicitly address the claim topic? (`yes` | `no`).
3. **`needs_more_evidence`** (*noul / boolean*): Is additional clinical documentation required to reach a conclusion? (`yes` | `no`).
4. **`evidence_sufficiency`** (*score*): Continuous quantification ($0.0 \dots 1.0$) of evidence completeness.
5. **`inconsistency_severity`** (*score*): Clinical severity score ($0.0 \dots 1.0$) if a contradiction is detected.

## 🚀 Usage

Install the required library:
```bash
pip install laya
```

Run multi-question inference:
```python
import laya

# 1. Load the fine-tuned model
agent = laya.load("reddyshailesh1/ceis")

# 2. Define clinical state
state = {
    "claim": "Patient has elevated serum creatinine.",
    "evidence": "Admission labs notable for serum creatinine 2.1 mg/dL (baseline 0.8 mg/dL)."
}

# 3. Define questions
questions = {
    "verdict": {
        "type": "choice",
        "instructions": "Decide whether the cited text supports the claim.",
        "criteria": {
            "supported": "the cited text confirms the claim",
            "unsupported": "the cited text does not say enough to confirm or deny the claim",
            "contradicted": "the cited text states the opposite of the claim"
        }
    },
    "explicitly_mentioned": {
        "type": "noul",
        "instructions": "Does the evidence explicitly mention the topic of the claim?",
        "criteria": {
            "true": "the evidence explicitly addresses the claim",
            "false": "the evidence does not address the claim"
        },
        "labels": {"false": "no", "true": "yes"}
    }
}

# 4. Predict
results = agent.predict(state, questions)
print("Verdict:", results["answers"]["verdict"]["answer"])
print("Probabilities:", results["answers"]["verdict"]["probabilities"])
```

## 📊 Training Configuration

- **Base Checkpoint**: `convaiinnovations/laya` (multilingual)
- **Dataset**: MedNLI (`presencesw/mednli`)
- **Optimization**: AdamW, Learning Rate 2e-05, Warmup 0.06
- **Multi-task Loss**: Weighted cross-entropy (Verdict: 0.6, Explicitly Mentioned: 0.2, Needs More Evidence: 0.2)
- **Temperature Calibration**: Calibrated on held-out premise groups to guarantee reliable confidence scores.

## ⚠️ Clinical Disclaimer
This model is developed strictly for **research and clinical decision support evaluation**. It is not a certified medical device and must not be used as the sole basis for clinical diagnosis or treatment regimens. All outputs should be reviewed by qualified healthcare practitioners.

**Authors**: Shailesh Reddy (reddyshailesh1), Karthikeya (karthikeya3342)