\documentclass[aspectratio=169,11pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb,graphicx,booktabs}

\definecolor{AcademicBlue}{RGB}{26,57,86}
\definecolor{AcademicTeal}{RGB}{0,105,112}
\setbeamercolor{structure}{fg=AcademicBlue}
\setbeamercolor{frametitle}{fg=AcademicBlue,bg=white}
\setbeamercolor{title}{fg=AcademicBlue}
\setbeamercolor{alerted text}{fg=AcademicTeal}
\setbeamercolor{block title}{fg=white,bg=AcademicBlue}
\setbeamercolor{block body}{fg=black,bg=AcademicBlue!5}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{itemize items}[circle]
\setbeamertemplate{footline}{%
  \hspace{8mm}{\color{gray}\scriptsize CALM \;|\; Paper discussion}
  \hfill\usebeamerfont{page number in head/foot}%
  \insertframenumber\,/\,\inserttotalframenumber\hspace{4mm}\vspace{3mm}}
\setbeamersize{text margin left=8mm,text margin right=8mm}
\setbeamerfont{frametitle}{size=\Large,series=\bfseries}
\setbeamerfont{title}{size=\LARGE,series=\bfseries}
\newcommand{\papersource}[1]{\par\smallskip{\scriptsize\color{gray}#1\par}}
\newcommand{\E}{\mathbb E}
\newcommand{\ind}{\mathbf 1}
\newcommand{\fig}[2]{\includegraphics[width=\linewidth,height=#2,keepaspectratio]{figures/#1.pdf}}

\title[CALM]{Continuous Autoregressive\newline Language Models}
\subtitle{Generate a token block with one backbone step}
\author{\small Paper authors: Chenze Shao, Darren Li, Fandong Meng, Jie Zhou\\
\small WeChat AI, Tencent; Qiuzhen College, Tsinghua University}
\date{\small arXiv:2510.27688v1 \;|\; 31 October 2025\\
Research discussion \;|\; 14 October 2026}

\begin{document}

\begin{frame}
  \titlepage
  \vspace{-5mm}
  \begin{center}
    \alert{Robust latent codes + a one-pass generator + a sampling-based toolkit.}\\[2mm]
    \scriptsize\href{https://arxiv.org/abs/2510.27688v1}{Paper: arXiv:2510.27688v1}
    \quad\href{https://github.com/shaochenze/calm}{Official implementation}
  \end{center}
\end{frame}

\begin{frame}{Increase the amount of text predicted per step}
  \centering
  \fig{fig-01-concept}{0.43\textheight}
  \begin{itemize}
    \item A length-$T$ sequence becomes $T/K$ backbone positions.
    \item Enumerating every discrete block would need up to $|\mathcal V|^K$ classes.
    \item A continuous vector represents the block; a small decoder emits its tokens.
  \end{itemize}
  \papersource{Paper, Sec. 1, pp. 1--3; original Fig. 1, p. 2. Figure uses K=3; main experiments use K=4.}
\end{frame}

\begin{frame}{Continuous prediction uses a discrete feedback loop}
  \begin{columns}[c,onlytextwidth]
    \begin{column}{0.65\textwidth}
      \fig{fig-02-architecture}{0.73\textheight}
    \end{column}
    \begin{column}{0.32\textwidth}
      \begin{enumerate}
        \item Compress $K$ token embeddings.
        \item Run the causal backbone once.
        \item Sample a vector from $G(\mathbf h,\varepsilon)$.
        \item Decode $K$ tokens and feed them back.
      \end{enumerate}
      \medskip
      \alert{One shared latent variable carries within-block dependence.}
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 3.3.3, pp. 6--8; original Fig. 2, p. 7. AE decoder is frozen.}
\end{frame}

\begin{frame}{The autoencoder must reconstruct and tolerate noise}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.49\textwidth}
      \begin{block}{Context-free encoder}
        Token embeddings + position-wise FFN\\[2mm]
        Flatten: $K d_{\rm AE}\rightarrow d_{\rm AE}$\\[2mm]
        FFN + projection to $(\boldsymbol\mu,\boldsymbol\sigma)$
      \end{block}
      \[
        \mathbf z\sim\mathcal N(\boldsymbol\mu,
                \operatorname{diag}(\boldsymbol\sigma^2))
      \]
    \end{column}
    \begin{column}{0.48\textwidth}
      \begin{block}{Parallel decoder}
        Latent $\rightarrow d_{\rm AE}\rightarrow Kd_{\rm AE}$\\[2mm]
        Reshape + FFN + tied vocabulary projection\\[2mm]
        Argmax at all $K$ positions
      \end{block}
      $K=4$, $d_{\rm AE}=512$, $l=128$.\\[2mm]
      \alert{$>99.9\%$ token reconstruction accuracy}, with posterior std. about $0.3$.
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 2, pp. 3--4. Reconstruction accuracy measures the AE, not next-block prediction.}
\end{frame}

\begin{frame}{Redundancy makes the latent space easier to model}
  \[
    \mathcal L_{\rm total}=\mathcal L_{\rm ae}
       +\beta\sum_{j=1}^{l}\max(\lambda_{\rm KL},\mathcal L_{{\rm KL},j})
  \]
  \[
    \mathcal L_{{\rm KL},j}
       =\tfrac12(\mu_j^2+\sigma_j^2-1-\log\sigma_j^2)
  \]
  \begin{itemize}
    \item Variational regularization: $\beta=0.001$.
    \item KL floor $\lambda_{\rm KL}=0.5$: removes the incentive to reduce small KL terms further.
    \item Token masking and latent dropout: both $p=0.15$ during AE training.
    \item Dropout is disabled during subsequent LM training and inference.
  \end{itemize}
  \papersource{Paper, Sec. 2.2, p. 4, Eqs. (2)--(4). The floor applies to the loss; it is not a hard lower bound on actual KL.}
\end{frame}

\begin{frame}{Energy scoring learns a distribution from samples}
  \[
    S(P,\mathbf y)=
      \underbrace{\E\|\mathbf x'-\mathbf x''\|^\alpha}_{\text{sample diversity}}
      -2\underbrace{\E\|\mathbf x-\mathbf y\|^\alpha}_{\text{fidelity to the target}}
  \]
  \begin{itemize}
    \item $\mathbf x,\mathbf x',\mathbf x''$ are independent draws from the generator.
    \item Higher expected score is better; training minimizes its negative.
    \item Strictly proper for $0<\alpha<2$, under finite-moment conditions.
    \item Default $\alpha=1$. At $\alpha=2$, only the predictive mean is identified.
  \end{itemize}
  \begin{block}{One-pass generative head}
    Condition residual MLP blocks on $\mathbf h$; transform uniform noise into $\mathbf z$.
    No iterative denoising is required to obtain a base sample.
  \end{block}
  \papersource{Paper, Sec. 3.3, pp. 6--7, Eqs. (8)--(9). Mean-only interpretation: discussion derivation.}
\end{frame}

\begin{frame}{Reuse the backbone state across multiple head samples}
  At each position $i$, estimate the negative energy score:
  \[
  \begin{aligned}
    \ell_i={}&\frac{2}{NM}\sum_{n=1}^{N}\sum_{m=1}^{M}
       \|\mathbf z_{i,m}-\tilde{\mathbf z}_{i,n}\|\\[1mm]
       &-\frac{1}{N(N-1)}\sum_{n\ne k}
       \|\tilde{\mathbf z}_{i,n}-\tilde{\mathbf z}_{i,k}\|.
  \end{aligned}
  \]
  \begin{itemize}
    \item $N=8$ model samples $\tilde{\mathbf z}$: require head evaluations.
    \item $M=100$ target samples $\mathbf z$: drawn from the known AE posterior.
    \item A shared Transformer state conditions all model samples.
    \item Multiple posterior targets reduce the variance of the training signal.
  \end{itemize}
  \papersource{Paper, Sec. 3.3.2, p. 6, Eq. (10); displayed as the per-position loss.}
\end{frame}

\begin{frame}{Training separates representation learning from modeling}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.48\textwidth}
      \begin{block}{Two training stages}
        \begin{enumerate}
          \item Train the AE with reconstruction and regularization.
          \item Freeze the AE. Train the backbone and head with energy loss.
        \end{enumerate}
      \end{block}
      True history tokens provide the input. The AE encoder provides target posteriors.
    \end{column}
    \begin{column}{0.48\textwidth}
      \begin{block}{Generation}
        \begin{enumerate}
          \item Compress the previous token block.
          \item Predict one latent vector.
          \item Decode the next block in parallel.
        \end{enumerate}
      \end{block}
      Input compression is a separate trainable module, not the frozen AE encoder.
    \end{column}
  \end{columns}
  \medskip
  \alert{Base generation advances the backbone once per block of $K$ tokens.}
  \papersource{Paper, Secs. 2, 3.3.3 and 7.1, pp. 3--8 and 14--15.}
\end{frame}

\begin{frame}{A collision estimates the Brier uncertainty penalty}
  \[
    \operatorname{Brier}(P,y)=2P(y)-\sum_xP(x)^2
  \]
  \[
    \E_{y\sim Q}[\operatorname{Brier}(P,y)]
       =-\|P-Q\|_2^2+\|Q\|_2^2
  \]
  \begin{block}{Two independent samples are enough for an unbiased component estimate}
    \[
      \widehat B=\ind\{X_1=y\}+\ind\{X_2=y\}-\ind\{X_1=X_2\}
    \]
  \end{block}
  \begin{itemize}
    \item Exact $n$-gram matching treats the whole $n$-gram as one outcome.
    \item Rewards reference matches while penalizing concentrated predictions.
  \end{itemize}
  \papersource{Paper, Sec. 4.2, pp. 8--9, Eqs. (12)--(14). This score is higher-is-better.}
\end{frame}

\begin{frame}{BrierLM combines short continuation scores}
  \[
    \operatorname{BrierLM}=100\left(\prod_{n=1}^{4}\operatorname{Brier}\text{-}n\right)^{1/4}
  \]
  \begin{columns}[c,onlytextwidth]
    \begin{column}{0.52\textwidth}
      \fig{fig-03-brier}{0.48\textheight}
    \end{column}
    \begin{column}{0.45\textwidth}
      \begin{itemize}
        \item Strong alignment with cross-entropy on baseline checkpoints.
        \item Pearson: $-0.966$; Spearman: $-0.991$.
        \item Evaluates short continuations given a true prefix.
      \end{itemize}
    \end{column}
  \end{columns}
  \smallskip
  \alert{Discussion:} component unbiasedness does not survive nonlinear aggregation;
  negative components need a defined treatment.
  \papersource{Paper, Sec. 4.2, p. 9, Eq. (15) and original Fig. 3. Formal caveat and counterexample in backup.}
\end{frame}

\begin{frame}{Repeated discrete samples implement low temperature}
  \[
    P_T(x)=\frac{P(x)^{1/T}}{Z_T},\qquad 0<T<1,\quad x=\text{a decoded token block}.
  \]
  \begin{itemize}
    \item If $T=1/n$: draw $n$ independent blocks and accept only if all match.
    \item If $1/T=n+\alpha$: add a Bernoulli factory with acceptance $P(x)^\alpha$.
    \item Per-trial accepted mass: $P(x)^nP(x)^\alpha=P(x)^{1/T}$.
  \end{itemize}
  \begin{block}{Exactness can be expensive}
    At $T=1/n$, the expected sample count is $n/Z_T$.
    A uniform distribution over $S$ blocks costs $nS^{n-1}$ calls on average.
  \end{block}
  \papersource{Paper, Secs. 5.1--5.2, pp. 10--11; Theorems 1--2; Appendix A.1--A.2, pp. 30--32. Uniform example: derivation.}
\end{frame}

\begin{frame}{A finite batch trades exactness for useful sample reuse}
  Draw $N$ blocks, count each outcome, and weight matching subsets:
  \[
    w_x=\binom{c_x}{n},\qquad T=1/n,\qquad
    P(x\mid\text{batch})=\frac{w_x}{\sum_z w_z}.
  \]
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.38\textwidth}
      \centering
      Example: $n=2$\\[2mm]
      \begin{tabular}{lrr}
        \toprule
        Block & Count & Weight\\
        \midrule
        A & 3 & 3\\
        B & 2 & 1\\
        Other & 1 & 0\\
        \bottomrule
      \end{tabular}\\[2mm]
      $P(A\mid\text{batch})=3/4$.
    \end{column}
    \begin{column}{0.58\textwidth}
      \begin{itemize}
        \item If no $n$-fold match exists, reduce the matching order until one exists.
        \item Finite $N$ is biased: random ratios and fallback alter the target.
        \item As $N\to\infty$, the output converges to $P_T$.
      \end{itemize}
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 5.3, pp. 11--12, Algorithm 2 and Theorem 3; proof on p. 33.}
\end{frame}

\begin{frame}{The comparison fixes backbone positions, not token context}
  \centering
  \begin{tabular}{p{0.25\linewidth}p{0.67\linewidth}}
    \toprule
    Data & Pile uncopyrighted; about 230B tokens with Llama 3 tokenization\\[1mm]
    Evaluation & WikiText-103; BrierLM $\uparrow$\\[1mm]
    AE training & 15B-token subset; 30K steps; about 75M parameters\\[1mm]
    LM training & 250K steps, about 2M tokens per batch\\[1mm]
    Context & 2048 backbone positions: 2048 tokens for AR, 8192 for CALM at $K=4$\\[1mm]
    Ablations & 12 layers, width 768, 3 head blocks; 50K training steps\\
    \bottomrule
  \end{tabular}
  \medskip
  Main-table costs include AE parameters, AE training, and encoding/decoding.
  \papersource{Paper, Sec. 7.1, pp. 14--15; Table 1 caption; Secs. 7.3--7.4, pp. 16--17.}
\end{frame}

\begin{frame}{Fewer FLOPs buy scores close to discrete baselines}
  \centering
  \begin{tabular}{lrrrr}
    \toprule
    Model & Params & Train & Infer/token & BrierLM\\
     & & $10^{20}$ FLOPs & $10^8$ FLOPs & $\uparrow$\\
    \midrule
    Transformer-S & 281M & 6.6 & 4.4 & 6.05\\
    Transformer-M & 465M & 11.9 & 7.9 & 7.07\\
    Transformer-L & 849M & 22.5 & 15.0 & 8.98\\
    \midrule
    CALM-M ($K=4$) & 371M & 3.7 & 2.9 & 5.72\\
    CALM-L ($K=4$) & 735M & 7.7 & 4.6 & 6.58\\
    CALM-XL ($K=4$) & 1.82B & 19.5 & 9.4 & 8.53\\
    \bottomrule
  \end{tabular}
  \begin{block}{CALM-M versus Transformer-S}
    43.9\% fewer training FLOPs; 34.1\% fewer inference FLOPs.\\
    BrierLM is lower by 0.33 points. End-to-end latency is not reported.
  \end{block}
  \papersource{Paper, Table 1 and Sec. 7.2, p. 15. Percentages calculated from the reported values.}
\end{frame}

\begin{frame}{Bandwidth helps until the prediction task becomes too hard}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.49\textwidth}
      \fig{fig-04-flops}{0.48\textheight}
      \small $K=1$: overhead without fewer steps.\\
      $K=4$: useful trade-off; $K=8$: larger score loss.
    \end{column}
    \begin{column}{0.49\textwidth}
      \fig{fig-05-training}{0.48\textheight}
      \small CALM-XL improves more slowly at first, then closes part of the gap to Transformer-L.
    \end{column}
  \end{columns}
  \medskip
  \alert{The left plot uses training FLOPs; the right plot uses training steps.}
  \papersource{Paper, Sec. 7.2, pp. 15--16; original Figs. 4--5, p. 16. Larger models supporting larger K is a hypothesis.}
