% Compile with pdflatex. Replace the demonstration content before delivery.
\documentclass[aspectratio=169,11pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\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}{%
  \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}}

\title[MELT]{Memory-Efficient Looped Transformer}
\subtitle{Decoupling Compute from Memory in Looped Language Models}
\author{Paper discussion based on Conchello Vendrell et al.}
\date{arXiv:2605.07721v2 (19 May 2026)\\Reading: 20 September 2026}
\begin{document}
\begin{frame}\titlepage\end{frame}
\begin{frame}{The result is a memory--quality trade-off}
\begin{itemize}
\item At four loops, MELT uses $\frac{1}{4}$ of Ouro's KV bytes per token.
\item MATH-500: 93.4 vs. 94.4; HumanEval: 81.7 vs. 76.8.
\item One learned memory per token and layer replaces loop-specific caches.
\item Constant memory refers to loop depth, not sequence length.
\end{itemize}
\papersource{Paper, Tables 1--2, PDF pp. 6--7. Scores are percentages.}
\end{frame}
\begin{frame}{Weight sharing does not imply cache sharing}
\[
F^{(T)}=\mathrm{lmhead}\circ\underbrace{\mathcal M\circ\cdots\circ\mathcal M}_{T\text{ repeated stacks}}\circ\mathrm{emb}
\]
\begin{itemize}
\item $N$ distinct layers; $L$ tokens; $T$ loops; hidden width $d$.
\item Ouro retains per-loop KV states: $O(NLT)$ cache scaling.
\item MELT targets $O(NL)$ while preserving full token-axis attention.
\item More loops still require more computation.
\end{itemize}
\papersource{Paper, Sec. 3.1--3.2, PDF p. 3; fixed width and precision.}
\end{frame}
\begin{frame}{MELT overwrites the current token's memory}
\centering
\includegraphics[width=\linewidth,height=0.63\textheight,keepaspectratio]{figures/method-inference.png}
\par\medskip One new row per token; recurrent updates refine that row.

\papersource{Paper, Fig. 2, PDF p. 4. Original author artwork; two layers and three loops shown.}
\end{frame}
\begin{frame}{A feature-wise gate chooses what to retain}
\begin{align*}
z_t^{(l)}&=\sigma(x_t^{(l)}W_z^{(l)}+h_{t-1}^{(l)}U_z^{(l)}+b_z^{(l)})\\
h_t^{(l)}&=z_t^{(l)}\odot h_{t-1}^{(l)}+(1-z_t^{(l)})\odot x_t^{(l)}\\
k_t^{(l)}&=h_t^{(l)}W_K^{(l)},\qquad v_t^{(l)}=h_t^{(l)}W_V^{(l)}
\end{align*}
\begin{itemize}
\item $x$: current hidden state; $h$: retained memory; $z\in(0,1)^d$.
\item $z\approx1$ retains; $z\approx0$ overwrites. Gates vary by feature.
\item Update latent memory, project to KV, then apply attention and FFN.
\end{itemize}
\papersource{Paper, Sec. 3.2, Eq. (1), PDF p. 4.}
\end{frame}
\begin{frame}{Earlier loops are compressed, not stored verbatim}
\begin{block}{Teaching example: one dimension, fixed gate $z=0.2$}
\[
h_3=0.008h_0+0.032x_1+0.16x_2+0.8x_3.
\]
\end{block}
\begin{itemize}
\item Later tokens read the final memory of earlier tokens.
\item Token positions remain separately addressable by attention.
\item The real gate is learned and input-dependent; this is not a measured gate trajectory.
\end{itemize}
\papersource{Teaching derivation from Eq. (1), PDF p. 4.}
\end{frame}
\begin{frame}{New cache semantics create a training dependency}
\begin{itemize}
\item At inference, token n+1 uses token n's completed recurrent state.
\item Fully parallel same-loop training uses a different history.
\item Fully sequential token training is expensive.
\item Chunk-wise training processes chunks sequentially and tokens within each chunk in parallel.
\end{itemize}
\papersource{Paper, Sec. 3.3, PDF pp. 4--5.}
\end{frame}
\begin{frame}{Chunks trade fidelity for training throughput}
\centering
\includegraphics[width=0.95\linewidth,height=0.59\textheight,keepaspectratio]{figures/method-training.png}
\par\medskip Smaller chunks better approximate autoregressive inference.

\papersource{Paper, Fig. 3, PDF p. 5. Example chunk = 2; actual training chunk = 500 tokens.}
\end{frame}
\begin{frame}{Phase 1 gradually changes the attention inputs}
\[
KV=\alpha KV_{\mathrm{MELT}}+(1-\alpha)KV_{\mathrm{base}},\qquad\alpha:0\to1
\]
\begin{itemize}
\item Initialize from Ouro-1.4B-Thinking; randomly initialize new gates.
\item Fine-tune the full model with chunk-wise training.
\item Distill from the original LoopLM at all reasoning loops.
\item 500 steps / 160M tokens; interpolation avoids an abrupt switch.
\end{itemize}
\papersource{Paper, Sec. 3.3, PDF p. 5; Table 6, PDF p. 18.}
\end{frame}
\begin{frame}{Phase 2 anchors attention outputs to the teacher}
\[
\mathcal L=\mathcal L_{\mathrm{KD}}+\frac{\beta}{NT}\sum_{l=1}^{N}\sum_{t=1}^{T}
\left\|o_{\mathrm{MELT}}^{(l,t)}-\mathrm{sg}\!\left(o_{\mathrm{LoopLM}}^{(l,t)}\right)\right\|_2^2
\]
\begin{itemize}
\item $o$: post-attention representation; sg: stop-gradient.
\item Align outputs, not attention probability matrices.
\item Frozen teacher; pure MELT dynamics; $\beta=0.1$.
\item 300 more steps / 96M tokens to reduce representation drift.
\end{itemize}
\papersource{Paper, Sec. 3.3, PDF pp. 5--6; Appendix C, Fig. 5, p. 18.}
\end{frame}
\begin{frame}{The adaptation uses 256M training tokens}
\centering
\begin{tabular}{ll}\toprule
Setting & Value\\\midrule
Layers / hidden width / loops & 24 / 2048 / 4\\
Added gating parameters & About 0.2B\\
Chunk / sequence / batch tokens & 500 / 10K / 320K\\
Data mix & 50\% AceReason + 50\% OpenThoughts3\\
Model / gate learning rate & $8\cdot10^{-6}$ / $5\cdot10^{-4}$\\
Main training compute & 1,040 H100 GPU-hours\\\bottomrule
\end{tabular}
\par\medskip The main run is smaller than the full project's reported compute budget.

\papersource{Paper, Table 6, PDF p. 18. Full project estimate: about 20,000 GPU-hours.}
\end{frame}
\begin{frame}{Evaluation measures quality, not equal-compute gains}
\begin{itemize}
\item Teacher: Ouro-1.4B-Thinking. Non-looped models: Qwen3-1.7B, Gemma4-E2B, Qwen3.5-2B, DeepSeek-R1-1.5B.
\item LightEval 0.8.1; temperature 1.0; top-$p$ 0.7; completion cap 32k.
\item AIME/AMC: 16 completions per question, pass@1 and pass@10.
\item Other tasks: one completion; HLE uses a 300-question subset.
\item Training histories and inference FLOPs are not matched.
\end{itemize}
\papersource{Paper, Sec. 4.1, PDF pp. 6--7; Table 7, PDF p. 19.}
\end{frame}
\begin{frame}{Math performance approaches the teacher}
\centering
\begin{tabular}{lrrr}\toprule
Task & Ouro & MELT & Qwen3-1.7B\\\midrule
AIME24 & 50.2 & 46.7 & 43.1\\
AIME25 & 36.7 & 33.3 & 33.1\\
AIME26 & 44.0 & 41.0 & 31.7\\
AMC23 & 81.2 & 80.2 & 79.2\\
MATH-500 & 94.4 & 93.4 & 90.6\\
OlympiadBench & 67.5 & 64.7 & 63.5\\\midrule
Macro average & 62.3 & 59.9 & 56.9\\\bottomrule
\end{tabular}

\papersource{Paper, Table 1, PDF p. 6. Percent; AIME/AMC pass@1, others accuracy. Uncertainty omitted here.}
\end{frame}
\begin{frame}{Non-math gains are task-dependent}
\centering
\begin{tabular}{lrrr}\toprule
Task & Ouro & MELT & Qwen3-1.7B\\\midrule
GPQA & 40.8 & 42.6 & 37.3\\
HLE & 2.7 & 2.0 & 1.3\\
MMLU-Red & 74.2 & 74.2 & 73.8\\
HumanEval & 76.8 & 81.7 & 71.3\\\bottomrule
\end{tabular}
\par\medskip
\begin{itemize}
\item HumanEval rises by 4.9 percentage points vs. Ouro.
\item MELT does not win every task: Qwen3.5 scores 45.1 on GPQA.
\item HLE accuracy remains very low; reported errors do not establish significance.
\end{itemize}
\papersource{Paper, Table 1, PDF p. 6. Percent accuracy; uncertainty omitted here.}
\end{frame}
\begin{frame}{The robust memory result is a 4x KV ratio}
\centering
\begin{tabular}{lrr}\toprule
Model & KV MB/token & Reported total GB at 32k\\\midrule
MELT & 0.196608 & 9.49\\
Ouro & 0.786432 & 27.97\\
Qwen3-1.7B & 0.114688 & 7.07\\\bottomrule
\end{tabular}
\par\medskip
\begin{itemize}
\item Ouro/MELT KV ratio = 4; reported total ratio $\approx2.95$.
\item Total is estimated weights + KV, not measured runtime peak.
\item The table's units and sums are inconsistent; see backup audit.
\item No end-to-end latency or throughput result is reported.
\end{itemize}
\papersource{Paper, Table 2 and Sec. 4.3, PDF p. 7. Values reproduced as reported.}
\end{frame}
\begin{frame}{Learned feature-wise gating beats simple aggregation}
\centering
\begin{tabular}{lrrr}\toprule
Phase-1 variant & AIME24 & AIME25 & MATH-500\\\midrule
Element-wise MELT & 44.8 & 32.9 & 92.8\\
Mean & 29.0 & 23.3 & 83.2\\
EMA-0.2 & 30.2 & 21.5 & 84.6\\
Last & 33.7 & 24.0 & 84.0\\
Scalar gate & 34.4 & 23.1 & 85.6\\\bottomrule
\end{tabular}
\par\medskip Dynamic feature selection helps, but gating also adds parameters.

\papersource{Paper, Table 3, PDF p. 8. AIME pass@1; MATH-500 accuracy; percentages.}
\end{frame}
\begin{frame}{Training components matter as a combined recipe}
\centering
\begin{tabular}{lrr}\toprule
Cumulative removal & AIME24 pass@1 & MATH-500\\\midrule
Full recipe & 46.7 & 93.4\\
Remove attention alignment & 44.8 & 92.8\\
Also remove interpolation & 35.4 & 86.6\\
Also remove all-loop KD & 35.8 & 85.2\\
Also remove chunking & 0.0 & 0.0\\\bottomrule
\end{tabular}
\par\medskip Cumulative ablations do not isolate independent marginal effects.

\papersource{Paper, Table 4, PDF p. 9. Phase 2 also adds training steps; scores in percent.}
\end{frame}
\begin{frame}{Some gains reverse for multi-sample success}
\centering
\begin{tabular}{lrr}\toprule
Metric & Phase 1 & Full model\\\midrule
AIME25 pass@10 & 66.1 & 61.9\\
AMC23 pass@10 & 99.3 & 97.8\\\bottomrule
\end{tabular}
\par\bigskip
\begin{itemize}
\item Phase 2 improves the reported pass@1/accuracy columns.
\item It does not improve every metric.
\item The paper's claim of uniformly consistent improvement is too broad.
\end{itemize}
\papersource{Paper, Table 4, PDF p. 9; interpretation based on reported values.}
\end{frame}
\begin{frame}{Untrained cache sharing fails in this long-reasoning setup}
\begin{itemize}
\item Four variants: first/last-loop sharing, with/without original prompt cache.
\item All score zero on the four tested math benchmarks.
\item Qualitative generations start coherently, then deteriorate.
\item Authors hypothesize accumulated cache mismatch and protocol differences.
\item This motivates adaptation; it is not a universal impossibility result.
\end{itemize}
\papersource{Paper, Appendix B, Table 5 and Fig. 4, PDF pp. 16--17.}
\end{frame}
\begin{frame}{The stability argument is conditional}
\[
J_t=\operatorname{diag}(z_t)
+\operatorname{diag}(h_{t-1}-x_t)\frac{\partial z_t}{\partial h_{t-1}}
+\operatorname{diag}(1-z_t)\frac{\partial x_t}{\partial h_{t-1}}
\]
\begin{itemize}
\item If $z_t\to1$ and other terms stay controlled, $J_t\to I$.
\item Near saturation: $(1-\epsilon)^T$ suggests requiring $\epsilon\ll1/T$.
\item A bounded gate alone does not bound the full Jacobian.
\item Four-loop experiments do not validate arbitrary-depth stability.
\end{itemize}
\papersource{Paper, Appendix E, Eqs. (2)--(3), PDF pp. 19--20; final two points are reader analysis.}
\end{frame}
\begin{frame}{What is established, and what remains open}
\begin{itemize}
\item Established: learned loop-axis compression preserves useful quality with much less KV storage.
\item Current scope: one pretrained family, 1.6B scale, four fixed loops.
\item Open: adaptive depth, GQA, more parallel training, larger models.
\item Needed evidence: depth/chunk sweeps, runtime peak memory, throughput, matched-compute comparisons.
\end{itemize}
\papersource{Paper, Sec. 5, PDF p. 9; proposed additional evaluations are reader analysis.}
\end{frame}
\begin{frame}{Reference and discussion}
\textbf{Memory-Efficient Looped Transformer: Decoupling Compute from Memory in Looped Language Models}
\par\medskip
Victor Conchello Vendrell, Arnau Padr\'es Masdemont, Niccol\`o Grillo, Jordi Ros-Giralt, Arash Behboodi, Fabio Valerio Massoli.
\par\medskip
\href{https://arxiv.org/abs/2605.07721v2}{arXiv:2605.07721v2}, 19 May 2026. Qualcomm AI Research.
\par\bigskip
\textbf{Discussion:} What survives when training tokens, inference FLOPs, and actual peak memory are matched?

\papersource{Reading uses the versioned PDF and author TeX; no experiments were independently reproduced.}
\end{frame}
\begin{frame}{Backup: memory arithmetic needs clarification}
\begin{itemize}
\item Text specifies 32,768 tokens. In decimal GB: $32768\times0.196608/1000=6.44245$, not 6.29.
\item 6.29 is close to the 32,000-token calculation.
\item The MELT row also gives $3.272+6.29=9.562$, not 9.49.
\item Consistent 32,768-token totals from listed weights and KV: MELT 9.71445, Ouro 28.63880, Qwen3 7.20010 GB.
\item These are arithmetic checks, not new measurements.
\end{itemize}
\papersource{Paper, Table 2, PDF p. 7; calculations by the reader.}
\end{frame}
\begin{frame}{Backup: use the tables when prose disagrees}
\begin{itemize}
\item Fig. 1 left panel says MATH-500 below it, but the y-axis is AIME26 pass@1.
\item Sec. 4.2 incorrectly identifies several winning baselines.
\item Table 1: Gemma4 leads AMC23 pass@1; Qwen3.5 leads GPQA.
\item MMLU-Red: MELT 74.2, Gemma4 and Qwen3.5 both 75.3.
\item These issues qualify broad claims without reversing the KV ratio.
\end{itemize}
\papersource{Paper, Fig. 1, p. 1; Table 1, p. 6; Sec. 4.2, p. 7.}
\end{frame}
\begin{frame}{Backup: reproducibility details and limits}
\begin{itemize}
\item Appendix F reports that the authors could not fully reproduce the original Ouro paper's scores.
\item Their inspected early-exit implementation selected logits without skipping all later loop computation.
\item These are author observations, not an audit of current code.
\item v2 promises a future code/model release; later availability was not checked.
\item Exact KD details, initial memory handling, and runtime overhead need implementation-level verification.
\end{itemize}
\papersource{Paper, Sec. 1, PDF p. 2; Appendices D and F, pp. 18--21; reader notes.}
\end{frame}
\end{document}
