Medical sentiment analysis

Information on the medical sentiment has been suggested for predicting risks of developing diseases and others. This project aims to study the opportunities of transformer-based models for analysing medical sentiments.


  • Lead school School of Engineering and Computer Science
  • Institute Institute for Patient-centered Digital Health (PCDH)
  • Funding organisation Others
  • Duration (planned) 01.08.2023 - 31.07.2024
  • Project management Prof. Dr. Kerstin Denecke
  • Head of project Prof. Dr. Kerstin Denecke
  • Project staff Daniel Reichenpfader
  • Partner Hasler Stiftung
  • Keywords Artificial intelligence, medical sentiment analysis, prediction


Sentiment analysis deals with extracting information about opinions, sentiments, and even emotions conveyed by writers towards topics of interest. Often, it is directly associated with analysing subjective texts such as customer reviews or tweets with the aim of studying the attitude of a writer towards a product or subject. However, sentiment analysis gained in interest also in the healthcare domain with multiple application areas. Methods for analysing sentiment have been applied to (medical) social media data supporting researchers in learning more about diseases, perceptions and needs of patients and their caregivers. Beyond, clinical narratives are increasingly used as subject of analysis by medical sentiment analysis methods. Recognising that clinical notes and other free textual documents that are part of the electronic health record may contain valuable information, information on medical sentiment has been used for predicting risks of developing mental diseases, for gathering patient reported outcomes or for pharmacovigilance.

Course of action

Deep learning algorithms are rising techniques in sentiment analysis in other domains (e.g., Attention mechanism, transformer-based models and gated multiplication (Gated CNN)) and they are widely used to realise sentiment analysis in the general domain, i.e. outside the medical context. However, those newly emerged methods have not yet been tested with clinical narratives as a recent scoping review of the applicant demonstrated. This is probably the reason for the limited accuracy of state-of-the-art sentiment analysis methods reported for clinical narratives compared to accuracy values for other domains. Additionally, it was recognized that the solutions are still not reaching a Technology Readiness Level (TRL) required for a real-world application (typically, TRL of 7). This project will contribute to lift medical sentiment analysis of clinical narratives to the next level of TRL by developing algorithms based on recent technological advances and test for concrete prediction use cases.


The project will result in in-depths insights into the applicability and performance of these technologies. The specific challenges we have to address include small datasets and the content and language peculiarities of clinical narratives. When we can demonstrate the usefulness of transformer-based models, we plan to establish a follow-up project targeting a real-world application.

This project contributes to the following SDGs

  • 3: Good health and well-being