Medical image classification by incorporating clinical variables and learned features

Jiahui Liu, Xiaohao Cai, Mahesan NiranjanRoyal 2025

TL;DR

This paper introduces a novel method for medical image classification that combines deep learning-extracted image features with patient clinical variables. By using Discriminant Analysis (DA) for dimensionality reduction and a new Class Activation Map (CAM) technique, the approach achieves improved classification accuracy and interpretability, especially in data-scarce scenarios.

What Problem Does This Paper Address?

Interpreting medical images, like X-rays, is a complex task for radiologists. While deep learning models excel at extracting features from images, they often overlook crucial clinical information (patient history, lab results, etc.) that human experts heavily rely on. This can lead to misdiagnoses, especially when medical datasets are small, a common issue due to privacy and cost. Existing methods that try to combine image and clinical data often struggle with information overload or fail to effectively integrate these disparate data types. The paper aims to bridge this gap by creating a more holistic diagnostic model that mimics the human approach.

Methods

The core of the proposed method involves several key steps:

  1. Feature Extraction: A pre-trained deep neural network (like ResNet18, VGGNet16, or ViT) is used as a feature extractor. This leverages knowledge learned from large natural image datasets to capture meaningful patterns in medical images without requiring extensive fine-tuning.
  2. Dimensionality Reduction (DA): The high-dimensional features extracted from the images are then subjected to Discriminant Analysis (DA). Unlike Principal Component Analysis (PCA), DA is specifically designed to maximize class separability, preserving discriminative information while reducing dimensionality. This is crucial when the number of data samples is comparable to or smaller than the feature dimension.
  3. Feature Fusion: The dimension-reduced image features are then combined with clinical variables. Two fusion strategies are explored: simple concatenation and a more advanced approach using BERT for clinical variable embeddings (though the former proved more effective in this study).
  4. Classification: The fused feature vector is fed into a classifier, such as a Support Vector Machine (SVM) or a fully connected layer, for the final prediction.
  5. Class Activation Mapping (CAM): A novel CAM technique is developed to visualize which regions of the dimension-reduced feature space are most influential for classification. This provides insights into the model's decision-making process and helps interpret its focus.

Datasets

The study evaluates the proposed method on four publicly available medical imaging datasets:

  • Montgomery Dataset: Chest X-rays for tuberculosis detection (binary classification). Clinical variables: age and gender.
  • Shenzhen Dataset: Chest X-rays for tuberculosis detection (binary classification). Clinical variables: age and gender.
  • Diverse Dermatology Images (DDI) Dataset: Skin lesion images with varying skin tones. Clinical variables: skin tone.
  • PAD-UFES-20 Dataset: Skin lesion images for classifying various skin lesions. Clinical variables: skin tone, alcohol/tobacco consumption, and age.

The paper notes that images from these datasets were resized to specific dimensions (512x512, 224x224, or 384x384) depending on the pre-trained network used.

Key Insights and Ideas

  • Clinical Variables Matter: The study strongly reinforces that incorporating clinical variables significantly improves classification performance, especially when combined with effective dimensionality reduction. This aligns with how human experts diagnose.
  • DA's Superiority: Discriminant Analysis (DA) proves to be a more effective dimensionality reduction technique than PCA for this task. DA's focus on maximizing class separability is key to preserving discriminative information, leading to better performance.
  • Dimensionality Reduction is Crucial: Directly concatenating high-dimensional image features with clinical variables often leads to the clinical information being overshadowed. Reducing the dimensionality of image features before fusion is essential for a balanced and effective model.
  • Interpretable AI in Medicine: The development of a CAM that visualizes focus on dimension-reduced features is a significant step towards making deep learning models more transparent and trustworthy in clinical settings. This helps bridge the gap between AI predictions and radiologists' assessments.

Key Results

The proposed method, using DA for dimensionality reduction and incorporating clinical variables, consistently outperformed other approaches across all four datasets and both accuracy (ACC) and AUC metrics.

  • Accuracy Gains: For example, on the Montgomery dataset, the proposed "DA + CV" method achieved an ACC of 0.85 ± 0.08, compared to 0.82 ± 0.08 for "DA" alone and 0.70 ± 0.06 for "PCA + CV". Similar improvements were observed across all datasets and metrics.
  • CAM Effectiveness: Visualizations (Figure 2 and 3) show that the CAMs generated by the proposed method highlight regions more consistent with expert annotations and focus more precisely on relevant anatomical areas compared to methods using original or PCA-reduced features. This suggests better localization and interpretability.
  • SVM vs. Fully Connected: The SVM classifier generally performed slightly better than a simple fully connected layer, though the latter was useful for CAM generation.

Limitations and Future Work

The authors acknowledge several limitations and suggest future directions:

  • Limited Clinical Variables: The datasets used had relatively simple clinical variables. The authors hypothesize that more complex and varied clinical data might benefit from more advanced text embedding techniques like BERT in their second fusion strategy.
  • CAM Visualization: While the developed CAM visualizes focus on dimension-reduced features, it doesn't directly visualize the influence of the clinical data itself, as the clinical data is not directly linked to the pre-trained deep neural networks.
  • Generalizability: The study focused on specific diseases (tuberculosis and dermatology). Future work could explore the method's applicability to a wider range of medical imaging tasks and diseases.
  • Practical Applicability: The primary goal was to improve practical applicability and interpretability, not just marginal accuracy gains. Future work could further validate this in real-world clinical workflows.

Summary updated

Abstract

Medical image classification plays an important role in medical imaging. In this work, we present a novel approach to enhance deep learning models in medical image classification by incorporating clinical variables without overwhelming the information. Unlike most existing deep neural network models that only consider single-pixel information, our method captures a more comprehensive view. Our method contains two main steps and is effective in tackling the extra challenge raised by the scarcity of medical data. Firstly, we employ a pre-trained deep neural network served as a feature extractor to capture meaningful image features. Then, an exquisite discriminant analysis is applied to reduce the dimensionality of these features, ensuring that the low number of features remains optimized for the classification task and striking a balance with the clinical variables information. We also develop a way of obtaining class activation maps for our approach in visualizing models' focus on specific regions within the low-dimensional feature space. Thorough experimental results demonstrate improvements of our proposed method over state-of-the-art methods for tuberculosis and dermatology issues for example. Furthermore, a comprehensive comparison with a popular dimensionality reduction technique (principal component analysis) is also conducted.
BibTeX
@inproceedings{liu2025medical,
  author = {Jiahui Liu and Xiaohao Cai and Mahesan Niranjan},
  title = {{Medical image classification by incorporating clinical variables and learned features}},
  booktitle = {Royal},
  year = {2025},
  doi = {10.1098/rsos.241222},
}
Figure