Zefan Cai

Zefan Cai

I am a Ph.D. student in Computer Science at the University of Wisconsin–Madison, advised by Junjie Hu.

I work on how a long-context model should hold on to what it has read. Attention keeps everything and pays for it; recurrent and fast-weight models compress and forget. Almost everything I do sits on that trade — what the memory is, how it is written, and how it is read back. I consider long context the most important open problem in LLMs.

My work runs in four lines:

Browse the Research directory for individual project pages with methods, results and paper figures.

Blog

All posts

Universal Test-Time Training

Test-time training gives every layer a fast-weight memory of its own. Letting all layers share one memory instead adds 2.6 and 2.1 RULER points to 124M and 760M language models at the same state, gains 0.92 dB in novel view synthesis, and trains faster.

A network without a manager

Sixteen DeepSeek V4.1 Flash agents with nobody in charge rewrote pandoc from scratch in six hours and passed 55% of its hidden tests, 18 points above the best single agent we ran. Thirty-two reached 69% and were still climbing when the clock ran out.

Experience

  • Adobe Research San Jose, California · May 2025 – July 2026 Supervisor: Hao Tan Three projects on long-context memory: LastKV, Universal Test-Time Training, and Test-Time Generation.
  • Microsoft AI Supervisor: Wen Xiao from MAI Inference acceleration: KV cache optimization (R-KV, PyramidKV). Reinforcement learning for code and reasoning. Memory optimization for agent harnesses.
  • Qwen Supervisor: Tianyu Liu Post-training for Qwen2.5: reinforcement learning to improve math and code reasoning.

Education

  • Ph.D., University of Wisconsin–Madison Sept. 2024 – June 2028 (expected) Advisor: Junjie Hu
  • M.S., Peking University Sept. 2022 – June 2024 Advisor: Baobao Chang
  • B.S., Beijing Jiaotong University Sept. 2018 – June 2022

Awards

  • Qualcomm Innovation Fellowship 2026 (North America), Finalist Based on the project Test-Time Generation
  • COLM 2025 Spotlight PyramidKV
  • CVPR 2026 Outstanding Reviewer
  • ICLR 2025 Notable Reviewer

Selected work

All publications

Test-Time Training

Universal Test-Time Training

COLM 2026 ER Workshop Spotlight

Zefan Cai*, Qinzhe Hu*, Ziqiao Ma, Hao Tan, Junjie Hu

Shared fast-weight memory across time and depth, for language modeling and novel-view synthesis. At matched state and active compute, uTTT-MoE gains 2.6 and 2.1 RULER points over layer-private TTT-MoE at 124M and 760M.

Test-Time Generation

COLM 2026 ER Workshop Spotlight

Zefan Cai, Hao Tan, Yuchen Zhu, Tianyuan Zhang, Sai Bi, Haoyi Qiu, Yicong Hong, Jason Kuen, Haoliang Wang, Haozhe Zhao, Ruiyi Zhang, Ryan A. Rossi, Wanrong Zhu, Molei Tao, Wen Xiao, Rajiv Jain, Junjie Hu, Jiuxiang Gu

Generate each memory read from fresh noise, guided by a query. TTG improves average retrieval and novel-view reconstruction over the tested fast-weight baselines, and repeated reads recover alternative values in a controlled memory test.

Model Architecture

Last Layer Key-Value Cache is All You Need

COLM 2026 ER Workshop Spotlight

Zefan Cai, Sai Bi, Lin Zhang, Yicong Hong, Chongjian Ge, Xun Huang, Jiuxiang Gu, Junjie Hu, Hao Tan

Let every layer read a shared last-layer KV history, feeding deep past representations back into future computation. Chunked processing preserves parallel attention within each chunk and reduces long-term KV storage toward 1/L of a standard L-layer Transformer.

KV Cache Optimization

PyramidKV

COLM 2025 Spotlight

Zefan Cai, Yichi Zhang, Bofei Gao, Yuliang Liu, Yucheng Li, Tianyu Liu, Keming Lu, Wayne Xiong, Yue Dong, Junjie Hu, Wen Xiao

Attention funnels with depth, so the cache budget should too. Full-cache quality at 12% of the KV cache.

R-KV

NeurIPS 2025

Zefan Cai, Wen Xiao, Hanshi Sun, Cheng Luo, Yikai Zhang, Ke Wan, Yucheng Li, Yeyang Zhou, Li-Wen Chang, Jiuxiang Gu, Zhen Dong, Animashree Anandkumar, Abedelkadir Asi, Junjie Hu

Reasoning traces are self-repetitive, so evict for redundancy as well as importance. ~100% of full-cache accuracy at a 10% budget, 6.6× throughput.

Looped Transformers

Loopback Transformer: Towards a Unified View of Residual Looped Transformers

Preprint 2026

Zefan Cai*, Xuan Ouyang*, Chenlong Zhang, Cheng Luo, Ke Wan, Junjie Hu

Store each block’s update, not its output: looped blocks write to an explicit history that is read back with geometric decay and a learned query. On ClimbMix, with training tokens and executed depth matched, Loopback reaches lower validation loss than standard Transformers from 191M to 3B while storing 40–75% of their Transformer parameters.

Loo-P beyond Language: Scaling Looped Transformers with Structured Residuals

Preprint 2026

Yiran Xu, Yawen Luo, Hanwen Jiang, Chongjian Ge, Zefan Cai

Structured residuals for looped Transformers, with no added learnable parameters, tested on language, image generation and 3D reconstruction. Whether sharing pays depends on the task: with 34.6–45.0% fewer parameters, Loo-P reaches lower training loss than independent layers in text-to-image and 3D reconstruction and ends 0.21% above in class-to-image, while in language it narrows the gap without closing it.