English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

CALM: Continuous Autoregressive Language Models Move Beyond Discrete Tokens

Forum topic · QianXun · 2025-11-20

Summary

This in-depth forum post analyzes CALM (Continuous Autoregressive Language Models), a framework by Tencent WeChat AI researchers that replaces token-by-token prediction with continuous vector prediction. Standard LLMs carry only 15-18 bits of information per token; CALM compresses K=4 tokens into a 128-dimensional continuous latent vector via a variational autoencoder, then generates these vectors autoregressively with a lightweight Energy Transformer that samples in a single step. Because no likelihood exists in continuous space, the method relies on strictly proper scoring rules—training with an energy loss and evaluating with a new likelihood-free metric called BrierLM, which correlates -0.966 (Pearson) with cross-entropy on Transformer baselines. The post also details exact and approximate temperature-sampling algorithms for continuous distributions using rejection sampling, plus robustness techniques (KL clipping, latent and token dropout). On the Pile corpus (230B tokens), a 371M-parameter CALM model matched a comparable Transformer using 44% less training compute and 34% less inference compute, with K=4 defining a new Pareto frontier. The article frames semantic bandwidth (tokens per generation step) as a new scaling dimension alongside parameters and data, and discusses implications for RLHF, distillation, and retrieval-augmented generation.

CALM: When Language Breaks Free from the Letter-by-Letter Cage

> Author's note: This is a deep analysis of a paradigm-level shift in language model design. Following researchers from Tencent's WeChat AI team, it explores how CALM (Continuous Autoregressive Language Models) escapes the constraints of discrete symbols and lets AI navigate a continuous semantic space.

The Problem: Tokens as an Information Bottleneck

Modern LLMs—GPT-4, Claude, Gemini—generate text by playing a high-speed next-token guessing game. Each token (~0.75 English words) carries only 15-18 bits: in a 32K vocabulary, a token can express at most log₂(32768) ≈ 15 bits. As vocabularies grew from 32K to 256K, per-token information stayed capped near 18 bits; expanding further makes the softmax layer a computational black hole. CALM's authors ask a sharp question: if model capacity can scale, why can't the information content of each generation step scale?

They introduce semantic bandwidth: how much meaning each generation step can convey. Traditional LLMs operate at ~15 bits/step; a 100,000-word novel requires ~130,000 steps. CALM aims to upgrade the model from a letter-by-letter copyist to a concept-by-concept creator.

Chapter 1: The Continuous Vector Genesis

CALM's core is a lightweight autoencoder that compresses 4 tokens (e.g., "the cat sat on") into a 128-dimensional continuous vector and reconstructs them exactly.

Encoder: embeds 4 tokens → per-position FFN → flatten → linear projection to 128-dim → FFN + linear projection → latent z. Decoder: z → 512-dim hidden space → 4 hidden states → FFN + embedding projection to vocab logits → argmax reconstructs tokens.

Training minimizes cross-entropy reconstruction error. Strikingly, at K=4, just a 10-dimensional vector achieves 99.9% token-level accuracy—a ~50:1 compression ratio.

Robustness: Three Alchemical Treatments

Pure reconstruction yields a fragile latent space. CALM adds:

1. Variational regularization: upgrade to a VAE; the encoder outputs Gaussian parameters (μ, σ), sampled as z ∼ N(μ, σ²I), with KL divergence pushing the space toward a standard normal. 2. KL clipping: a floor λ_KL = 0.5 prevents posterior collapse. Without it, 71 of 128 dimensions collapse and performance plummets. 3. Dropout injection: 15% dropout on the latent vector plus 15% input token masking, forcing redundant, context-inferred representations.

Result: the decoder holds 99.9% accuracy under noise of σ ≈ 0.3.

Chapter 2: A Likelihood-Free World

In continuous space, softmax is undefined and perplexity is meaningless. CALM rebuilds its toolkit from strictly proper scoring rules, choosing the energy score (α=1, which is strictly proper):

\[S(P, y) = \mathbb{E}_{x',x''\sim P}[\|x'-x''\|^\alpha] - 2\mathbb{E}_{x\sim P}[\|x-y\|^\alpha]\]

