In development · 2026
AI-Generated Image Detector
A CNN with the convolution layer written from scratch in NumPy.
The problem
Detectors that score well on one generator collapse on the next. The question is not "can you classify?" but "does the signal generalize across generators?"
What I built
A CNN whose convolution layer is implemented from scratch in NumPy and verified with gradient checking, used as a controlled testbed for cross-generator generalization.
Why write convolution by hand
Calling Conv2d teaches you the API. Writing the backward pass yourself and validating it against numerical gradients teaches you where the signal actually comes from, which matters when the question you care about is which features transfer to a new generator.
The generalization trap
Training and testing on the same generator produces flattering numbers driven by generator-specific artifacts. Evaluation is split by generator, so held-out performance measures the thing that would matter in deployment.
Outcome
- Convolution forward/backward verified by gradient checking
- Cross-generator generalization framed as the core empirical question
- No framework autograd, so every gradient is accounted for
Stack
Data flow
From-scratch CNN with gradient verification
- 1
Data
Real vs generated images, split by generator
- 2
Conv layer (NumPy)
Hand-written forward + backward pass
- 3
Gradient check
Numerical vs analytical gradient agreement
- 4
Train loop
Manual backprop, no autograd
- 5
Held-out generator eval
Generalization measured across generators
This diagram is generated from portfolio.ts. Edit the `architecture` field to change it.
Keep reading
Peptide AI RAG and Agent Platform
Hybrid retrieval, agent trajectories, and a privacy-safe semantic cache in production.
Case studySynthDrive
You describe a driving scenario in plain English, and it generates a 3D world, runs object detection on it, and scores how hard that scene is to perceive.
Case studyPanNote + PipelineEvolve
A Chrome extension that turns Panopto lectures into structured notes, plus a research harness that tries to improve the note pipeline automatically.
Case studyWant the deeper version of this?
I am happy to walk through the tradeoffs, the failure modes, and what I would do differently.