WSFE: Wasserstein Sub-graph Feature Encoder for Effective User Segmentation in Collaborative Filtering

Yankai Chen, Yifei Zhang, Menglin Yang, Zixing Song, Chen Ma, Irwin King

Abstract

Collaborative Filtering (CF) models excel at user-item matching but often fail to capture user-user similarity, hindering effective user segmentation. We present WSFE (Wasserstein Sub-graph Feature Encoder), a training-free, model-agnostic encoder that leverages Optimal Transport theory. By treating user subgraphs as feature distributions and utilizing Sliced-Wasserstein distances, WSFE transforms pre-trained embeddings into a space where Euclidean distance reflects behavioral similarity. Experimental results across six datasets demonstrate significant improvements in segmentation performance without retraining.

Introduction

In modern recommender systems, Collaborative Filtering (CF) is the dominant paradigm. Models like LightGCN map users and items into a shared embedding space to predict interactions. However, these models primarily optimize for alignment—ensuring a user's vector is close to preferred items—often at the expense of user-wise similarity. Consequently, users with nearly identical behavioral patterns may end up far apart in the latent space, complicating tasks like user segmentation for targeted advertising or group recommendations.

Traditionally, addressing this requires redesigning loss functions and retraining models from scratch. We introduce WSFE (Wasserstein Sub-graph Feature Encoder), a "plug-and-play" solution from researchers at The Chinese University of Hong Kong. WSFE improves user segmentation by ensuring that Euclidean distances between embeddings reflect true behavioral similarity without requiring any retraining.

Methodology

The core innovation of WSFE lies in viewing a user’s preference not as a single point, but as a distribution of interests manifested through their interaction subgraph.

Subgraph Feature Distribution

WSFE analyzes the latent features of a user’s neighbors across multiple hops in the interaction graph. These features are treated as an empirical probability distribution. Users with similar tastes naturally exhibit overlapping subgraph patterns.

Overview of the WSFE framework: (A) Unfolding user-item interactions into overlapping sub-graph patterns and (B) mapping input embeddings to a reference space.

Optimal Transport and Sliced-Wasserstein Distance

To compare these distributions, WSFE employs the Wasserstein distance (Earth Mover's Distance). Because calculating the exact Wasserstein distance in high-dimensional spaces is computationally prohibitive, WSFE utilizes the Sliced-Wasserstein (SW) approximation. By projecting high-dimensional distributions onto multiple random 1D lines, the calculation becomes efficient and scalable.

The Encoder Transformation

WSFE acts as a transformation layer for pre-trained embeddings (e.g., from LightGCN). It permutes and encodes these vectors such that the resulting Euclidean distance in the new space approximates the Wasserstein distance between the original subgraphs. This process is entirely training-free and can be applied on-the-fly to existing models.

Experimental Evaluation

The authors evaluated WSFE across six diverse datasets: MovieLens (1M), Kindle, Gowalla, Pinterest, Yelp2018, and AMZ-Book. The encoder was integrated with six state-of-the-art backbone models, including LightGCN, SimGCL, and NCL.

Key Results

WSFE demonstrated substantial performance gains across all tested scenarios:

  • Segmentation Accuracy: On MovieLens with LightGCN, WSFE improved Recall@5 by 80% and NDCG@5 by 69%.
  • Model Agnosticism: Performance improved for every backbone model and dataset, highlighting the general utility of the approach.
  • Efficiency and Robustness: The method scales linearly with data size. Sensitivity analysis revealed that using 64 slices provides an optimal balance between accuracy and computational overhead.
Impact of the number of slices on segmentation performance (Recall and NDCG), showing convergence around 64 slices.

Conclusion

WSFE provides a powerful, training-free bridge between Optimal Transport theory and practical recommendation tasks. By encoding subgraph distributions into similarity-aware embeddings, it enables high-quality user segmentation for pre-trained models. Future work may explore joint optimization of the backbone and encoder to further enhance performance across diverse information retrieval domains.

Summary updated

BibTeX
@inproceedings{chen2023wsfe,
  author = {Yankai Chen and Yifei Zhang and Menglin Yang and Zixing Song and Chen Ma and Irwin King},
  title = {{WSFE: Wasserstein Sub-graph Feature Encoder for Effective User Segmentation in Collaborative Filtering}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2023},
}
Figure