Introduction
Medical Visual Question Answering (VQA) is a critical task in healthcare AI, assisting clinicians by extracting relevant information from medical images through natural language queries. These queries generally fall into two categories: close-ended (e.g., "Yes/No" questions) and open-ended (e.g., "What is the abnormality?"). Historically, models have relied on either classification-based approaches—which are stable but struggle with the complexity of open-ended answers—or generation-based approaches—which are flexible but prone to "hallucinating" incorrect medical terminology.
In this paper, we present Q2ATransformer, a "semi-open" framework that bridges this gap. By integrating a Transformer decoder with learnable candidate answer embeddings, the model provides a unified treatment for both question types, achieving state-of-the-art (SOTA) performance on major benchmarks.
The Q2ATransformer Architecture
The Q2ATransformer architecture is designed to capture fine-grained medical details while maintaining a structured search space for answers. It consists of three primary components:
- Visual-Question Encoder: The model utilizes a Swin Transformer to process medical images, capturing hierarchical spatial features more effectively than standard CNNs. Simultaneously, a BERT model encodes the input questions into linguistic features.
- Cross-modality Attention Network (CMAN): Rather than using simple fusion techniques like bilinear pooling or matrix multiplication, CMAN concatenates the image and text features. These concatenated features are passed through Transformer encoder layers, allowing the model to learn complex, multi-modal relationships between specific image regions and textual tokens.
- Answer Querying Decoder: This is the core innovation. The model maintains a set of learnable candidate answer embeddings that act as "queries" in a Transformer decoder.
Bridging Classification and Generation
The "Answer Querying" mechanism allows the model to "interrogate" the fused image-question features to determine the presence of a specific answer class. While the model ultimately performs classification by selecting from a candidate pool, the querying process mimics the attention mechanisms found in generative models. This allows the model to learn why an answer is relevant based on the context of the image and question, rather than simply memorizing a mapping.
To address the inherent class imbalance in medical datasets—where simple "Yes/No" answers often dominate—the authors implemented an Asymmetric Loss. This variant of focal loss ensures that the model remains sensitive to rare but clinically significant open-ended answers, preventing the model from being biased toward the most frequent responses.
Experimental Results
The Q2ATransformer was evaluated on two primary benchmarks: VQA-RAD (radiology) and PathVQA (pathology). The results demonstrate a significant leap over previous SOTA models, particularly in the challenging open-ended category.
- VQA-RAD: The model achieved an overall accuracy of 80.48%. Notably, it reached 79.19% on open-ended questions, representing a 16.09% absolute improvement over the previous best model, MMBERT.
- PathVQA: On this larger pathology dataset, the model achieved an overall accuracy of 74.61%. The improvement in open-ended questions was even more dramatic, reaching 54.85%—a 41.45% absolute improvement over the previous SOTA, MMQ.
Conclusion and Future Work
Q2ATransformer successfully demonstrates that treating answer classes as active queries within a Transformer decoder can significantly improve medical VQA performance. By combining the stability of classification with the contextual awareness of generation, the model sets a new standard for the field.
While the current approach is highly effective, the computational cost of querying every possible answer embedding may scale poorly with extremely large answer sets. Future research will likely explore dynamic sparse attention mechanisms to maintain this high level of accuracy while improving scalability for datasets with tens of thousands of unique answers.
Summary updated