Aaron Fernandes

Aaron Leevord Fernandes

Machine Learning Engineer working on generative models and computer vision, taking projects from research prototype to trained model at scale.

aaron.fernandes.ml@gmail.com / github / linkedin / resume

I build and ship machine learning systems end to end: training models in PyTorch, optimizing them for inference, and deploying them behind real infrastructure. My work spans computer vision, generative models, and reinforcement learning, with a strong focus on performance, scalable training, and production deployment (ONNX, CoreML, Docker, AWS, FastAPI).

Currently a research assistant on synthetic driving data for autonomous systems at Indiana University. I came to ML from software engineering (production backend work in enterprise banking before a master's in AI), and I'm comfortable owning a model from experiment to deployment.

Path
Projects

re-diffusion

2025 – present

A from-scratch latent Diffusion Transformer trained with rectified flow on 2M LAION-Aesthetics images. Attention, AdaLN-Zero conditioning, patchify, the rectified-flow objective, Euler sampler, and classifier-free guidance are all hand-written (~600 lines). A profiler-driven attention fix gave 2.2× throughput and 2× less memory; streaming data pipeline measured at 757 imgs/s over 1,976 WebDataset shards.

Share of CUDA time per step across pipeline stages
Where the profiler pointed: 42% of every step re-encodes frozen VAE/CLIP models (precomputable), and fp32 attention dominated the trainable cost.
Training throughput: manual fp32 attention vs fused SDPA
The fix: routing QKV through fused SDPA / FlashAttention gave 2.2× throughput and cleared the earlier OOM wall.
Peak GPU memory vs batch size, manual vs SDPA
Peak memory: the O(N²) fp32 attention was the wall. 35.4 GB at batch 16 fell to 17.2 GB, fitting the L40S with room to spare.
Data-parallel scaling across GPUs
Multi-GPU: 86% data-parallel scaling efficiency under DeepSpeed ZeRO-2, with NCCL all-reduce at just 13% of CUDA time.
PyTorchMM-DiTRectified FlowDeepSpeed ZeRO-2Slurm

Diffusion to Consistency

2025

A small, readable diffusion repo that starts from a vanilla DDPM ε-prediction model and moves toward modern diffusion in minimal additive steps. U-Net with timestep embeddings and selective self-attention on CIFAR-10, EMA, checkpointing, and FID reporting every 10k steps, built to be instrumented and legible rather than a heavy framework.

Generated CIFAR-10 samples from the diffusion model
Samples generated by the trained model, denoising from noise (CIFAR-10, 32×32).
Fréchet Inception Distance over training steps
FID falling from ~135 to a best of 25.5 over 100k training steps.
PyTorchDDPMU-NetFID

Unsupervised Industrial Anomaly Detection

2024 – 2025

A Vision Transformer autoencoder with a Capsule Network and Gaussian mixture scoring for detecting and localizing defects in industrial imagery. Trained on the BeanTech (BTAD) dataset, improving AUROC from 0.78 to 0.94 over ResNet-50 baselines.

Training losses: total, SSIM, reconstruction, and MDN
Training curves: total, SSIM, reconstruction, and MDN losses converging over training steps.
PyTorchViT-B/16Capsule NetGMM

LLM-Assisted Grounded Theory

Oct 2024 – Dec 2024

An LLM-assisted retrieval and knowledge-graph system for grounded-theory qualitative research, built with researchers at NICC Brussels. Extracts knowledge graphs from interview transcripts and supports source-traceable querying across 200+ documents, pairing vector embeddings with graph-backed retrieval so every answer traces back to its origin passage.

PythonLLMsLlamaIndexNeo4jPinecone

Multi-Goal RL with SVGG

2025

Goal-conditioned reinforcement learning combining Soft Actor-Critic, Hindsight Experience Replay, and Stein Variational Goal Generation for curriculum-style goal sampling in sparse-reward robotics environments like FetchReach. Hydra-configured, W&B-tracked.

PyTorchSACHERSVGGHydra

Model-Based RL with Deep MPC

2024

A model-based RL algorithm inspired by Deep Value-and-Predictive-Model Control: learned dynamics, value approximation, and Cross-Entropy Method planning over a prediction horizon for continuous control. Effective in dense-reward settings, with sparse rewards analyzed as the open challenge.

Training and validation loss of the learned dynamics model
First the learned dynamics model converges, with train and validation loss both driving toward zero.
Episodic and average reward over training episodes
Then the payoff: reward climbs to the InvertedPendulum ceiling (~1000) as the MPC planner exploits that model.
MPCWorld ModelsCEMGymnasium

ComicPaliGemma: a Vision-Language Model from scratch

2025

A from-scratch implementation of Google's PaliGemma VLM (SigLIP ViT vision encoder plus a Gemma decoder), validated against the full pretrained checkpoint. Fine-tuned on 5K+ comic panels with 4-bit QLoRA to cut peak VRAM by 65%, with a long-context autoregressive generator producing coherent narration across 10+ panels. Custom Triton / FlashAttention-2-style kernels gave 5 to 10× faster inference than standard PyTorch attention.

The VLM narrating a sequence of comic panels
The model narrating a sequence of comic panels: the vision encoder reads the panels, the decoder generates the story text.
PyTorchSigLIP + GemmaQLoRATriton / FlashAttention-2HuggingFace
Machine learning experience

Apr 2024 – Dec 2025

Machine Learning Engineer, Computer Vision

Leung Research Group

Self-supervised vision and computational imaging for OCT video-to-histology translation. Built U-Net surrogate models approximating FDTD optical simulations on HPC (SLURM/Linux), cutting inference from ~3 min to sub-second while holding SSIM > 0.85.

Jan 2025 – Jun 2025

Machine Learning Engineer, Reinforcement Learning

Indiana University

Goal-conditioned RL (HER, curriculum policy optimization) for sparse-reward navigation, with experiment infrastructure orchestrating 100+ multi-seed runs via Hydra, MLflow, and W&B.

Mar 2026 – present

Graduate Research Assistant, Synthetic Driving Data

Indiana University (Astemo-sponsored)

Building and benchmarking generative systems for autonomous driving: diffusion-based image editing and generation, video generation, and driving world models for synthetic data. Serving large-scale multimodal inference with vLLM-Omni, and applying geometry- and computer-vision-based benchmarking and validation to ensure the generated data is good enough to train on.