\end{frame}

\begin{frame}{The full AE regularization recipe improves downstream quality}
  \begin{columns}[c,onlytextwidth]
    \begin{column}{0.61\textwidth}
      \centering
      \begin{tabular}{lr}
        \toprule
        AE regularization & BrierLM\\
        \midrule
        Reconstruction only & 3.99\\
        Ordinary KL & 3.48\\
        Clipped KL & 4.13\\
        Clipped KL + token dropout & 4.55\\
        Clipped KL + latent dropout & 4.46\\
        Clipped KL + both & \textbf{4.70}\\
        \bottomrule
      \end{tabular}
    \end{column}
    \begin{column}{0.35\textwidth}
      \begin{itemize}
        \item Ordinary VAE: 71 of 128 dimensions collapsed.
        \item KL clipping restores useful capacity.
        \item Both dropout forms help.
      \end{itemize}
    \end{column}
  \end{columns}
  \medskip
  \alert{Faithful reconstruction alone does not guarantee a learnable latent space.}
  \papersource{Paper, Sec. 7.3, pp. 16--17; Table 2, p. 17. Fixed small LM, 50K steps.}
\end{frame}

\begin{frame}{Representation quality peaks at moderate regularization}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.49\textwidth}
      \fig{fig-06-kl}{0.49\textheight}
      \small $\beta=0.001$ works best here. At $0.1$, reconstruction falls to about 99\%.
    \end{column}
    \begin{column}{0.49\textwidth}
      \fig{fig-07-dimension}{0.49\textheight}
      \small $l=128$ works best; dropout also changes with dimension: 0.05 to 0.20.
    \end{column}
  \end{columns}
  \medskip
  Blue/left: downstream BrierLM. Red/right: AE token reconstruction accuracy.\\
  Larger AE depth, width, or training data produced no significant improvement.
  \papersource{Paper, Sec. 7.3, pp. 16--17; original Figs. 6--7, p. 17.}
