% BrainLoRA paper discussion. Compile with pdflatex.
\documentclass[aspectratio=169,11pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,graphicx,booktabs,array}
\graphicspath{{figures/}}
\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}
\newcommand{\papersource}[1]{\par\smallskip{\scriptsize\color{gray}#1\par}}

\begin{document}

\begin{frame}[plain]
  \vspace{0.45cm}
  {\Large\bfseries\color{AcademicBlue} Scaling Parameter-Efficient\\Fine-Tuning for Brain Encoding\par}
  \vspace{0.35cm}
  {\large BrainLoRA: a paper discussion\par}
  \vspace{0.35cm}
  {\footnotesize Zhuofan Josh Ying, Guanglong Sun, Nolan Ho, Kieran Liu, Rui Yang,\\
  Andrew Chen, Nikolaus Kriegeskorte, Pony Ma, and Hossein Adeli\par}
  \vspace{0.25cm}
  \begin{block}{Takeaway}
    Small, stimulus-aligned adapters improve whole-brain fMRI prediction on
    large multimodal backbones; a causal single pass and batched adapters make
    the approach computationally practical.
  \end{block}
  {\scriptsize \href{https://arxiv.org/abs/2610.26802v1}{arXiv:2610.26802v1}
  (19 Oct 2026) \quad
  \href{https://arxiv.org/abs/2610.26802}{Publication not found as of 28 Oct 2026}
  \quad \href{https://github.com/zfying/brain-lora}{Official code}\par}
\end{frame}

\begin{frame}{The task: predict responses to natural movies}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.52\textwidth}
      \begin{block}{Brain encoding}
        \[\hat Y=g_\phi\!\left(f_\theta(X)\right)\]
        $X$: synchronized video, audio, transcript.\\
        $f_\theta$: pretrained multimodal backbone.\\
        $g_\phi$: temporal alignment and parcel readout.
      \end{block}
    \end{column}
    \begin{column}{0.44\textwidth}
      \begin{itemize}
        \item Target: fMRI responses in 1,000 Schaefer parcels.
        \item Four subjects, naturalistic audiovisual stimuli.
        \item Metric: mean parcel-wise temporal Pearson $r$ across subjects; higher is better.
      \end{itemize}
    \end{column}
  \end{columns}
  \papersource{Paper, Secs. 3--4, Eq. (1), PDF pp. 4--5.}
\end{frame}

\begin{frame}{Neural data should shape the representation}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.48\textwidth}
      \begin{block}{Dominant frozen-backbone pipeline}
        Pretrained features $\rightarrow$ train a readout on neural data.
      \end{block}
      \begin{itemize}
        \item Retains a strong pretrained prior.
        \item Cannot specialize the backbone to brain prediction.
        \item MIRAGE uses a frozen Qwen3-Omni and a 1.1B-parameter readout.
      \end{itemize}
    \end{column}
    \begin{column}{0.48\textwidth}
      \begin{block}{BrainLoRA}
        Pretrained features $\rightarrow$ small backbone update
        $\rightarrow$ lightweight readout.
      \end{block}
      \begin{itemize}
        \item Neural supervision reaches the representation.
        \item Most pretrained weights remain fixed.
        \item Main single model trains 61.4M parameters.
      \end{itemize}
    \end{column}
  \end{columns}
  \papersource{Paper, Secs. 1--3, PDF pp. 1--4; Fig. 1; Table 1.}
\end{frame}

\begin{frame}{PEFT constrains the trainable parameter space}
  \[
  \Theta_{\rm frozen}=\{\theta_0\}
  \subset
  \Theta_{\rm PEFT}=\{\theta_0+\Delta(\psi):\psi\in\mathbb R^k\}
  \subset
  \Theta_{\rm full}=\mathbb R^d,\quad k\ll d,\ \Delta(0)=0.
  \]
  \vspace{0.1cm}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.31\textwidth}
      \begin{block}{Scale up}Use a stronger pretrained backbone $\theta_0$.\end{block}
    \end{column}
    \begin{column}{0.31\textwidth}
      \begin{block}{Scale down}Learn a small adapter $\psi$ from limited neural data.\end{block}
    \end{column}
    \begin{column}{0.31\textwidth}
      \begin{block}{Scale out}Train many specialized adapters on shared weights.\end{block}
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 3, Eq. (2), PDF p. 4; Fig. 1, p. 2.}
\end{frame}

\begin{frame}{Validation, ID, and OOD test different questions}
  \begin{center}
  \begin{tabular}{>{\raggedright\arraybackslash}p{0.24\textwidth}
    >{\raggedright\arraybackslash}p{0.32\textwidth}
    >{\raggedright\arraybackslash}p{0.32\textwidth}}
    \toprule Split & Stimulus & Role \\ \midrule
    Train & Friends seasons 1--5 and movie10 & Fit adapters and readouts \\
    Validation & Friends season 6 & Select designs and ensemble weights \\
    ID test & Held-out Friends season 7 & Challenge server score \\
    OOD test & Held-out movies & Challenge server score \\
    \bottomrule
  \end{tabular}
  \end{center}
  \vspace{0.2cm}
  \begin{block}{Controlled single-model comparison}
    MIRAGE and BrainLoRA use the same Qwen3-Omni backbone.
    Published baseline scores in Table 1 are cited from their authors;
    BrainLoRA model choices use season 6 only.
  \end{block}
  \papersource{Paper, Sec. 4, PDF p. 4; Table 1, p. 6; App. D, pp. 18--19.}
\end{frame}

\begin{frame}{A causal pass replaces repeated sliding windows}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.49\textwidth}
      \centering\includegraphics[width=\linewidth,height=0.74\textheight,keepaspectratio]{fig16_extraction.pdf}
    \end{column}
    \begin{column}{0.47\textwidth}
      \begin{itemize}
        \item Baseline: re-encode overlapping context at every prediction time.
        \item BrainLoRA: one pass per 149\,s window produces all 100 TR features.
        \item Add a 60\,s context lead to restore the start of each window.
        \item Decoder causality helps; audio and vision front ends are locally bidirectional.
      \end{itemize}
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 4, Fig. 2, PDF p. 5; Apps. B and F, pp. 16--17, 21.}
\end{frame}

