# sheldon lewis

> i'm sheldon. i'm currently studying computer science at the university of waterloo. this file is the plain-text version of my site, written for ai agents and scrapers. everything here is also on the site itself.

- site: https://www.sheldon-lewis.com
- work, with figures: https://www.sheldon-lewis.com/work
- resume (pdf): https://www.sheldon-lewis.com/resume.pdf
- github: https://github.com/sheldonblewis
- linkedin: https://linkedin.com/in/sheldonblewis

# work and research

## world labs (research, 2026)

i worked on text-to-image pre-training for [atlas](https://www.worldlabs.ai/blog/atlas), world labs' omni world model for spatial intelligence.

Atlas is a world model, specifically an autoregressive diffusion model, that unifies generation and reconstruction. It operates on sequences of text, images, and depth maps, and represents worlds as sets of posed images. It pretrains on large-scale image and video data, then finetunes on depth data. Atlas outperforms all prior methods on the Orbia benchmark for world generation, it outperforms prior view synthesis methods on sparse and dense views; and it outperforms specialist models for 3D reconstruction.

[read about atlas](https://www.worldlabs.ai/blog/atlas)

## supply chain state machines for llms (independent research, 2026 – present)

manufacturing and supply chain aren't seeing the same lift from ai that we're seeing in other industries. part of this is fragmented systems, messy reality, and culture. the other part is that llms need complete and up-to-date context to assist in decision-making: a persistent state built for llm readability that provides llms with the context they need to outperform human decision-making in asset allocation. i'm building it now!

[read more](https://www.sheldon-lewis.com/research/manufacturer-model)

## llm interpretability (independent research, 2025 – present)

- **why models think 7.11 > 7.8**, dec 2025 ([code](https://github.com/sheldonblewis/Causal-Tracing-a-Context-Misclassification-Error-in-LLM-Reasoning)): 7.11 is smaller than 7.8 as a decimal and later than 7.8 as a version, so which one a model picks depends on how it reads the context. on phi-3, calling them version numbers pulls the answer toward 7.11. activation patching shows where that reading lives: on the context word in the first few layers, on the two numbers through the middle layers, and at the final token from about layer 20.
- **greedy coordinate gradient**, dec 2024 ([code](https://github.com/sheldonblewis/Greedy-Coordinate-Gradient)): greedy coordinate gradient (zou et al., 2023) is the gradient-guided token search behind adversarial suffix attacks: it uses the gradient of a target loss to propose token swaps, then keeps whichever lowers the loss most. my implementation forces gpt-2 to output a chosen false statement for 12 of 12 targets, against 9 of 12 for random search. the suffixes partly transfer to another model, and a simple perplexity filter catches every one of them.
- **semantic hallucination detection**, jul 2024 ([code](https://github.com/sheldonblewis/Semantic-LLM-Hallucination-Detection)): a tool that checks an llm's answer against trusted source text: it splits the answer into clauses and scores each one against the sources with a bert model fine-tuned on mnli. i then benchmarked it on 4,000 real answers from halueval. the original scoring turned out to be at chance (auroc 0.51), because it compared sentences separately; reading evidence and answer together with an nli cross-encoder reaches 0.79. on long documents, a simple word-overlap check beat every nli method.

## amazon (software, 2025)

amazon's sortation directive signal system is a system of sensors and signals that direct warehouse associates to move packages from the warehouse conveyor system to the appropriate delivery sorting conveyor. i designed, built, and launched the configuration system that modifies these directive signals, now active in amazon fulfillment centres worldwide.

## compilers (independent, 2025)

- **scanning with dfas**, jan 2025 ([code](https://github.com/sheldonblewis/DFA-File-Processor)): the first stage of a compiler: a tokenizer driven by a deterministic finite automaton. it reads a dfa spec (states, accepting states, and transitions over character ranges like a-z) and splits input into tokens using maximal munch, always taking the longest match.
- **mips assembler**, feb 2025 ([code](https://github.com/sheldonblewis/Assembly-Functions)): mips assembly written by hand (stirling numbers, reading stdin into a decimal number, checking that an array is strictly increasing), plus the assembler stage that turns assembly tokens into machine instructions and resolves labels into branch offsets.
- **a front end for wlp4**, feb – mar 2025 ([code](https://github.com/sheldonblewis/WLP4-Programming-Language)): the front end for wlp4, a small c-like language with ints, pointers and arrays: a scanner, then passes that build the parse tree and annotate every node with its type so type errors are caught before code generation. includes wlp4 programs like printing an integer in any base.
- **bottom-up parsing**, mar 2025 ([code](https://github.com/sheldonblewis/CFG-practice)): parsing context-free grammars bottom-up with an slr(1) automaton: shift tokens onto a stack and reduce by grammar rules, printing every configuration along the way. includes a grammar for a subset of c++.
- **code generation**, mar 2025 ([code](https://github.com/sheldonblewis/Compiler-For-C-Like-Language)): turning the typed wlp4 parse tree into mips assembly: laying out stack frames with offsets for parameters and locals, generating code for expressions recursively, and a loader that relocates merl object files into memory before running them.

## trading (independent research, 2023 – 2024)

- **rl for portfolio optimization**, jul 2024 ([code](https://github.com/sheldonblewis/rl-portfolio-optimization)): a reinforcement learning agent that rebalances a 10-etf portfolio every day, trained two ways (backpropagating through a differentiable market, and ppo) and tested out of sample from 2020 to 2026 against mean-variance, kelly, risk parity and equal weighting, with trading costs. before costs it beat equal weighting (sharpe 0.71 vs 0.57); at 5 bps per trade the edge disappears, so the signal is real but too expensive to trade.
- **ai agents for macroeconomics**, 2023 – 2024 ([code](https://github.com/sheldonblewis/AI-Agents-for-Macroeconomics)): an agent-based model of 20,000 us households in four archetypes (young professionals, families, students, retirees), calibrated on 1980 to 2009 and used to forecast real consumer spending one quarter ahead. over 2010 to 2026 it had the lowest error of any method once covid is included; in calm quarters simple time-series baselines still edge it out.

# jobs

- world labs: research intern, 2026
- theory ventures: engineering intern, 2026
- amazon: engineering intern, 2025
- openai / mercor: interpretability analyst, 2025
- electric mind: consulting intern, 2024
- equitary: tech for vc startup, 2024
- interac: software developer intern, 2023
- claremont nature centre: camp counsellor, 2022
- les loisirs de st. gervais: camp counsellor, 2021
- l'amhirondelle: daycare, 2021
- metroland media: paperboy, 2016 – 2018

# contact

- sheldonblewis@gmail.com
- sheldon.lewis@uwaterloo.ca
- book a call: https://cal.com/sheldonblewis
