NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Compositional Coding for Collaborative Filtering

Chenghao Liu, Tao Lu, Xin Wang, Zhiyong Cheng, Jianling Sun, Steven C. H. Hoi

Introduction

Modern recommender systems face a fundamental trade-off between accuracy and efficiency. Matrix Factorization (MF) provides high-fidelity representations using real-valued vectors but incurs significant computational costs during "top-K" retrieval due to heavy floating-point operations. Conversely, Binary Hashing offers lightning-fast retrieval via bitwise operations in Hamming space but often suffers from a "representation crisis," where the discrete nature of bits fails to capture complex, nuanced user-item relationships.

Compositional Coding for Collaborative Filtering (CCCF) is a novel framework designed to bridge this gap. By representing users and items as a composition of multiple binary vectors weighted by sparse real values, CCCF achieves state-of-the-art accuracy—sometimes surpassing real-valued models—while maintaining the high-speed retrieval required for million-scale applications.

The CCCF Framework

Instead of mapping a user or item to a single long binary string, CCCF decomposes the representation into $G$ short binary components (each $r$ bits long). The final preference score is calculated as a weighted sum of the inner products of these components.

The CCCF architecture: User and item preferences are modeled as a weighted sum of multiple binary component inner products.

Key Technical Innovations

  • Sparse Weighting via Kernels: To maintain efficiency, the model employs an Epanechnikov kernel to ensure the weight vectors are sparse. This ensures that for any user-item pair, only a subset of binary components needs to be computed.
  • Discrete Optimization: Learning binary codes is an NP-hard problem. CCCF utilizes Discrete Coordinate Descent (DCD) to update bits iteratively, alongside auxiliary variables that ensure the learned codes are balanced and uncorrelated, maximizing the information density per bit.
  • Integer Weight Scaling (IWS): For maximum hardware acceleration, real-valued weights are scaled and rounded to integers. This allows the entire prediction pipeline to run using integer arithmetic, which is significantly faster than floating-point math on modern CPUs.

Experimental Insights and Geometry Preservation

One of the most significant findings is that CCCF preserves the underlying "geometry" of the data far better than traditional binary methods. By allowing different components to capture "local" relationships (e.g., specific genre niches), the composition creates a more accurate global semantic map.

Visualization of how CCCF preserves semantic geometry, grouping movies with similar genres in the latent space.

Furthermore, the authors observed that the constraints of binary coding act as a form of regularization. On extremely sparse datasets like Yelp and Amazon, CCCF actually outperformed traditional real-valued MF, suggesting that the binarization process prevents the model from overfitting to noise in sparse interaction data.

Performance and Results

Evaluations on industry benchmarks (MovieLens 1M, Yelp, Amazon) demonstrate that CCCF consistently outperforms state-of-the-art binarized methods such as BCCF and DCF. Notably, CCCF with only 32 bits frequently outperformed DCF using 128 bits. In terms of raw speed, the retrieval process was approximately 7x faster than traditional real-valued MF, with the IWS strategy providing additional speedups with negligible loss in ranking accuracy (NDCG).

Limitations and Future Work

While powerful, CCCF is sensitive to the bandwidth parameter ($h$) that controls sparsity. Additionally, due to the non-convex nature of discrete optimization, the model benefits significantly from high-quality initialization. Future research may involve extending this compositional approach to more complex architectures, such as Factorization Machines or Neural Collaborative Filtering, to better incorporate side information.

Summary updated

BibTeX
@inproceedings{liu2019compositional,
  author = {Chenghao Liu and Tao Lu and Xin Wang and Zhiyong Cheng and Jianling Sun and Steven C. H. Hoi},
  title = {{Compositional Coding for Collaborative Filtering}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2019},
  url = {https://openreview.net/forum?id=IKp72rGKvZ},
}
Figure