Severity-Aware Weighted Loss for Arabic Medical Text Generation
Summary: arXiv:2604.06346v1 Announce Type: cross
Abstract: Large language models have shown strong potential for Arabic medical text generation; however, traditional fine-tuning objectives treat all medical cases uniformly, ignoring differences in clinical severity. This limitation is particularly critical in healthcare settings, where errors in severe cases contain higher clinical risk. In this work, we propose a severity-aware weighted loss for fine-tuning Arabic language models on medical complaint-response data.
The method depends on soft severity probabilities to dynamically scale token-level loss contributions during optimization, thereby prioritizing clinically critical interactions without modifying model architectures. Experiments are conducted using the MAQA dataset, which provides Arabic medical complaints and trusted human responses. Severity labels and probabilistic scores are automatically derived using a fine-tuned AraBERT-based classifier and incorporated exclusively at the loss level.
Key Features of the Proposed Approach
- Dynamic Scaling: The severity-aware loss function allows for dynamic adjustments to loss contributions based on the severity of medical cases.
- Integration with Existing Models: The approach does not require changes to model architectures, facilitating ease of implementation.
- Utilization of MAQA Dataset: The model leverages a comprehensive dataset containing Arabic medical complaints and responses to ensure relevance and accuracy.
Experimental Results
The proposed approach is evaluated across ten Arabic large language models of varying architectures and parameter scales. While standard cross-entropy fine-tuning yields only modest improvements, severity-aware optimization consistently achieves larger gains. The performance improvements observed with varying models are significant:
- AraGPT2-Base: Performance improved from 54.04% to 66.14%
- AraGPT2-Medium: Performance improved from 59.16% to 67.18%
- Qwen2.5-0.5B: Performance improved from 57.83% to 66.86%
With peak performance reaching 67.18%, the severity-aware fine-tuning approach delivers improvements of up to 12.10% over non-fine-tuned baselines, demonstrating robust and architecture-consistent gains.
Conclusion
In conclusion, the proposed severity-aware weighted loss method represents a significant advancement in Arabic medical text generation. By taking clinical severity into account, this approach enhances the reliability and safety of automated medical responses. The findings indicate that incorporating severity-aware optimization can lead to substantial improvements in performance across various language models, ultimately contributing to better healthcare solutions.
