Overview
Contrastive learning (CL) has revolutionized representation learning in fields like computer vision and natural language processing by teaching models to "push" similar items together and "pull" dissimilar ones apart. However, extending this powerful paradigm to high-dimensional, sparse tensors remains a significant challenge. To address this, researchers have developed HOCTC (High-Order Contrastive Tensor Completion), an innovative framework that brings the power of contrastive learning to complex datasets like traffic flows and recommendation systems.
The Challenge of Tensor Completion
Tensor completion is the process of filling in missing entries in multi-dimensional data arrays. For example, in a 3D grid of (User, Item, Time), if we know some ratings, can we predict the rest? Applying traditional contrastive learning to tensors is notoriously difficult for three main reasons:
- High-Order Interactions: Tensors involve multi-way relationships (e.g., User-Item-Tag) that are much harder to model than simple pairs (Image-Label).
- Combinatorial Explosion: In a large tensor, the number of possible "negative" samples grows exponentially, making traditional sampling highly inefficient.
- Ordinal Nuance: Many real-world tensors are not simply binary (0 or 1) but contain ordinal values, like star ratings (1–5) or traffic speeds. A rating of 2 isn't strictly "negative" compared to a 5; it’s just "less positive." Standard CL ignores this crucial granularity.
The HOCTC Methodology
To overcome these limitations, HOCTC deviates from traditional contrastive frameworks through two primary innovations: Self-Attention with Query Expansion and Fine-grained Contrastive Levels.
1. Self-Attention with Query Expansion (SAQE)
Standard self-attention struggles when provided with only a few "tokens" (e.g., one user, one item, one timestamp). To fix this "low-resolution" problem, HOCTC uses Query Expansion. It takes the raw queries and creates "expanded queries" via linear combinations. These act as additional sensors that profile the attention landscape at a much higher resolution, allowing the model to capture intricate, nonlinear interactions between tensor modes even when data is sparse.
2. Fine-grained Contrastive Levels
Instead of a binary "Is this an interaction or not?" approach, HOCTC introduces weakly-positive triples to leverage ordinality as a natural supervisor:
- Positive: The actual observed entry (e.g., a 5-star rating).
- Weakly-Positive: An entry that shares at least one index but has a lower ordinal value (e.g., a 3-star rating from the same user).
- Negative: An unobserved entry (zero value).
To make this computationally feasible, the authors developed Multi-level Contrastive Sampling (MLCS), an efficient sorting-based scheme that finds these delicate comparative structures. By forcing the model to distinguish between a "good" interaction and a "mediocre" one, the learned representations become significantly more robust.
Datasets and Evaluation
The model was rigorously evaluated on two distinct types of ordinal tensors:
- Spatio-temporal Tensors: PEMS, GZSPEED, METR (traffic speeds), and CITYTEMP (hourly temperatures).
- Recommendation Tensors: SG (Foursquare check-ins), Amazon BEAUTY, Amazon MOVIE&TV, and GOWALLA (location check-ins).
These datasets range from 10% density down to incredibly sparse recommendation sets where only a tiny fraction of possible interactions are observed.
Key Insights and Performance
HOCTC consistently outperformed state-of-the-art baselines (including NeuralCP, CoSTCo, and LightNestle) across almost all metrics:
- The "Resolution" Advantage: Ablation studies showed that expanding queries from 3 to 30-40 reduced completion error by up to 42.8%, proving that standard attention is often too "low-res" for complex tensors.
- Traffic Data: On the PEMS dataset, HOCTC improved the Mean Absolute Error (MAE) by 16.3% over the best baseline.
- Recommendation Systems: On the massive and sparse Gowalla dataset, it achieved a staggering 26.7% improvement in MAE and a 57.9% improvement in MAPE (Mean Absolute Percentage Error).
- Robustness to Sparsity: The model maintained high performance even at extremely low sampling ratios (as low as 2%), proving its efficacy for "cold-start" or highly incomplete data scenarios.
Limitations and Future Work
While HOCTC is a powerful generic completion tool, it does not currently exploit domain-specific priors. For example, it doesn't explicitly account for temporal smoothness (e.g., traffic at 9:00 AM is likely similar to 9:05 AM) or spatial proximity. Future directions include integrating spatio-temporal priors into the contrastive loss, providing theoretical analysis of multi-level contrastive learning convergence, and adapting the framework for binary tensors like knowledge graphs.
Summary updated