MedEx: Enhancing Medical Question-Answering with First-Order Logic based Reasoning and Knowledge Injection

Aizan Zafar, Kshitij Mishra, Asif Ekbal


Abstract
In medical question-answering, traditional knowledge triples often fail due to superfluous data and their inability to capture complex relationships between symptoms and treatments across diseases. This limits models’ ability to provide accurate, contextually relevant responses. To overcome this, we introduce MedEx, which employs First-Order Logic (FOL)-based reasoning to model intricate relationships between diseases and treatments. We construct FOL-based triplets that encode the interplay of symptoms, diseases, and treatments, capturing not only surface-level data but also the logical constraints of the medical domain. MedEx encodes the discourse (questions and context) using a transformer-based unit, enhancing context comprehension. These encodings are processed by a Knowledge Injection Cell that integrates knowledge graph triples via a Graph Attention Network. The Logic Fusion Cell then combines medical-specific logical rule triples (e.g., co-occurrence, causation, diagnosis) with knowledge triples and extracts answers through a feed-forward layer. Our analysis demonstrates MedEx’s effectiveness and generalization across medical question-answering tasks. By merging logical reasoning with knowledge, MedEx provides precise medical answers and adapts its logical rules based on training data nuances.
Anthology ID:
2025.coling-main.649
Volume:
Proceedings of the 31st International Conference on Computational Linguistics
Month:
January
Year:
2025
Address:
Abu Dhabi, UAE
Editors:
Owen Rambow, Leo Wanner, Marianna Apidianaki, Hend Al-Khalifa, Barbara Di Eugenio, Steven Schockaert
Venue:
COLING
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
9701–9720
Language:
URL:
https://aclanthology.org/2025.coling-main.649/
DOI:
Bibkey:
Cite (ACL):
Aizan Zafar, Kshitij Mishra, and Asif Ekbal. 2025. MedEx: Enhancing Medical Question-Answering with First-Order Logic based Reasoning and Knowledge Injection. In Proceedings of the 31st International Conference on Computational Linguistics, pages 9701–9720, Abu Dhabi, UAE. Association for Computational Linguistics.
Cite (Informal):
MedEx: Enhancing Medical Question-Answering with First-Order Logic based Reasoning and Knowledge Injection (Zafar et al., COLING 2025)
Copy Citation:
PDF:
https://aclanthology.org/2025.coling-main.649.pdf