\end{frame}

\begin{frame}{The energy head combines quality with one-pass sampling}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.49\textwidth}
      \fig{fig-08-heads}{0.48\textheight}
      \small Flow starts faster; the energy head reaches a higher final BrierLM.
    \end{column}
    \begin{column}{0.49\textwidth}
      \fig{fig-09-iterations}{0.48\textheight}
      \small Flow midpoint is useful at 2--4 iterations. Energy needs one forward pass.
    \end{column}
  \end{columns}
  \medskip
  Diffusion and flow also use 8 training replicas of each conditional state.\\
  Solver iterations and network evaluations need not be identical.
  \papersource{Paper, Sec. 7.4, pp. 17--18; original Figs. 8--9, p. 18. Training-curve evaluation uses 100 iterative steps.}
\end{frame}

\begin{frame}{Discrete feedback is a major part of the result}
  \centering
  \begin{tabular}{lrrr}
    \toprule
    Backbone input & Brier-1 & Brier-4 & BrierLM\\
    \midrule
    Decoded discrete tokens & 21.81 & 1.25 & \textbf{4.70}\\
    Continuous latent vector & 17.43 & 0.73 & 3.25\\
    Sum of both representations & 21.17 & 1.12 & 4.40\\
    \bottomrule
  \end{tabular}
  \medskip
  \begin{itemize}
    \item Discrete input gains 1.45 BrierLM points over continuous input.
    \item Authors' explanation: the backbone struggles to unpack the compact code.
    \item The AE decoder exposes useful token structure before the next backbone step.
  \end{itemize}
  \papersource{Paper, Sec. 7.4 and Table 5, p. 19. Selected columns; Brier-n components shown on the paper's percent scale.}
\end{frame}

\begin{frame}{Temperature control consumes a candidate budget}
  \begin{columns}[c,onlytextwidth]
    \begin{column}{0.52\textwidth}
      \fig{fig-11-temperature-baseline}{0.62\textheight}
    \end{column}
    \begin{column}{0.44\textwidth}
      \begin{itemize}
        \item Match model checkpoints by BrierLM.
        \item CALM: fix $T=1/3$, vary candidate count $N$.
        \item $N\approx100$: behavior near AR temperature 0.6.
        \item $N\approx200$: behavior near AR temperature 0.5.
      \end{itemize}
    \end{column}
  \end{columns}
  \smallskip
  Similar reference-match/collision trade-offs; extra head and decoder evaluations still cost compute.
  \papersource{Paper, Sec. 7.5, pp. 19--20; original Fig. 11, p. 20. Both axes aggregate n=1--4; collision is inverse diversity.}
\end{frame}

\begin{frame}{The evidence supports a compute trade-off with clear conditions}
  \begin{itemize}
    \item \textbf{Compute:} reported FLOPs include AE overhead. Actual latency with temperature sampling remains to be measured.
    \medskip
    \item \textbf{Quality:} WikiText-103 short-continuation scores, with different raw-token context windows. BrierLM needs careful treatment of negative components.
    \medskip
    \item \textbf{Scaling:} $K=4$ is useful at the tested sizes; larger $K$ and joint scaling laws remain open.
    \medskip
    \item \textbf{Algorithms:} log-probability-based policy optimization and KL distillation require adaptation.
  \end{itemize}
  \papersource{Paper, Secs. 7--8, pp. 14--21. Metric caveat: discussion analysis of Eq. (15) and official aggregation code.}
\end{frame}

\begin{frame}{Three ideas to take into the discussion}
  \begin{enumerate}
    \item \textbf{Scale the prediction unit.} A larger $K$ makes each backbone call account for more generated text.
    \medskip
    \item \textbf{Learn a generatable representation.} Robustness and redundancy matter beyond AE reconstruction accuracy.
    \medskip
    \item \textbf{Budget the entire sampling pipeline.} Fewer backbone steps coexist with head, decoder, and temperature-control costs.
  \end{enumerate}
  \bigskip
  \alert{CALM supplies an integrated prototype for blockwise continuous-output language modeling.}
  \papersource{Shao, Li, Meng and Zhou. Continuous Autoregressive Language Models. arXiv:2510.27688v1 (2025).}
  \papersource{\href{https://arxiv.org/abs/2510.27688v1}{Versioned paper}\quad
  \href{https://github.com/shaochenze/calm}{Official code}. Main talk ends here; backup slides follow.}
\end{frame}

\appendix

\begin{frame}{Backup: more samples have diminishing returns}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.48\textwidth}
      \centering
      Model samples; $M=100$\\[2mm]
      \begin{tabular}{rrr}
        \toprule
        $N$ & BrierLM & Cost\\
        \midrule
        2 & 4.37 & $0.82\times$\\
        4 & 4.53 & $0.91\times$\\
        8 & 4.70 & $1.00\times$\\
        12 & 4.72 & $1.13\times$\\
        \bottomrule
      \end{tabular}
    \end{column}
    \begin{column}{0.48\textwidth}
      \centering
      Target samples; $N=8$\\[2mm]
      \begin{tabular}{rrr}
        \toprule
        $M$ & BrierLM & Cost\\
        \midrule
        1 & 4.50 & $0.92\times$\\
        16 & 4.56 & $0.94\times$\\
        100 & 4.70 & $1.00\times$\\
        200 & 4.67 & $1.07\times$\\
        \bottomrule
      \end{tabular}
    \end{column}
  \end{columns}
  \bigskip
  $N=8\to12$: only $+0.02$ score for 13\% extra cost.\\[2mm]
  $M=100\to200$: score decreases; the table is not strictly monotonic in $M$.
  \papersource{Paper, Sec. 7.4 and Table 3, p. 18. Costs relative to N=8, M=100.}
\end{frame}

\begin{frame}{Backup: squared energy distance only identifies a mean}
  \[
  \begin{aligned}
    S_2(P,\mathbf y)
      &=\E\|X-X'\|^2-2\E\|X-\mathbf y\|^2\\
      &=-2\|\E X-\mathbf y\|^2.
  \end{aligned}
  \]
  \[
    \E_Q S_2(P,Y)
      =-2\|\E_P X-\E_Q Y\|^2-2\operatorname{tr}\operatorname{Cov}_Q(Y).
  \]
  \centering
  \begin{tabular}{lrrrrrr}
    \toprule
    $\alpha$ & 0.75 & 1 & 1.25 & 1.5 & 1.75 & 2\\
    \midrule
    BrierLM & Fail & 4.70 & 4.42 & 4.46 & 4.30 & 0\\
    \bottomrule
  \end{tabular}
  \medskip
  \begin{itemize}
    \item $\alpha<1$: authors report unstable gradients.
    \item $\alpha=2$: many distributions have the same optimal mean.
  \end{itemize}
  \papersource{Paper, Eq. (9), p. 6; Table 4, p. 19. Equations expanded here for teaching; finite second moments assumed.}
\end{frame}

\begin{frame}{Backup: exact temperature sampling cost}
  Write $1/T=n+\alpha$, with $0\le\alpha<1$.
  \[
    \E[N_{\rm total}]
       =\frac{n+\ind(\alpha>0)\sum_xP(x)^{1/T-1}}{Z_T}.
  \]
  \begin{itemize}
    \item Stage 1 always costs $n$ draws; candidate $x$ occurs with mass $P(x)^n$.
    \item Stage 2, given $x$, costs $P(x)^{\alpha-1}$ draws on average.
    \item Divide expected per-trial cost by the success probability $Z_T$.
  \end{itemize}
  \[
    \E[N_{\rm total}]\le
    \begin{cases}
      (n+1)/Z_T,&0<T\le1/2,\\
      (1+|\mathcal X|^{2-1/T})/Z_T,&1/2<T<1.
    \end{cases}
  \]
  \papersource{Paper, Theorem 2 and Corollary 2.1, p. 11; Appendix A.2, pp. 31--32. T=1 uses the base sampler directly.}
\end{frame}

\begin{frame}{Backup: the composite score needs a restricted domain}
  \begin{block}{Discussion counterexample to an unrestricted product formula}
    True continuation: always AAAA. Model continuation: always BBBB.\\[2mm]
    For every $n=1,2,3,4$: $P(y)=0$ and $\sum_xP(x)^2=1$, so $B_n=-1$.\\[2mm]
    Direct multiplication gives $100\,((-1)^4)^{1/4}=100$.
  \end{block}
  \begin{itemize}
    \item The geometric mean normally requires nonnegative components.
    \item Official aggregation clamps the \emph{product}; even numbers of negative components remain possible.
    \item Positive population components retain the true optimum, but nonlinear plug-in estimates are not generally unbiased.
  \end{itemize}
  \papersource{Analysis of paper Eq. (15), p. 9; this is not a claim that the reported positive-component results exhibit the failure.}
  \papersource{\href{https://github.com/shaochenze/calm/blob/0249935517df77466a0ef76e33e5a8f18e3fd90a/train/train_calm.py\#L566-L574}{Official code, commit 0249935: train/train\_calm.py, lines 566--574.}}
\end{frame}

\begin{frame}{Backup: why the batch approximation is consistent}
  For a fixed finite block space, counts satisfy $C_x/N\to P(x)$.
  \[
    \frac{\binom{C_x}{n}}{N^n}
      =\frac{1}{n!}\prod_{j=0}^{n-1}\frac{C_x-j}{N}
      \longrightarrow\frac{P(x)^n}{n!}.
  \]
  \[
    \frac{\binom{C_x}{n}}{\sum_z\binom{C_z}{n}}
      \longrightarrow\frac{P(x)^n}{\sum_zP(z)^n}.
  \]
  \begin{itemize}
    \item A positive-probability outcome eventually appears at least $n$ times; fallback probability vanishes.
    \item Normalized weights are bounded in $[0,1]$, giving convergence of their expectations.
    \item Neither step makes the finite-$N$ procedure exact.
  \end{itemize}
  \papersource{Paper, Theorem 3 and Appendix A.3, p. 33. Vanishing-fallback argument supplied in this discussion.}
\end{frame}

\begin{frame}{Backup: block temperature differs from token temperature}
  CALM's exact target at one block boundary is
  \[
    P_T(x_{1:K}\mid h)\propto
      \left[\prod_{j=1}^Kp(x_j\mid h,x_{<j})\right]^{1/T}.
  \]
  Scaling each token's logits instead gives
  \[
    \prod_{j=1}^K
    \frac{p(x_j\mid h,x_{<j})^{1/T}}
         {\sum_vp(v\mid h,x_{<j})^{1/T}}.
  \]
  \begin{itemize}
    \item The second expression has normalization factors that depend on the generated prefix.
    \item Similar accuracy--collision curves do not establish identical distributions.
    \item At $K=8$, the public Brier evaluator directly scores only the first four positions of each block.
  \end{itemize}
  \papersource{Discussion derivation from Sec. 5; comparison in Fig. 11, p. 20. Evaluation detail: official modeling\_calm.py, commit 0249935.}
\end{frame}

\end{document}