\begin{frame}{The adapter updates early attention layers}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.52\textwidth}
      \begin{block}{Qwen3-Omni configuration}
        \begin{itemize}
          \item Read decoder layer 32 of 48; truncate there.
          \item Rank-16 LoRA on $q/k/v/o$ projections through layer 32.
          \item 8.91M backbone-side trainable parameters.
          \item Audio and vision towers remain frozen.
        \end{itemize}
      \end{block}
    \end{column}
    \begin{column}{0.44\textwidth}
      \[W'=W_0+\frac{\alpha}{r}BA\]
      \begin{center}$r=16,\quad \alpha=32$.\end{center}
      \small
      Standard LoRA notation illustrates the paper's general
      $\Delta(\psi)$: train a low-rank update while keeping $W_0$ fixed.
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 4, PDF p. 5; App. S, p. 36.}
\end{frame}

\begin{frame}{The readout aligns stimulus features with fMRI}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.48\textwidth}
      \begin{block}{Linear readout}
        \begin{enumerate}
          \item Pool each modality on a 2\,Hz grid.
          \item Project 2048 $\rightarrow$ 512 dimensions.
          \item Average eight temporal lag blocks.
          \item Map $8\times3\times512=12{,}288$ features to 1,000 parcels per subject.
        \end{enumerate}
        52.3M trainable parameters.
      \end{block}
    \end{column}
    \begin{column}{0.48\textwidth}
      \begin{block}{Cross-attention readout}
        Per-TR queries attend to about 3.2k audio, video, and text tokens,
        replacing fixed lag averaging. Adds about 0.2M parameters.
      \end{block}
      \small The extra gain mainly comes from richer tokens:
      cross-attention over the same pooled features barely improves $r$.
    \end{column}
  \end{columns}
  \papersource{Paper, Secs. 4--5, PDF pp. 5--7; Apps. K and S, pp. 27, 37.}
\end{frame}

\begin{frame}{Closed-form re-fit improves the final readout}
  \begin{enumerate}
    \item Initialize from ridge regression on frozen features.
    \item Jointly train LoRA and readout for one epoch: 1,429 windows,
      one window and four subjects per step.
    \item Freeze adapted features; accumulate training moments and
      re-solve each parcel's final linear map by ridge regression.
  \end{enumerate}
  \vspace{0.2cm}
  \begin{block}{Measured contribution}
    LoRA + linear improves from $r=0.3202$ before re-fit
    to $r=0.3263$ after re-fit: $+0.0061$ on Friends season 6.
  \end{block}
  \small Ridge penalties use a holdout within training windows; season 6
  is used for design selection and scoring.
  \papersource{Paper, Secs. 4--5, Table 2, PDF pp. 5--7; App. D, pp. 18--19.}
\end{frame}

