skillfed
RESEARCH

Past 30 million users, more data stops helping — unless you compress first

on: Towards a Densing Law for User Representation Learning at Billion-Scale Capacity

The assumption that more user data always produces better recommendations turns out to be wrong in a specific, measurable way. On Alipay's production data, scaling user population past roughly 30 million users, extending behavioral history beyond 60 days, or growing the encoder past 0.2 billion parameters all hit the same wall: downstream accuracy stops improving even as training loss keeps falling. That last detail is the sharpest finding here — a 0.4B-parameter model fits the pretraining objective better than a 0.2B model but produces representations that are no more useful for classification or retrieval. The bottleneck is not model capacity. It is that raw behavioral logs are mostly repetitive: habitual payments, recurring routines, the same merchants week after week.

The proposed remedy is to compress before encoding. Using RQ-VAE residual quantization, long behavioral histories are mapped into compact discrete token sequences. The tokenized encoder starts outperforming the raw-sequence baseline around 60 days of history and around 30 million users — precisely where raw scaling saturates. The gain is not from architectural changes; the same Transformer encoder and the same contrastive alignment objective are used throughout. The improvement comes entirely from feeding denser inputs.

The paper then formalizes this into a Behavioral Densing Law: the minimum sufficient tokenization capacity grows as a power law of behavioral scale. Fitting this across three data sources (PayBill, SPM, MiniProgram) and three tokenization methods (RQ-VAE, VQ-VAE, SARQ) shows that the log-log relationship between data scale and optimal capacity is approximately linear, and that the slope is proportional to the squared intra-source uniqueness of the data — richer, more diverse behavioral sources need steeper capacity growth. VQ-VAE requires the steepest slope because it wastes codebook space on redundant representations; SARQ achieves the flattest because it avoids activating improbable code combinations.

The practical upshot is a configuration recipe: measure behavioral diversity with a k-NN cosine distance statistic on LLM embeddings, plug it into the power-law formula, and read off the tokenizer capacity you actually need rather than over-provisioning.

The paper goes one step further with ALGN, an adaptive-length gating network that allocates residual quantization depth per behavioral period rather than globally. Routine periods stop early; high-entropy periods get more codes. Against the best fixed-length baseline, ALGN improves AUC by about 1.07 percentage points while using 13.23% less codebook capacity. The ablations confirm that both signals — residual reconstruction norm and code-selection uncertainty — are necessary; removing either degrades both efficiency and accuracy.

One honest limitation the authors state: everything here is from a single platform and a single modality. Whether the power-law coefficients transfer to video consumption histories or public benchmark datasets is unresolved.

Raw behavioral scaling hits a hard ceiling; compact residual-quantized tokens break through it, and the paper gives you the formula to size the tokenizer correctly.

Sources & links