Personalized adaptive virtual reality experience driven by electroencephalography-based pain recognition

Background Non-pharmacological pain management represents an urgent clinical need. Emerging technologies such as virtual reality (VR) and electroencephalography (EEG)-based artificial intelligence (AI) offer promising avenues for objective pain assessment and adaptive therapeutic intervention. Purpose This study aims to develop and validate a real-time, closed-loop EEG-driven VR therapy system that classifies pain levels from brain signals and delivers personalized, avatar-guided therapeutic responses. Methods An open-source EEG dataset (51 participants; perception condition; laser-induced pain stimuli rated 0–100) was preprocessed using bandpass filtering, Independent Component Analysis (ICA), and AutoReject. Wavelet-based features (Daubechies-4, 5 levels) were extracted from 1-second epochs and used to train two gradient-boosting classifiers: XGBoost and LightGBM. Predicted pain levels were transmitted via HTTP POST requests to Unreal Engine 5.3.2, where a MetaHuman avatar delivered adaptive therapeutic responses. Results LightGBM achieved 97.89% classification accuracy (cross-validation: 95.78% ± 0.82%) and XGBoost achieved 97.25% (cross-validation: 96.09% ± 0.70%) across 11 pain classes (0–10), outperforming all comparable studies in the literature. Real-time avatar responses were demonstrated across three pain categories: Slight (1–3), Moderate (4–6), and Severe (7–10). Conclusion The study successfully demonstrates the technical feasibility of a closed-loop EEG-VR pain management system using lightweight machine learning models. The system achieves state-of-the-art pain classification accuracy with fine-grained 11-class granularity. Implications This system offers a scalable, drug-free alternative for pain management applicable in clinical and rehabilitation settings. The modular design facilitates future extensions, including emotional state tracking, haptic feedback, and reinforcement learning-based personalization.

Authors

Publication Details

Journal
PLoS ONE
Published
2026-08-24
DOI
https://doi.org/10.1371/journal.pone.0354510
Primary Topic
Pediatric Pain Management Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Personalized adaptive virtual reality experience driven by electroencephalography-based pain recognition

Ahmed Atif, Muhammed Hamdan, Sabrina Al Bukhari, Yacine Hadjiat et al.
PLoS ONE
Pediatric Pain Management Techniques
article

Personalized adaptive virtual reality experience driven by electroencephalography-based pain recognition

Ahmed Atif, Muhammed Hamdan, Sabrina Al Bukhari, Yacine Hadjiat, Jinane Mounsef, Ahmad Zahran, Anzif Anvaj
article en

Abstract

Background Non-pharmacological pain management represents an urgent clinical need. Emerging technologies such as virtual reality (VR) and electroencephalography (EEG)-based artificial intelligence (AI) offer promising avenues for objective pain assessment and adaptive therapeutic intervention. Purpose This study aims to develop and validate a real-time, closed-loop EEG-driven VR therapy system that classifies pain levels from brain signals and delivers personalized, avatar-guided therapeutic responses. Methods An open-source EEG dataset (51 participants; perception condition; laser-induced pain stimuli rated 0–100) was preprocessed using bandpass filtering, Independent Component Analysis (ICA), and AutoReject. Wavelet-based features (Daubechies-4, 5 levels) were extracted from 1-second epochs and used to train two gradient-boosting classifiers: XGBoost and LightGBM. Predicted pain levels were transmitted via HTTP POST requests to Unreal Engine 5.3.2, where a MetaHuman avatar delivered adaptive therapeutic responses. Results LightGBM achieved 97.89% classification accuracy (cross-validation: 95.78% ± 0.82%) and XGBoost achieved 97.25% (cross-validation: 96.09% ± 0.70%) across 11 pain classes (0–10), outperforming all comparable studies in the literature. Real-time avatar responses were demonstrated across three pain categories: Slight (1–3), Moderate (4–6), and Severe (7–10). Conclusion The study successfully demonstrates the technical feasibility of a closed-loop EEG-VR pain management system using lightweight machine learning models. The system achieves state-of-the-art pain classification accuracy with fine-grained 11-class granularity. Implications This system offers a scalable, drug-free alternative for pain management applicable in clinical and rehabilitation settings. The modular design facilitates future extensions, including emotional state tracking, haptic feedback, and reinforcement learning-based personalization.

PLoS ONEVol. 21(8)
Openalex Percentile: Top 6%
Pediatric Pain Management Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Personalized adaptive virtual reality experience driven by electroencephalography-based pain recognition — Ahmed Atif, Muhammed Hamdan, et al. · PLoS ONE (2026) | TGRS Research Map | TGRS