\begin{frame}{Extraction falls 352-fold; total cost falls 83-fold}
  \begin{center}
  \begin{tabular}{lrr}
    \toprule One A800-80GB; 331 clips & Sliding + large head & Causal + LoRA \\
    \midrule Feature extraction (GPU-h) & 701 & 1.99 \\
    Training (GPU-h) & 1.88 & 4.84 \\
    Closed-form re-fit (GPU-h) & --- & 1.67 \\
    \textbf{End-to-end (GPU-h)} & \textbf{702} & \textbf{8.5} \\
    Trainable parameters & 1,123M & 61.2M \\
    \bottomrule
  \end{tabular}
  \end{center}
  \vspace{0.2cm}
  \small Extraction: $701/1.99\approx352\times$; full pipeline:
  $702/8.5\approx83\times$. These measured protocols use different context
  and training procedures.
  \papersource{Paper, App. C, Table 4, PDF p. 18.}
\end{frame}

\begin{frame}{LoRA improves all nine tested backbones}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.62\textwidth}
      \centering\includegraphics[width=\linewidth,height=0.70\textheight,keepaspectratio]{fig15_backbone_wrap.pdf}
    \end{column}
    \begin{column}{0.34\textwidth}
      \begin{itemize}
        \item Backbones span 4.7B--104.3B total parameters.
        \item Every frozen-to-LoRA gain is $+0.032$ to $+0.066$ in validation $r$.
        \item Model size alone weakly orders accuracy: the 104B model is not best.
      \end{itemize}
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 5.1, Fig. 3, PDF p. 5; App. I, Table 12, p. 25.}
\end{frame}

\begin{frame}{A 61M-parameter model beats the published baseline}
  \begin{center}
  \begin{tabular}{l@{\hspace{20pt}}r@{\hspace{18pt}}r@{\hspace{18pt}}r@{\hspace{18pt}}r}
    \toprule Qwen3-Omni configuration & Trainable & Val & ID & OOD \\
    \midrule MIRAGE single, cited & 1.1B & 0.319 & 0.310 & 0.217 \\
    Frozen + linear & 52.3M & 0.291 & 0.287 & 0.187 \\
    LoRA + linear & 61.2M & 0.326 & 0.322 & 0.222 \\
    Frozen + cross-attn & 52.5M & 0.312 & 0.307 & 0.212 \\
    \textbf{LoRA + cross-attn} & \textbf{61.4M} & \textbf{0.331}
      & \textbf{0.327} & \textbf{0.228} \\
    Full tune + cross-attn & 20.3B & 0.330 & 0.326 & 0.225 \\
    \bottomrule
  \end{tabular}
  \end{center}
  \small ID: Friends season 7; OOD: held-out movies.
  The bold single model exceeds the published 15-model MIRAGE ensemble
  (ID 0.323, OOD 0.227) on ID and is similar on OOD.
  \papersource{Paper, Sec. 5.2, Table 1, PDF p. 6. Higher $r$ is better.}
\end{frame}

\begin{frame}{The adapter supplies the largest component gain}
  \begin{center}
  \begin{tabular}{lr}
    \toprule Qwen3-Omni, Friends s06 & Mean Pearson $r$ \\
    \midrule Frozen backbone + linear & 0.2907 \\
    LoRA + linear, before re-fit & 0.3202 \\
    LoRA + linear, after re-fit & \textbf{0.3263} \\
    Rank-32 LoRA + linear & 0.3268 \\
    LoRA + cross-attention & 0.3310 \\
    \bottomrule
  \end{tabular}
  \end{center}
  \begin{itemize}
    \item LoRA over matched frozen control: $+0.0356$.
    \item Re-fit: $+0.0061$; rank 16 to 32: only $+0.0005$.
    \item Differences below about 0.00077 are not resolved by reported seed spread.
  \end{itemize}
  \papersource{Paper, Sec. 5.3, Table 2, PDF p. 7; App. D, p. 19.}
\end{frame}

\begin{frame}{The benefit requires aligned stimulus--brain pairs}
  \begin{center}
  \begin{tabular}{llr}
    \toprule Backbone & Adapter training target & Validation $r$ \\
    \midrule Frozen & Aligned fMRI & 0.2907 \\
    LoRA & Aligned fMRI & \textbf{0.3263} \\
    Frozen & Shifted fMRI & 0.2617 \\
    LoRA & Shifted fMRI & 0.1874 \\
    \bottomrule
  \end{tabular}
  \end{center}
  \vspace{0.2cm}
  \small Shifted targets preserve subject-specific fMRI statistics but
  break stimulus pairing. All final readouts are re-fit on aligned training
  data. Shifted LoRA loses on 996/1,000 parcels against its matched shifted
  frozen control.
  \papersource{Paper, App. L, Table 13, PDF p. 28.}
