~/svah-x · waterloo, on · math undergrad

Kel vin  P eng

I study mathematics at the University of Waterloo, in Combinatorics & Optimization. Outside coursework I do machine learning research, mostly on mathematical reasoning and what goes on inside models.

state
bmath '27 · combinatorics & optimization · uwaterloo
attending_to
reasoning · interpretability · graph theory
contact
[email protected]

research / blk 01

Research interests.

fig 1 — a proper 3-edge-coloring of the pentagonal prism; each color class is a perfect matching.

interest 01

Graph theory & combinatorics

My home field: edge colorings, matchings, and the structure of graphs. I like problems whose answers can be checked mechanically.

h2 h1 h0
fig 2 — information moving between layer states.

interest 02

Model internals

A transformer computes by passing one hidden state through a stack of layers, each reading from it and writing back. I am interested in how information moves through that stack, and in ways to measure this on trained models.

x h y
fig 3 — h ← f(h, x), applied until the state stops changing.

interest 03

Reasoning by iteration

Reasoning does not have to be written out as text. Some models work by applying the same small network repeatedly, refining a latent state until it settles. I follow this line of work closely and reproduce papers from it, usually on puzzles where difficulty is easy to control.

projects / blk 02

Selected projects.

Research prototypes, training infrastructure, and one hackathon. Code is on GitHub.

01

TopoAdamW

An AdamW variant that adjusts its step size using topological summaries of the local loss surface, computed with GUDHI. A safety lock limits the adjustment when the geometry estimate looks unreliable. Benchmarked against plain AdamW on CIFAR-10.

pytorch · gudhi · tdagithub ↗
2025
02

Geometry Dash agent

A DreamerV3-style agent that learns to play Geometry Dash from pixels. Most of the work was infrastructure: a custom Gymnasium environment and a Windows-to-WSL bridge that keeps observations, actions, and logs aligned at 60 frames per second.

jax · gymnasium · model-based rlgithub ↗
2025
03

Efficient LLM fine-tuning

Fine-tuning pipelines for Dream-7B and GPT-OSS-20B on mathematical text, using 4-bit QLoRA, gradient checkpointing, and DeepSpeed. On the benchmarks I used, math accuracy improved by about 20% while VRAM use dropped by more than half, so everything fits on a single 16 GB GPU.

pytorch · deepspeed · qlora
2025
04

AlterEgo

A hackathon project from LA Hacks. It asks seven questions, then generates a twenty-years-older version of you: an aged portrait, a narrated life story, and a chat with that person.

claude · fastapi · react · elevenlabsdevpost ↗
2026
05

Virtual wind tunnel

A real-time CFD lab in the browser: a lattice-Boltzmann (D2Q9) solver with momentum-exchange force measurement, validated against the canonical cylinder benchmark. Put a standard dummy, a car, a rocket — or anything you draw or upload — into the test section; set wind speed, air temperature and surface friction; read the measured drag coefficient off the balance and watch the Kármán vortex street shed.

cfd · lattice-boltzmann · canvaslive demo ↗
2026

courses / blk 03

Open-source courses.

Notes from when I was learning the material, organized into two courses. Free and code-first.

background / blk 04

Background.

I started with competition mathematics (Euclid, first place in British Columbia) and came to machine learning from the math side.

At Waterloo I study Combinatorics & Optimization. A lot of machine learning turns out to be graph and optimization problems underneath, so the degree and the research fit together well.

Before the current work I mostly did reinforcement learning and training-efficiency projects; the ones above are from that period.

education & awards

2023 — 2027 University of Waterloo BMath, Combinatorics & Optimization. Graph theory, convex optimization, applied cryptography, quantum information, number theory.
2021 — 22 Euclid Mathematics Contest Top 1 in BC province · school champion twice · honour roll.
2022 Canadian Senior Math Contest School champion · honour roll.

toolkit

languages
python · c/c++ · racket · sql · latex
frameworks
pytorch · jax · deepspeed · huggingface
mathematics
graph theory · combinatorial opt · tda · cryptography
infra
linux · cuda · docker · wandb · runpod

contact / readout

Contact.

Open to research work and internships. Email is the best way to reach me.