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

\definecolor{AcademicBlue}{RGB}{26,57,86}
\definecolor{AcademicTeal}{RGB}{0,105,112}
\definecolor{SoftBlue}{RGB}{231,241,248}
\definecolor{SoftRed}{RGB}{250,233,231}
\definecolor{SoftPurple}{RGB}{239,232,249}
\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}}
\newcommand{\RankMe}{\mathrm{RankMe}}
\newcommand{\aReQ}{\alpha_{\mathrm{ReQ}}}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}

\title[Representation geometry]{Tracing the Representation Geometry of Language Models\\from Pretraining to Post-training}
\subtitle{A spectral view of learning phases and post-training trade-offs}
\author{Paper by M. Z. Li, K. K. Agrawal, A. Ghosh, K. K. Teru,\\A. Santoro, G. Lajoie, and B. A. Richards}
\date{Research group reading \quad 25 October 2026\\\href{https://arxiv.org/abs/2509.23024v1}{arXiv:2509.23024v1}}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{Falling loss conceals changes in learned features}
  \begin{columns}[T,onlytextwidth]
    \column{0.52\textwidth}
    \begin{block}{Research question}
      How do internal feature directions change during pretraining and post-training, and when do those changes align with model behavior?
    \end{block}
    \column{0.43\textwidth}
    \begin{block}{Why spectra?}
      Loss averages prediction error. A covariance spectrum records how hidden-state variance is distributed across feature directions.
    \end{block}
  \end{columns}
  \medskip
  \begin{center}
    Checkpoint sequence $\longrightarrow$ feature geometry $\longrightarrow$ behavioral comparison
  \end{center}
  \papersource{Paper, Sec. 1, PDF pp. 1--3; Fig. 1, PDF p. 2.}
\end{frame}

\begin{frame}{A checkpoint becomes a covariance spectrum}
  \begin{enumerate}
    \item Feed the same evaluation sequences through each checkpoint.
    \item Take the \alert{last-layer, last-token} vector from each sequence.
    \item Center the $M\times d$ feature matrix $F$; diagonalize its covariance.
  \end{enumerate}
  \[
    F=\begin{bmatrix}f_\theta(x_1)^\top\\[-1mm]\vdots\\[-1mm]f_\theta(x_M)^\top\end{bmatrix},
    \qquad \widehat\Sigma=\frac{1}{M}F^\top F,
    \qquad \lambda_1\ge\cdots\ge\lambda_d\ge0.
  \]
  \begin{block}{What the spectrum records}
    The relative variance along principal feature directions, rather than one aggregate prediction score.
  \end{block}
  \papersource{Paper, Sec. 2.1, PDF p. 3; Fig. 1A--B, PDF p. 2.}
\end{frame}

\begin{frame}{RankMe and $\aReQ$ describe complementary geometry}
  \[
    p_i=\frac{\lambda_i}{\sum_j\lambda_j},\qquad
    \RankMe=\exp\!\left(-\sum_i p_i\log p_i\right),\qquad
    \lambda_i\propto i^{-\aReQ}.
  \]
  \medskip
  \begin{tabular}{@{}lll@{}}
    \toprule
    Measure & Larger value means & Smaller value means \\
    \midrule
    RankMe & variance spread over more axes & fewer effective axes \\
    $\aReQ$ & steeper spectrum, more concentration & flatter spectrum \\
    \bottomrule
  \end{tabular}
  \medskip
  \begin{block}{Read the pair together}
    Expansion: RankMe $\uparrow$, $\aReQ\downarrow$.\qquad
    Anisotropic compression: RankMe $\downarrow$, $\aReQ\uparrow$.
  \end{block}
  \papersource{Paper, Sec. 2.1 and Eq. (1), PDF pp. 3--4.}
\end{frame}

\begin{frame}{The experiments span pretraining and adaptation}
  \begin{itemize}
    \item \textbf{OLMo-2, 1B and 7B:} intermediate pretraining checkpoints; separate 1B SFT runs compare Anthropic-HH and AlpacaFarm.
    \item \textbf{Pythia, 70M--12B:} common Pile training recipe across scales; probe $\infty$-gram alignment, SciQ, and TriviaQA.
    \item \textbf{T\"ulu-3.1, 8B:} Llama-3.1 base $\rightarrow$ SFT $\rightarrow$ DPO $\rightarrow$ RLVR; probe geometry and AMC-23 pass@$k$.
  \end{itemize}
  \begin{block}{Common geometry probe}
    FineWeb sequences; main spectral setup uses 15,000 sequences of at most 512 tokens.
  \end{block}
  \papersource{Paper, Sec. 3, PDF pp. 5--6; Appendix A, PDF pp. 19--21. FineWeb is a geometry probe, not a shared pretraining corpus.}
\end{frame}

\begin{frame}{Pretraining passes through three geometric phases}
  \centering
  \includegraphics[width=0.98\linewidth,height=0.66\textheight,keepaspectratio]{figures/fig2_full.png}
  \vspace{-2mm}
  \begin{center}
    Warmup collapse $\rightarrow$ entropy-seeking expansion $\rightarrow$ anisotropic compression
  \end{center}
  \papersource{Paper, Fig. 2, PDF p. 5. Horizontal axes show pretraining tokens on log scales.}
\end{frame}

\begin{frame}{OLMo-2 geometry is non-monotonic}
  \begin{columns}[T,onlytextwidth]
    \column{0.48\textwidth}
    \centering
    \includegraphics[width=\linewidth,height=0.70\textheight,keepaspectratio]{figures/fig2_olmo.png}
    \column{0.48\textwidth}
    \begin{itemize}
      \item Initial collapse: RankMe falls, $\aReQ$ rises.
      \item Middle phase: RankMe rises sharply as the spectrum flattens.
      \item Later phase: the spectrum becomes more concentrated.
      \item Very late OLMo checkpoints hint at another expansion.
    \end{itemize}
  \end{columns}
  \papersource{Paper, Fig. 2C--D, PDF p. 5; Sec. 3.1, PDF pp. 6--7.}
\end{frame}

\begin{frame}{Pythia reproduces the pattern across scales}
  \begin{columns}[T,onlytextwidth]
    \column{0.49\textwidth}
    \centering
    \includegraphics[width=\linewidth,height=0.70\textheight,keepaspectratio]{figures/fig2_pythia.png}
    \column{0.47\textwidth}
    \begin{itemize}
      \item The 1B--12B curves share collapse, expansion, and compression.
      \item Their phase timing shifts with model scale.
      \item Appendix results also show the pattern below 1B parameters.
    \end{itemize}
  \end{columns}
  \papersource{Paper, Fig. 2E--F, PDF p. 5; Appendix Fig. 11, PDF p. 30.}
\end{frame}

\begin{frame}{The phase shape survives several measurement choices}
  \begin{tabular}{@{}P{3.4cm}P{7.9cm}@{}}
    \toprule
    Changed quantity & Reported outcome \\
    \midrule
    Layer & Intermediate layers show related phase trajectories. \\
    Sequence count and length & OLMo-2 phase shape persists under tested choices. \\
    Probe dataset & Pythia and OLMo retain broadly similar phase shapes; absolute RankMe can vary. \\
    Model size & Pythia models below 1B also show the sequence. \\
    \bottomrule
  \end{tabular}
  \begin{block}{Practical use}
    The last layer is a compact tracking signal for the training trajectory in these model families.
  \end{block}
  \papersource{Paper, Fig. 3, PDF p. 6; Appendix Figs. 8--11, PDF pp. 29--30.}
\end{frame}

\begin{frame}{$\infty$-gram alignment probes corpus-local statistics}
  \begin{itemize}
    \item An $\infty$-gram model backs off from the longest corpus-matched prefix.
    \item $\mathrm{Mem}_\infty$ is Spearman rank correlation between its answer likelihoods and the LLM's.
    \item On TriviaQA, \alert{88.73\%} of matched suffixes have length $\le5$.
  \end{itemize}
  \[
    \mathrm{Mem}_\infty
    =\rho_s\!\left(\bar P_{\infty,\mathcal D}(y\mid u\oplus x),
                      \bar P_{\mathrm{LLM}}(y\mid u\oplus x)\right).
  \]
  \begin{block}{Interpretation}
    Higher correlation means closer alignment with corpus n-gram statistics, not measured verbatim copying.
  \end{block}
  \papersource{Paper, Sec. 2.2, Eq. (2), PDF p. 4; Table 1, PDF p. 7.}
\end{frame}

\begin{frame}{Local-statistic alignment peaks before TriviaQA rises}
  \centering
  \includegraphics[width=0.98\linewidth,height=0.62\textheight,keepaspectratio]{figures/fig4_full.png}
  \vspace{-1mm}
  \begin{center}
    $\infty$-gram alignment rises in expansion; TriviaQA accuracy grows mostly during compression.
  \end{center}
  \papersource{Paper, Fig. 4A--B, PDF p. 8. Each column is one Pythia scale; dots are SciQ, thin lines TriviaQA.}
\end{frame}

\begin{frame}{SciQ and spectrum co-vary across checkpoints}
  \begin{tabular}{@{}lcc@{}}
    \toprule
    Model & corr(SciQ, $\aReQ$) & corr(SciQ, RankMe) \\
    \midrule
    Pythia-1B & 0.810 & $-0.759$ \\
    Pythia-6.9B & 0.837 & $-0.885$ \\
    Pythia-12B & 0.836 & $-0.839$ \\
    OLMo-2-1B & 0.540 & $-0.616$ \\
    \bottomrule
  \end{tabular}
  \medskip
  \begin{block}{Reading the result}
    Better SciQ checkpoints tend to have steeper spectra and lower effective rank in this analysis. The comparison follows training trajectories, so it does not isolate a causal role for the spectrum.
  \end{block}
  \papersource{Paper, Appendix Table 9, PDF p. 30. Reported coefficients; p-values are in the paper.}
\end{frame}

\begin{frame}{A steep spectrum does not make its tail dispensable}
  \begin{tabular}{@{}lccc@{}}
    \toprule
    SciQ accuracy & Original & Keep top 10 & Remove top 10 \\
    \midrule
    Pythia-1B & 0.838 & 0.225 & 0.849 \\
    Pythia-6.9B & 0.896 & 0.202 & 0.893 \\
    OLMo-2-7B & 0.970 & 0.155 & 0.966 \\
    \bottomrule
  \end{tabular}
  \medskip
  \begin{block}{Implication}
    Compression changes the \alert{distribution of variance}; useful information remains spread through the full spectrum.
  \end{block}
  \papersource{Paper, Table 2, PDF p. 7; discussion, PDF p. 13.}
\end{frame}

\begin{frame}{A toy cross-entropy model reproduces the phase sequence}
  \centering
  \includegraphics[width=0.98\linewidth,height=0.59\textheight,keepaspectratio]{figures/fig5_toy.png}
  \vspace{-1mm}
  \begin{center}
    Skewed class frequencies + feature bottleneck $d<|\mathcal V|$ produce expansion followed by concentration.
  \end{center}
  \papersource{Paper, Sec. 3.3 and Fig. 5, PDF pp. 9--10. The figure is a simplified linear model.}
\end{frame}

\begin{frame}{Gradient dynamics favor existing directions under assumptions}
  \[
    Z=FW,\quad A=\operatorname{softmax}(Z)-Y,\qquad
    \dot F=-\eta AW^\top,\quad \dot W=-\eta F^\top A.
  \]
  \begin{enumerate}
    \item These updates preserve $F^\top F-WW^\top$.
    \item If that difference is zero at initialization, feature and classifier singular values stay paired.
    \item For a paired singular value $s_i$: $\dot s_i=-\eta g_i s_i$; $g_i$ depends on residuals and current vectors.
  \end{enumerate}
  \begin{block}{Scope}
    The derivation assumes linear features and orthonormal input rows. The sign of $g_i$ changes with training; the equation alone does not force compression.
  \end{block}
  \papersource{Paper, Appendix B.1--B.4, PDF pp. 23--27; Eqs. (12), (15)--(20).}
\end{frame}

\begin{frame}{Toy controls locate the ingredients for compression}
  \begin{tabular}{@{}P{4.3cm}P{6.8cm}@{}}
    \toprule
    Toy-model intervention & Observed rank trajectory \\
    \midrule
    Uniform class frequencies & Expansion continues; no analogous compression. \\
    Remove feature bottleneck & Expansion continues; no analogous compression. \\
    Replace cross-entropy with MSE & Rank expands and saturates. \\
    \bottomrule
  \end{tabular}
  \medskip
  \begin{block}{Mechanistic reading}
    Frequent classes separate first; later classes reuse limited feature directions, causing anisotropic growth.
  \end{block}
  \papersource{Paper, Sec. 3.3, PDF pp. 9--10; Appendix Figs. 12--13, PDF pp. 31--32.}
\end{frame}

\begin{frame}{Post-training objectives move geometry in opposite directions}
  \begin{columns}[T,onlytextwidth]
    \column{0.48\textwidth}
    \centering
    \includegraphics[width=\linewidth,height=0.70\textheight,keepaspectratio]{figures/fig6_posttrain_geometry.png}
    \column{0.48\textwidth}
    \begin{itemize}
      \item SFT: RankMe rises.
      \item DPO: RankMe rises sharply; $\aReQ$ falls.
      \item RLVR: RankMe falls.
    \end{itemize}
    \begin{block}{Setup}
      Sequential T\"ulu-3.1 8B checkpoints derived from Llama-3.1-8B.
    \end{block}
  \end{columns}
  \papersource{Paper, Sec. 3.4 and Fig. 6A, PDF pp. 10--11.}
\end{frame}

\begin{frame}{SFT becomes more sensitive to its instruction data}
  \begin{columns}[T,onlytextwidth]
    \column{0.49\textwidth}
    \centering
    \includegraphics[width=\linewidth,height=0.70\textheight,keepaspectratio]{figures/fig6_sft.png}
    \column{0.47\textwidth}
    \begin{itemize}
      \item OLMo-2-1B is fine-tuned on Anthropic-HH; AlpacaFarm tests distribution shift.
      \item ID loss keeps improving; OOD loss falls, then levels off or slightly rebounds.
      \item Anthropic-HH-SFT vs AlpacaFarm-SFT chat win rate drops from about 14\% to 9\%.
    \end{itemize}
  \end{columns}
  \papersource{Paper, Fig. 6B, PDF p. 11; Appendix Fig. 14, PDF p. 33. The body text says OOD loss ``increases,'' but the plots/captions support saturation after an overall fall.}
\end{frame}

\begin{frame}{DPO's pairwise objective accompanies rank expansion}
  \[
    \mathcal L_{\mathrm{DPO}}=-\mathbb E\log\sigma\!\left(
      \widehat r_\theta(x,y_w)-\widehat r_\theta(x,y_l)\right),
  \]
  \[
    \widehat r_\theta(x,y)=\beta\log\frac{\pi_\theta(y\mid x)}{\pi_{\mathrm{ref}}(y\mid x)}.
  \]
  \begin{itemize}
    \item $y_w$ and $y_l$ are preferred and dispreferred responses.
    \item The loss can be written as a two-way contrastive softmax.
    \item In T\"ulu checkpoints, RankMe rises and $\aReQ$ falls during DPO.
  \end{itemize}
  \papersource{Paper, Eq. (3), PDF p. 4; Sec. 3.4 and Eq. (5), PDF p. 11. The contrastive analogy is an interpretation.}
\end{frame}

\begin{frame}{RLVR gains at small $k$ but loses at large $k$}
  \begin{columns}[T,onlytextwidth]
    \column{0.49\textwidth}
    \centering
    \includegraphics[width=\linewidth,height=0.70\textheight,keepaspectratio]{figures/fig6_rlvr.png}
    \column{0.47\textwidth}
    \begin{itemize}
      \item At AMC-23 pass@16, the late RLVR checkpoint beats post-DPO.
      \item At pass@256, post-DPO and an intermediate checkpoint beat late RLVR.
      \item RankMe falls during the same RLVR stage.
    \end{itemize}
    \begin{block}{Reading}
      Reward-aligned solutions become easier to sample, while high-$k$ coverage narrows.
    \end{block}
  \end{columns}
  \papersource{Paper, Fig. 6C, PDF p. 11; pass@$k$ estimator with $N=512$, Eq. (4), PDF p. 5.}
\end{frame}

\begin{frame}{Geometry is a useful trajectory marker, with clear limits}
  \begin{enumerate}
    \item RankMe and $\aReQ$ reveal changes hidden by average loss.
    \item Expansion aligns with $\infty$-gram statistics; compression aligns with later QA gains and RLVR behavior.
    \item The main behavior links are correlational; the mechanistic derivation is for a linear toy model.
  \end{enumerate}
  \begin{block}{Empirical scope}
    English-language model families up to 12B parameters; spectral estimates need roughly $10^4$ probe sequences.
  \end{block}
  \papersource{Paper, Secs. 3--6, PDF pp. 5--14.}
\end{frame}

\begin{frame}{A useful next test: intervene on geometry}
  \begin{block}{Question for discussion}
    Does the compression phase help generalization, or does it merely accompany another training change?
  \end{block}
  \begin{enumerate}
    \item Match checkpoints on loss and compute budget.
    \item Perturb head and tail eigendirections separately.
    \item Vary the required context length and measure task performance.
  \end{enumerate}
  \medskip
  \textit{This is a proposed experiment, not a result reported in the paper.}
  \papersource{Motivated by Paper, Fig. 4 and Table 2, PDF pp. 7--8; limitations, PDF p. 13.}
\end{frame}

\appendix

\begin{frame}{Backup: key measurement and SFT settings}
  \begin{tabular}{@{}P{4.6cm}P{6.5cm}@{}}
    \toprule
    Setting & Paper value \\
    \midrule
    Main spectral probe & FineWeb sample-10BT; 15,000 sequences; max 512 tokens; batch 16 \\
    OLMo-2-1B SFT & Anthropic-HH or AlpacaFarm; 2 epochs; learning rate $10^{-5}$; 5 seeds \\
    ID/OOD loss evaluation & 10,000 sequences; max 1,024 tokens \\
    RLVR pass@$k$ & AMC-23; $N=512$ samples; $k\le256$ \\
    \bottomrule
  \end{tabular}
  \papersource{Paper, Appendix A, Tables 5--8, PDF pp. 21--22; Eq. (4), PDF p. 5.}
\end{frame}

\begin{frame}{Backup: full top-direction ablation}
  \begin{tabular}{@{}lccccc@{}}
    \toprule
    Model & Original & Top 10 out & Top 10 only & Top 50 out & Top 50 only \\
    \midrule
    Pythia-1B & .838 & .849 & .225 & .835 & .318 \\
    Pythia-1.4B & .866 & .855 & .232 & .859 & .324 \\
    Pythia-2.8B & .884 & .880 & .219 & .873 & .317 \\
    Pythia-6.9B & .896 & .893 & .202 & .906 & .327 \\
    OLMo-2-1B & .953 & .943 & .199 & .954 & .326 \\
    OLMo-2-7B & .970 & .966 & .155 & .970 & .308 \\
    \bottomrule
  \end{tabular}
  \papersource{Paper, Table 2, PDF p. 7. SciQ accuracy after retaining or removing leading eigendirections.}
\end{frame}

\end{document}
