Attention-guided hybrid transformer-ensemble framework for emotional vulnerability detection in cancer patient and caregiver narratives

Understanding the emotional vulnerability of cancer patients and caregivers is critical for improving psychological support and clinical intervention strategies. With the rapid growth of online health communities, large volumes of textual narratives describing treatment experiences and emotional struggles have become available for computational analysis. However, accurately capturing emotional intensity and contextual sentiment in such narratives remains challenging due to the complex linguistic patterns present in health-related discussions. This study proposes an attention-guided hybrid transformer-ensemble learning framework for emotional vulnerability detection in cancer-related social media posts. The proposed architecture integrates domain-adapted contextual representations generated by BioBERT with linguistic intensity features to capture both semantic context and emotional strength. An attention-based feature fusion mechanism dynamically combines these heterogeneous features to produce enriched representations of patient narratives. The fused representations are subsequently utilized by multiple optimized machine learning classifiers, including XGBoost, LightGBM, Random Forest, and CatBoost. Hyperparameter optimization is performed using the Optuna framework to improve predictive performance. Furthermore, ensemble learning strategies such as soft voting, hard voting, and stacking are employed to combine the predictions of the base classifiers. Experiments conducted on a held-out split of a publicly available dataset of 10,391 posts from cancer patients and caregivers demonstrate that ensemble approaches consistently outperform individual classifiers on this data. The stacking ensemble achieves an accuracy of 0.76 and an ROC-AUC of 0.91, outperforming its own individual base classifiers but not a fine-tuned BioBERT baseline (accuracy 0.77, ROC-AUC 0.92) evaluated on the same split; a TF-IDF with linear SVM baseline is also competitive (accuracy 0.763). The framework’s practical advantage over full BioBERT fine-tuning is therefore computational rather than purely predictive: it reuses frozen BioBERT features and adds a lightweight, interpretable attention-fusion and tree-ensemble stage at a fraction of the training cost, while an ablation study confirms that the attention-based fusion of contextual and lexical-intensity signals meaningfully outperforms either signal alone or their simple concatenation. The proposed framework thus provides a scalable, lower-cost computational approach that can support mental health monitoring and early intervention systems in online healthcare communities, at a modest accuracy cost relative to full transformer fine-tuning.

Authors

Institutions

Publication Details

Journal
Discover Informatics
Published
2026-10-14
DOI
https://doi.org/10.1007/s44564-026-00028-9
Primary Topic
Mental Health via Writing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Attention-guided hybrid transformer-ensemble framework for emotional vulnerability detection in cancer patient and caregiver narratives

Md. Siam Ansary
Discover Informatics
Mental Health via Writing
article

Attention-guided hybrid transformer-ensemble framework for emotional vulnerability detection in cancer patient and caregiver narratives

Md. Siam Ansary
article en

Abstract

Understanding the emotional vulnerability of cancer patients and caregivers is critical for improving psychological support and clinical intervention strategies. With the rapid growth of online health communities, large volumes of textual narratives describing treatment experiences and emotional struggles have become available for computational analysis. However, accurately capturing emotional intensity and contextual sentiment in such narratives remains challenging due to the complex linguistic patterns present in health-related discussions. This study proposes an attention-guided hybrid transformer-ensemble learning framework for emotional vulnerability detection in cancer-related social media posts. The proposed architecture integrates domain-adapted contextual representations generated by BioBERT with linguistic intensity features to capture both semantic context and emotional strength. An attention-based feature fusion mechanism dynamically combines these heterogeneous features to produce enriched representations of patient narratives. The fused representations are subsequently utilized by multiple optimized machine learning classifiers, including XGBoost, LightGBM, Random Forest, and CatBoost. Hyperparameter optimization is performed using the Optuna framework to improve predictive performance. Furthermore, ensemble learning strategies such as soft voting, hard voting, and stacking are employed to combine the predictions of the base classifiers. Experiments conducted on a held-out split of a publicly available dataset of 10,391 posts from cancer patients and caregivers demonstrate that ensemble approaches consistently outperform individual classifiers on this data. The stacking ensemble achieves an accuracy of 0.76 and an ROC-AUC of 0.91, outperforming its own individual base classifiers but not a fine-tuned BioBERT baseline (accuracy 0.77, ROC-AUC 0.92) evaluated on the same split; a TF-IDF with linear SVM baseline is also competitive (accuracy 0.763). The framework’s practical advantage over full BioBERT fine-tuning is therefore computational rather than purely predictive: it reuses frozen BioBERT features and adds a lightweight, interpretable attention-fusion and tree-ensemble stage at a fraction of the training cost, while an ablation study confirms that the attention-based fusion of contextual and lexical-intensity signals meaningfully outperforms either signal alone or their simple concatenation. The proposed framework thus provides a scalable, lower-cost computational approach that can support mental health monitoring and early intervention systems in online healthcare communities, at a modest accuracy cost relative to full transformer fine-tuning.

Discover InformaticsVol. 1(1)
Ahsanullah University of Science and Technology (BD)
Openalex Percentile: Top 8%
Mental Health via Writing
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.