Hypergraph Pattern Machine: Compositional Tokenization for Higher-Order Interactions
For researchers and practitioners working with hypergraph-structured data (e.g., drug safety), HGPM provides a principled way to model higher-order compositional signals, addressing a critical limitation of existing message-passing methods.
The paper introduces the Hypergraph Pattern Machine (HGPM), a new paradigm that models interaction compositionality in hypergraphs by tokenizing subsets and using an inclusion-aware Transformer. HGPM matches or exceeds state-of-the-art on ten benchmarks and uniquely identifies inhibitory drug interactions that existing methods miss.
Hypergraphs model higher-order relations that drive real-world decisions, from drug prescriptions to recommendations. A central structural signal in such data, beyond what pairwise relations can express, is interaction compositionality: whether a higher-order relation is compositional, emergent, or inhibitory with respect to its observed or unobserved sets. In polypharmacy, the regime decides whether a drug should be dropped, kept, or excluded: a compositional drug triple can be safely simplified, an emergent triple requires all drugs jointly, and an inhibitory triple flags a drug that disrupts an existing interaction. However, existing hypergraph learning methods, which merely propagate messages over observed hyperedges, leave this compositional signal unmodeled, allowing dangerous drug combinations to slip through and be misclassified. To this end, we propose the Hypergraph Pattern Machine (HGPM), shifting the paradigm from message passing to learning the compositional pattern of subsets. It tokenizes compositional subsets, organizes them in an inclusion DAG, and trains an inclusion-aware Transformer under masked reconstruction. On ten hypergraph benchmarks, HGPM matches or exceeds state-of-the-art methods. Notably, in a real adverse-event prediction case, HGPM correctly identifies the drug addition that inhibits the side effect among feature-identical candidates, a discrimination existing methods cannot make. The code and data are in https://github.com/KryieZhao/HGPM.git.