\end{frame}

\begin{frame}{Adapted features transfer within the film domain}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.48\textwidth}
      \begin{block}{Leave one subject out}
        Train LoRA on three people; fit only the held-out person's readout
        on their training data. Gain over frozen: $+0.0301$ to $+0.0355$,
        about 97\% of the four-subject gain.
      \end{block}
    \end{column}
    \begin{column}{0.48\textwidth}
      \begin{block}{NNDb: new site and scanner}
        Transfer the Algonauts adapter \emph{and readout} without retraining.
        Across 20 viewers of a film, $r$ rises from 0.0991 to 0.1223,
        or $+11.1$ percentage points of NNDb's corrected noise ceiling.
      \end{block}
    \end{column}
  \end{columns}
  \small Both evaluations use naturalistic movies; NNDb also changes
  scanner, participants, preprocessing, and repetition time.
  \papersource{Paper, Apps. M--N, Tables 14--15, PDF pp. 29--30.}
\end{frame}

\begin{frame}{Attribution recovers sensory topography}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.68\textwidth}
      \centering\includegraphics[width=\linewidth,height=0.66\textheight,keepaspectratio]{fig12_attribution_top.pdf}
    \end{column}
    \begin{column}{0.28\textwidth}
      \small Enumerate all $2^3$ video/audio/text coalitions. Replace
      missing content by mean embeddings while keeping token timing.
      \par\medskip
      Early visual: 72.5\% video.\\
      Auditory: 72.9\% audio.\\
      Lateral temporal: 60.3\% audio.
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 5.4, Fig. 4a--b, PDF p. 8; App. Q, pp. 33--34.
  Percentages are prediction shares; maps show contribution to $r$.}
\end{frame}

\begin{frame}{Adaptation increases audio use and cross-stream mixing}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.66\textwidth}
      \centering\includegraphics[width=\linewidth,height=0.69\textheight,keepaspectratio]{fig12_attribution_bottom.pdf}
    \end{column}
    \begin{column}{0.30\textwidth}
      \small Mean audio contribution: $+39\%$ relative.\\
      Video: $+5\%$; text: $-17\%$.
      \vspace{0.2cm}
      Cross-stream readout share:
      \[8.9\%\ \longrightarrow\ 15.3\%\]
      $+6.4$ percentage points.
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 5.4, Fig. 4c--d, PDF p. 8; App. Q, pp. 33--35.
  Attribution uses the paper's content-removal baseline.}
\end{frame}

\begin{frame}{A fused kernel makes many adapters affordable}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.58\textwidth}
      \centering\includegraphics[width=\linewidth,height=0.68\textheight,keepaspectratio]{fig11_scaleout4_a.pdf}
    \end{column}
    \begin{column}{0.38\textwidth}
      \begin{itemize}
        \item Route samples to LoRA matrices in one batched gather--matmul.
        \item At 32 adapters, a fused step costs $1.08\times$ one adapter step.
        \item Relative to 32 sequential steps: $29.8\times$ faster.
      \end{itemize}
    \end{column}
  \end{columns}
  \small Measured at sequence length 128 on one A800. The gain comes from
  GPU utilization, not fewer FLOPs; full training gains are smaller.
  \papersource{Paper, Sec. 5.5, Fig. 5a, PDF p. 9; App. C, pp. 18--20.}
\end{frame}

\begin{frame}{Ensemble size helps until correlated errors dominate}
  \begin{columns}[T,onlytextwidth]
    \begin{column}{0.66\textwidth}
      \centering\includegraphics[width=\linewidth,height=0.64\textheight,keepaspectratio]{fig11_scaleout4_bc.pdf}
    \end{column}
    \begin{column}{0.30\textwidth}
      \small Random subsets fit
      \[m(n)=m_\infty-An^{-b}\]
      $b\simeq0.94$.
      At $n=20$, member quality and residual diversity jointly explain
      97\% of score variance in this pool.
    \end{column}
  \end{columns}
  \papersource{Paper, Sec. 5.5, Fig. 5b--c, PDF p. 9.
  The curve approaches a fitted ceiling.}
\end{frame}

