Wanzhou Lei 雷挽洲

I'm Wanzhou Lei, a third-year Ph.D. student in Applied Mathematics at the University of California, Berkeley, advised by Prof. Per-Olof Persson. Before coming to Berkeley, I received my M.S. in Data Science from Harvard University, where I was advised by Prof. Pavlos Protopapas, and my B.S. in Mathematics and Computer Science from New York University, where I was advised by Prof. Yunan Yang.

My research focuses on generative models for vision. I work on the representation spaces in which images are generated and restored, on better training of diffusion models, and on text conditioning in image generation. I am also interested in the theory of how attention learns, and in machine learning for scientific computing.

In my free time, I am a crazy butterfly enthusiast. I take ecological photos of butterflies all over the world, with an emphasis on Chinese and Neotropical species, and I am working on a book, Ecological Photo Guide to Butterflies in Tropical Andean Region. Some of my photos are in my photo gallery.

Feel free to send me an email to discuss anything.

UC Berkeley
UC Berkeley
Ph.D., 2024–
Harvard University
Harvard
M.S., 2022–24
New York University
NYU
B.S., 2018–22
Alibaba
Research Intern
2026
ASML
R&D Intern
2025

Selected Research

A low-resolution input next to the RAESR restoration
UNDER REVIEW · 2026arXiv

Super-Resolution in the Right Latent Space: A Frozen Vision-Foundation Substrate

W. Lei, C. Shen, Y. He, et al.

RAESR restores real-world low-resolution images inside the fused latent of a frozen DINOv3-L encoder, with a single decoder pass and no diffusion sampling loop. It attains the best fidelity–perception trade-off among state-of-the-art restorers at 37 ms per 512×512 image.

ImageNet 256x256 samples from the SWIFT model with 0.99 FID
UNDER REVIEW · 2026arXiv

SWIFT: Self-guided Weak-to-strong Diffusion Models via Target Extrapolation

Y. He, C. Shen, W. Lei, et al.

SWIFT moves weak-to-strong guidance from sampling into training: each regression target is extrapolated away from a frozen weak denoiser, so the guide is dropped at inference. One fixed recipe lowers unguided ImageNet-256 FID in all 18 DiffusionBench configurations, and on RAEv2 it reaches 1.15 FID without guidance and 0.99 with it.

One prompt, a blue pickup truck carrying a rhinoceros, rendered by the same frozen FLUX.2-klein generator with its native 4B text encoder and with a 0.6B encoder transplanted by TET
UNDER REVIEW · 2026

Match the Behavior, Not the Features: Transplanting Text Encoders into Frozen Image Generators

H. Yuan, J. Yuan, W. Lei, et al.

TET swaps the text encoder of a frozen text-to-image generator for an arbitrary new one, without retraining the backbone or using any image data. Distilling the model's behavior rather than the native encoder's features keeps near-native alignment on FLUX.2-klein with the encoder compressed by up to 85%, and a multilingual encoder makes the same frozen generator produce images in 12 languages zero-shot.

Accuracy by sample type during training: three types are fit at once, the fourth stays wrong through a long plateau and then flips, lifting overall accuracy from 5/6 to 1
MANUSCRIPT · 2026

When Cross-Attention Learns the Shared Signal: Training Dynamics, Memorization, and Generalization

W. Lei, et al.

We prove that gradient-flow training of one-layer cross-attention escapes the 5/6 accuracy ceiling of flat attention on a synthetic multimodal task. The escape is a delayed feature-learning transition: values first fit three of the four classes, then the matched query–key score grows and flips the fourth, after which every fresh sample is classified correctly.

Experience

Education

News

Publications