Hi, I'm Ian.
Senior AI Engineer @ Salesforce. I build AI systems and agentic AI systems that make AI feel simple, fast and trustworthy.
BlogThree Functional Roles of the Per-Layer Embedding Gate in Gemma-4 E2B
I ran polysemy tests, magnitude decompositions, and causal ablations across all 35 layers of Gemma 4 E2B's Per-Layer Embedding gate. The gate contains at least three independent mechanisms: a word-sense disambiguator at Layer 6, a massive mid-network injection at Layers 13-14 that actively hurts next-token prediction, and a late-stage output prior at Layer 33. Removing the L13/L14 injection improves perplexity by 40% on English text, and the result holds across 50k tokens, fp32 precision, and math. On code, it helps overall but one frequency bin flips sign, suggesting the effect is distribution-specific.
BlogCracking Open Gemma 3 4B Part 2: Transcoders And Generation-Time Behavioral Circuits
SAEs found strong encoding-time features for sycophancy and over-refusal, but missed generation-time behaviors entirely. Transcoders, which decompose MLP computation rather than residual stream state, unlock overconfidence as a guardrail-viable behavior and reveal that some behaviors are states decided at encoding while others are computations that unfold during generation.
BlogLarge Audio Deepfake detection models perform well on academic benchmarks but fail in the real world compared to smaller models
A 2M parameter model with no pretrained backbone beat my 350M parameter WavLM pipeline by 24 percentage points on out-of-distribution data. I ran 50 experiments across four architectures, multiple datasets, and different audio codecs. The results inverted every assumption I had.
BlogCracking Open Gemma 3 4B Part 1: Finding Behavioral Circuits With Sparse Autoencoders
I ran contrastive feature discovery across six model behaviors, four layers, and hundreds of prompts to find SAE features that reliably detect sycophancy, over-refusal, hallucination, and more. Sycophancy produced features so strong a runtime guardrail is immediately viable. Hallucination produced almost nothing. The difference comes down to where in the forward pass each behavior lives.
ProjectAI-SPY Text Detection: AI Writing Detection That Shows Its Work
A multi-level AI text detection system built on DeBERTa and a custom dual-path architecture — sentence, paragraph, and document analysis with attention-based attribution so you can see exactly which parts triggered the verdict.
BlogBuilding AI text detection that explains itself
Most AI detectors give you a percentage and call it a day. We built one that shows you which sentences triggered the verdict, how much each one mattered, and why, using attention-based attribution on a sliding window transformer.