\begin{frame}{The 261-model pool reaches the reported top rank}
  \begin{center}
  \begin{tabular}{l@{\hspace{12pt}}rrr}
    \toprule Ensemble & Val s06 & ID s07 & OOD movies \\
    \midrule MIRAGE, 15 models (cited) & 0.335 & 0.323 & 0.227 \\
    BrainLoRA, selected 15 & 0.347 & 0.341 & 0.247 \\
    BrainLoRA, 261 & \textbf{0.348} & \textbf{0.343} & \textbf{0.248} \\
    \bottomrule
  \end{tabular}
  \end{center}
  \vspace{0.2cm}
  \begin{itemize}
    \item A parcel-wise minimum-variance combiner is fitted out of fold by episode.
    \item Different backbones and readouts supply more diversity than seeds.
    \item First place refers to the public post-challenge leaderboard at paper-writing time.
  \end{itemize}
  \papersource{Paper, Sec. 5.5, Table 1, PDF pp. 6, 9--10; App. D, pp. 18--19.}
\end{frame}

\begin{frame}{The model pool still misses shared stimulus signal}
  \begin{block}{Cross-subject residual analysis}
    The 261-model uniform mean leaves
    \alert{32.5\% [30.0, 35.3]} of cross-subject
    stimulus-locked covariance unexplained.
  \end{block}
  \vspace{0.15cm}
  \begin{itemize}
    \item A single LoRA + linear model leaves 36.2\%.
    \item Averaging the pool recovers about 3.7 percentage points.
    \item The residual is slow and distributed; nine low-level
      stimulus statistics explain it at only $r=0.027$.
  \end{itemize}
  \papersource{Paper, App. R, Table 18, PDF pp. 35--36.
  Denominator: inter-subject covariance, not all brain-response variance.}
\end{frame}

\begin{frame}{Take-home messages}
  \begin{enumerate}
    \item Small, aligned backbone updates improve movie-to-fMRI prediction
      across all nine tested multimodal backbones.
    \item A causal pass cuts extraction cost about $352\times$;
      re-fit and richer readout tokens add measurable accuracy.
    \item Attribution suggests stronger audio use and cross-stream routing;
      ensembles improve the score, with correlated errors limiting gains.
  \end{enumerate}
  \vspace{0.2cm}
  \begin{block}{Evidence boundary}
    Main training uses four subjects and one naturalistic movie benchmark.
    Transfer changes people and scanner but remains in the film domain;
    a cross-task brain foundation model remains a proposal.
  \end{block}
  \papersource{Paper, Sec. 6, PDF p. 10; Apps. M--N and R, pp. 29--30, 35--36.}
\end{frame}

\begin{frame}{Paper and source links}
  \begin{itemize}
    \item Zhuofan Josh Ying et al.,
      \emph{Scaling Parameter-Efficient Fine-Tuning for Brain Encoding},
      \href{https://arxiv.org/abs/2610.26802v1}{arXiv:2610.26802v1}, 2026.
    \item \href{https://github.com/zfying/brain-lora}{Official BrainLoRA code}
      (linked from the paper and first-author homepage).
    \item \href{https://zfying.github.io/}{First-author research page}.
  \end{itemize}
  \vspace{0.25cm}
  \small Publication status checked 28 Oct 2026: no formal venue record
  found; the author lists the paper as arXiv.
\end{frame}

\appendix
\begin{frame}{Backup: 60 seconds of context recovers the window start}
  \begin{center}
  \begin{tabular}{lrr}
    \toprule Context lead & LoRA + linear before re-fit & After re-fit \\
    \midrule 0\,s & 0.3148 & 0.3206 \\
    30\,s & 0.3187 & 0.3249 \\
    60\,s & 0.3202 & \textbf{0.3263} \\
    90\,s & 0.3196 & 0.3260 \\
    120\,s & 0.3203 & \textbf{0.3263} \\
    \bottomrule
  \end{tabular}
  \end{center}
  \small Performance saturates near 60\,s while step time rises.
  These rows use window-local single-pass features.
  \papersource{Paper, App. B, Table 3, PDF p. 16.}
\end{frame}

\begin{frame}{Backup: the gain is not unique to LoRA}
  \begin{center}
  \begin{tabular}{lrr}
    \toprule Adapter family & Adapter parameters & Val s06 $r$ \\
    \midrule Frozen & 0 & 0.2907 \\
    IA$^3$ attention + FFN & 0.057M & 0.3127 \\
    IA$^3$ + MoE experts & 3.18M & 0.3177 \\
    Bottleneck, FFN only & 4.26M & 0.3164 \\
    Bottleneck, attention + FFN & 8.52M & 0.3190 \\
    LoRA rank 16 & 8.91M & \textbf{0.3263} \\
    \bottomrule
  \end{tabular}
  \end{center}
  \small The shared 52.3M readout is excluded from adapter parameters.
  Each family uses its screened learning rate.
  \papersource{Paper, App. H, Table 11, PDF p. 24.}
\end{frame}

\end{document}
