Abstract
BACKGROUND: Pain assessment disparities across demographic groups pose a significant healthcare challenge, with women, elderly patients, and racial minorities frequently experiencing inadequate treatment. Current pain evaluation relies predominantly on subjective self-reporting scales, which lack objective physiological biomarkers and can be influenced by communication barriers and provider bias, limiting their effectiveness for equitable and precise pain measurement. OBJECTIVES: This study investigates the development and validation of ECG-derived biomarkers for objective pain assessment through machine learning enhanced with explainable artificial intelligence (XAI), establishing a foundation for precision pain management that addresses existing healthcare disparities. METHODS: We implemented a dual-model machine learning architecture incorporating SHapley Additive exPlanations (SHAP) for transparent pain assessment using ECG biomarkers. The system employs a Random Forest Classifier for binary pain detection (CoVAS = 0 vs. CoVAS > 0) and a Random Forest Regressor for continuous pain intensity estimation (0-100 scale). Comprehensive feature extraction from ECG signals captured time-domain, frequency-domain, and heart rate variability parameters as candidate pain biomarkers. RESULTS: The classification model achieved 85.2% accuracy in distinguishing pain presence from pain-free states. Key validated biomarkers included ECG root mean square (RMS), peak-to-peak amplitude, and heart rate variability metrics. SHAP analysis provided transparent, interpretable insights into biomarker contributions, revealing complex interactions among cardiac parameters that reflect underlying pain physiology and establishing the explainability necessary for clinical trust and adoption. CONCLUSIONS: ECG-derived biomarkers analyzed through explainable machine learning offer a pathway toward objective, transparent pain assessment capable of addressing disparities in pain management. This approach identifies reliable physiological pain indicators from routinely collected cardiac signals, potentially enabling precision pain management in clinical settings where comprehensive multimodal monitoring systems are unavailable, thereby supporting more equitable healthcare delivery.