# Cardinality-Decomposed Loss for Heterogeneous GNNs

*Parul Maheshwari, Amulya Paruchuri, Alireza Sahami Shirazi*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150315) · [Open on the map](../papers.html#p150315)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Generative Recommendation](../pgroup/411.md) · Type: new method · Keywords: heterogeneous GNN, loss decomposition, attribute embedding, recommendation systems, graph neural networks

Areas: [Graph Learning](../areas/graph-learning.md) › Graph Analysis Methods › Graph Neural Network Architectures

## Summary
Cardinality-Decomposed Loss (CDL) addresses the collapse of attribute embeddings in heterogeneous GNNs by combining cross-entropy and BPR losses to jointly optimize relations across different cardinalities.

## Explained to a 5-year-old
In recommendation apps, people and things are linked like friends in a game. Sometimes there are also links to extra info, like a user's favorite color. If we only use one rule to learn from these links, the extra info can become useless. This hidden problem makes the recommendations less accurate without us noticing. The paper suggests using two different rules to keep both the item and extra info useful.

## Explained to a 5-year-old, longer
In many apps that suggest movies or products, they use a kind of picture of how people like things. These pictures are made by looking at connections between users and items, like who liked what. Sometimes there are also connections to other facts, like a user's age or favorite genre. If we only use one rule to learn from all these connections, the extra facts can become random and not helpful. This hidden problem can make the suggestions less good, but we often don't notice because the main ranking looks fine. The researchers noticed that the extra facts were collapsing, which could hurt other tasks like grouping users. They found that the problem happens because the rule used for items (called BPR) is different from the rule used for facts (called cross-entropy). The paper proposes to split the learning rule into two parts, one for items and one for facts, and combine them. This way, both the item recommendations and the extra facts are learned together without hurting each other. They tested this new idea on several datasets of movies, music, payments, books, and restaurants. The new method improved how well the extra facts were represented and also helped recommendations when the facts were useful. By adjusting a balance parameter, they could decide how much importance to give to each part depending on the data.

## For a technical reader
The paper observes that graph neural networks used in recommendation systems often suffer from a hidden failure: attribute embeddings (like user demographics) collapse to random values when a single loss function is applied. This collapse goes unnoticed because standard ranking metrics focus on item recommendations and do not capture attribute quality. The authors propose a loss decomposition that combines cross-entropy and Bayesian Personalized Ranking objectives to jointly optimize embeddings for both one-to-many (user-item) and one-to-one (user-attribute) relations. Experiments on five real-world datasets show consistent improvements in attribute discriminability and, when attributes carry useful signals, better ranking performance measured by NDCG. A simple lambda parameter balances the two objectives, and the results indicate that performance depends on two graph properties: how well attributes predict preferences and how much topology already leaks attribute information.

## Problem
Graph Neural Networks on heterogeneous bipartite graphs often use a single loss function like BPR, which works well for recommendation but causes attribute embeddings to collapse, degrading downstream tasks. This hidden failure remains invisible to standard ranking metrics.

## Method
The approach decomposes the loss across relation cardinalities, combining cross-entropy and Bayesian Personalized Ranking objectives to jointly optimize embeddings for both one-to-many and one-to-one relations. It also analyzes the conflict between these losses in the shared encoder and introduces a lambda parameter to balance them based on graph properties.

## Results
The approach improves attribute embedding discriminability across all five datasets and yields NDCG gains when attributes are predictive of preferences, while a lambda sweep shows performance depends on semantic alignment and topology leakage.

## Contributions
The work identifies the silent collapse of attribute embeddings caused by using a single loss on heterogeneous graphs and proposes a loss decomposition that jointly optimizes for different relation cardinalities. It also provides analysis of the trade-off between cross-entropy and BPR objectives and links performance to graph properties.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150315)
