CONTEXTOR: Contextualized High-order Contrastive Learning
Abstract
High-order relations involving multiple interacting entities are commonly encountered, particularly in biomedical domains. Existing relational learning methods typically learn static entity representations and assume symmetric relation inference, which can be inadequate for capturing context-dependent entity functions and the inherent asymmetry of high-order relations. In this paper, we propose Contextualized High-order Contrastive Learning (CONTEXTOR), a general and plug-and-play framework that formulates high-order relation inference as a dynamic query–response process. Specifically, CONTEXTOR decomposes each high-order relation into multiple incomplete query tuples and their corresponding response entities. Given a query tuple, we contextualize candidate response entity representations via an asymmetric conditional modulation, and align queries with their corresponding contextualized responses through multi-fold contrastive learning. Extensive experiments on benchmark datasets spanning multiple biomedical tasks demonstrate that CONTEXTOR consistently outperforms existing methods across diverse evaluation settings. Code is available at https://github.com/ZJUDataIntelligence/CONTEXTOR.
Lay Summary
Our work introduces CONTEXTOR, a method that helps computers understand complex relationships among drugs, genes, and medical side effects. Traditional approaches often assume static patterns and miss important context, which can lead to incorrect predictions. CONTEXTOR dynamically adjusts how it represents each entity depending on the situation, allowing it to make more accurate predictions even when data is sparse or incomplete. Experiments show that CONTEXTOR outperforms existing methods on biomedical datasets, and it can also be applied to other domains like financial networks or academic collaboration networks. This approach can help researchers identify new drug interactions and better understand biological mechanisms, potentially accelerating medical discoveries.