The first term penalizes collapsed predictions; the second rewards fidelity. Expectations are estimated by Monte Carlo: N=8 samples from the generation head, M=100 from the autoencoder posterior per step (large M is nearly free since it's Gaussian sampling).

Chapter 3: The Energy Transformer

Diffusion needs ~100 steps, flow matching 4—both would erase CALM's speed advantage. The Energy Transformer generates in a single step: input is the Transformer hidden state h plus noise ε ∈ U[-0.5, 0.5], refined by L residual MLP blocks (~6d² parameters each, ~3.5M at d=768) into a 128-dim z. The head is only ~10% of total parameters.

A counterintuitive finding: feeding continuous z back into the Transformer tanks performance. CALM instead uses discrete input anchoring—generated tokens are re-embedded and compressed as input. Discrete input scores BrierLM 4.70 vs. 3.25 for continuous input (a 44% gap): discrete symbols serve as semantic anchors even when the prediction target is continuous.

Chapter 4: BrierLM—A Likelihood-Free Compass

Derived from Glenn Brier's 1950 scoring rule:

\[\text{Brier}(P, y) = 2P(y) - \sum_x P(x)^2\]

Its expectation decomposes into a squared error term (minimized when P = Q) plus a constant, making it strictly proper. Since CALM only has a sampler, the team built an unbiased sample-based estimator:

\[\text{Brier}(P, y) \approx \mathbb{I}\{x_1 = y\} + \mathbb{I}\{x_2 = y\} - \mathbb{I}\{x_1 = x_2\}\]

BrierLM is the geometric mean of Brier-n (n-grams as atomic units, n=1..4), scaled ×100. Validation: Pearson correlation with cross-entropy is -0.966, Spearman -0.991—BrierLM is a reliable perplexity substitute.

Chapter 5: Temperature Sampling Reborn

With no logits, CALM reconstructs temperature sampling via rejection sampling. Key insight: repeated sampling is equivalent to exponentiating the distribution. For T = 1/n, sample n times; accept iff all identical (acceptance probability P(x)^n). For arbitrary T, split 1/T = n + α and use a Bernoulli Factory for the fractional part. Exact sampling is expensive at low T, so an approximate batch algorithm draws N samples and selects among observed multi-sets weighted by combination counts (unbiased as N → ∞). Experiments show N dominates the precision-diversity tradeoff more effectively than T: matching a Transformer's T=0.6 behavior requires N ≈ 100; T=0.5 requires N ≈ 200.

Chapter 6: Experiments

Setup: Pile (230B tokens), Llama 3 tokenizer, WikiText-103 evaluation; models S(281M), M(465M), L(849M); CALM with K=4, latent dim 128, 75M-parameter autoencoder.

Main result: CALM-M (371M) achieves BrierLM 5.72 with 3.7e21 training FLOPs and 2.9e8 inference FLOPs, vs. Transformer-S (281M) at 6.05 / 6.6e21 / 4.4e8—comparable quality with 44% less training compute and 34% less inference compute.

Scaling over K: K=1 underperforms the baseline; K=2 halves cost with slight quality loss; K=4 fully surpasses the baseline Pareto frontier; K=8 degrades (insufficient capacity). Semantic bandwidth K emerges as a new scaling dimension.

Ablations:

  • Autoencoder: base 3.99 → +KL clipping 4.13 → +token dropout 4.55 → +latent dropout 4.46 → full set 4.70. KL weight β=0.001 is optimal; latent dim 128 is the sweet spot (32 too small, 256 slightly noisy).
  • Generation head: diffusion (100 steps) < flow matching (4 steps) < Energy Transformer (1 step, 4.70).
  • Energy loss: N=2 gives 4.37, N=8 gives 4.70, N=12 gives 4.72 (diminishing returns).
  • Input: discrete 4.70 > hybrid 4.40 > continuous 3.25.
  • Chapter 7: Outlook

  • Context-aware autoencoders that encode chunks with awareness of neighbors, semantically structured latent spaces, autoregressive chunk modeling.
  • End-to-end Energy Transformers with continuous outputs at every layer; alternative strictly proper scores (log score, spherical score).
  • Lighter sampling: noise scaling, temperature-aware training, learned sampling.
  • A third variable in Scaling Laws: Performance = f(N_params, D_data, K_bandwidth).
  • Ecosystem impact: RLHF needs sample-based policy gradients (no log-probabilities), distillation must replace KL with energy distance or MMD, and continuous latents fit naturally with semantic retrieval (a possible RAG 2.0).

Closing

CALM is less an incremental improvement than a paradigm shift—from discrete symbolism to continuous representationism. Its numbers are stark: 44% training savings, 34% inference speedup, and a new scaling dimension that decouples quality from parameter count. The open questions are provocative: as K grows, can one vector encode an entire document? Will a semantically structured latent space reveal a geometry of thought?

Core References

1. Shao, C., Li, D., Meng, F., & Zhou, J. (2025). *Continuous Autoregressive Language Models*. arXiv:2510.27688v1. 2. Shao, Z., Kong, L., & Feng, Y. (2025). *Energy Transformer: A Single-Step Approach to Continuous Generation*. 3. Kingma, D. P., & Welling, M. (2014). *Auto-Encoding Variational Bayes*. ICLR. 4. Brier, G. W. (1950). *Verification of forecasts expressed in terms of probability*. Monthly Weather Review. 5. Gneiting, T., & Raftery, A. E. (2007). *Strictly Proper Scoring Rules, Prediction, and Estimation*. JASA.

Tags

#calm#large-language-models#continuous-representations#variational-autoencoder#scoring-rules#energy-transformer#scaling-laws#tencent-wechat-ai

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/176360517