Pathwise Alignment for Collaborative Filtering: Bilateral Conditional Flow Regularization

Zhiwei Li, Guodong Long, Chengqi Zhang, Jing JiangarXiv 2026 · arXiv

TL;DR

Pathwise Alignment for Collaborative Filtering (PACF) is a novel regularization framework that supercharges standard Matrix Factorization (MF) by supervising the entire "trajectory" between user and item embeddings. By training a shared neural network to model these paths during training and then discarding it, PACF provides powerful cross-user constraints that significantly boost performance on sparse datasets without adding a single millisecond to inference time.

What Problem Does This Paper Address?

Collaborative filtering (CF) is the backbone of modern recommendation systems, aiming to predict user-item interactions from implicit feedback (like clicks or views). A classic approach is Matrix Factorization (MF) trained with Bayesian Personalized Ranking (BPR) loss.

However, BPR has a fundamental limitation: it only updates a user's embedding based on their own observed items and sampled negatives. In the real world, data is often incredibly sparse—most users interact with only a tiny fraction of available items. This leaves the embedding geometry largely unconstrained. While graph-based methods (like LightGCN) address this by propagating signals through the interaction graph, they often introduce significant computational overhead. The authors sought a way to impose "cross-user" constraints—letting users learn from the preferences of others—while maintaining the lean, high-speed inference of a simple MF model.

Methods

PACF introduces a training-time regularizer inspired by Flow Matching. Instead of just supervising a scalar similarity score at the endpoints, PACF supervises the directional path between a user representation ($\mathbf{p}_u$) and an item representation ($\mathbf{q}_i$).

Figure 1: Comparison of supervision in unit space. The left panel shows scalar endpoint supervision. The right panel shows PACF fitting signed displace- ments at sampled states along user-item segments. PACF thus supervises the whole path from each user to its item instead of one endpoint score.

Key components include:

  • Bilateral Conditional Flow (BCF): For every training pair, PACF defines a straight-line segment. It trains a shared velocity network ($v_\theta$) to predict the "step" needed to move along this segment. For positive items, the target points toward the item; for negative items, it points back toward the user (repulsion).
  • Trajectory Consistency: Beyond local velocity, PACF uses an ODE solver (specifically, a 4th-order Runge-Kutta or RK4) to integrate the predicted path. It ensures that the path starting at the user embedding actually terminates at the observed item embedding.
  • Gradient Amortization: This is the "secret sauce." The shared network fits the targets for all training pairs. Through backpropagation, the information learned by this shared network is "amortized" into the static embeddings.
  • Zero-Cost Inference: Once training is complete, the velocity network and ODE solver are discarded. Recommendations are made using a simple inner product, exactly like standard MF.
Figure 2: Framework of PACF. Left: Training fits the shared velocity network to the signed BCF targets at states ht sam- pled on the reference segment. A trajectory consistency term on positive pairs pulls the RK4 endpoint Φ1(pu) toward qi+, so negative pairs enter the pathwise losses only through the flow matching term. Right: Inference discards the network and scores by inner product. PACF thus adds cost only dur- ing training and ranks with the same efficiency as MF.

Datasets

The authors evaluated PACF across seven diverse public datasets with varying levels of sparsity:

  • Movies: MovieLens-latest-small (ML)
  • Short-Video: Bili_Food, Bili_Dance
  • Business: Yelp2018
  • E-commerce: Amazon Baby, Sports, and Clothing

Sparsity levels ranged from 95.95% (ML) to a staggering 99.97% (Clothing).

Key Insights and Ideas

  • The Power of Sharing: The velocity network is shared by all users and items. The authors prove (Proposition 2) that if this network has bounded sensitivity (Lipschitz continuity), it can only accurately fit two users who like the same item if their embeddings are close. This forces the model to discover global structure even from sparse local data.
  • Path vs. Point: Traditional BPR is like looking at a map and only seeing the start and end points. PACF is like following the road; by supervising every step of the way, the model learns a much more robust embedding geometry.
  • Bilateral Supervision: Most flow-based models only focus on "attraction." PACF shows that "repulsion" (pushing away from negative samples along the path) is a critical regularizer that prevents embedding collapse.

Key Results

PACF consistently outperformed eleven baselines, including state-of-the-art discriminative models (LightGCN, SimGCL) and generative models (DiffRec, FlowCF).

  • Universal Superiority: PACF achieved the highest Recall@10 and NDCG@10 on all seven datasets.
  • Sparse Data Champion: The relative gains were most dramatic on the sparsest datasets. On the Amazon Clothing dataset, PACF improved Recall@10 by over 300% compared to standard BPR-MF.
  • Efficiency: Despite the complex training objective, PACF maintains the same inference latency as MF, making it significantly faster at serving recommendations than generative or heavy graph-based baselines.

Limitations and Future Work

  • Euclidean Assumption: The current model assumes straight-line paths in Euclidean space. The authors suggest that exploring non-Euclidean geometries (like hyperbolic space) could be a fruitful direction.
  • Training Complexity: While inference is fast, training is more computationally expensive than standard MF due to the ODE solver steps. However, the authors found that even a single integration step ($T=1$) provides most of the benefits.
  • Integration with Graphs: A natural next step is combining PACF's pathwise alignment with explicit graph encoders to see if the benefits are additive.

Summary updated

Abstract

Collaborative filtering predicts user-item interactions from implicit feedback. We focus on matrix factorization (MF) trained with the Bayesian Personalized Ranking loss. This loss updates each user embedding only through that user's observed items and sampled negatives, so sparse feedback gives MF few constraints. To constrain each user through other users, we propose Pathwise Alignment for Collaborative Filtering (PACF), which trains MF with one network shared by all training pairs. At points between user and item embeddings, a flow matching term trains the network to predict the user-to-item step, reversed and scaled for sampled negatives. A trajectory consistency term pulls each user's predicted path to end at the observed item. Both terms update the embeddings, so the network is discarded after training, thereby maintaining the efficiency of MF at inference. We prove that a network with bounded sensitivity to its input point accurately fits users who share an item only if their embeddings are close, so these users constrain one another. Against eleven discriminative and generative baselines, PACF achieves the highest performance on all seven datasets. Its relative gains over MF are largest where feedback is sparsest. The shared network thus supplies the missing constraints through other users.
BibTeX
@misc{li2026pathwise,
  author = {Zhiwei Li and Guodong Long and Chengqi Zhang and Jing Jiang},
  title = {{Pathwise Alignment for Collaborative Filtering: Bilateral Conditional Flow Regularization}},
  year = {2026},
  eprint = {2610.15506},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.15506},
}
Figure