Cardinality-Decomposed Loss for Heterogeneous GNNs
Parul Maheshwari ⋅ Amulya Paruchuri ⋅ Alireza Sahami Shirazi
Abstract
Heterogeneous Graph Neural Networks for recommendation often express relations of different cardinality: user-item preferences are one-to-many while user-attribute links are one-to-one. Standard practice applies a single loss - typically Bayesian Personalized Ranking (BPR) - to all edge types. While BPR works well for ranking, we find that it causes one-to-one attribute embeddings to collapse to near-random geometry - a silent failure invisible to standard ranking metrics that in turn degrades user representations for downstream tasks. We propose Cardinality-Decomposed Loss (CDL), which assigns Cross Entropy to one-to-one and BPR to one-to-many edges, and confirm that the two losses produce competing gradients in the shared encoder. Across five datasets spanning two structural configurations and evaluated with $n{=}5$ seeds and a held-out probe, CDL consistently recovers attribute discriminability; its contribution is this attribute-representation recovery at neutral ranking cost, not a joint ranking win. A $\lambda$-sweep reveals that dataset behaviour can be described by two graph properties - semantic alignment (whether the attribute is predictive of preference) and topology leakage (whether message passing already encodes attribute structure) - which together explain the qualitatively different trade-off regimes we observe.
Successful Page Load