# Raphael Khalid > Raphael Khalid is an AI safety researcher and machine learning engineer based in the San Francisco Bay Area, running AutoLabs, a public laboratory where autonomous agents design, run and report AI-safety experiments, and building evaluations and interpretability tools: deployment-layer refusal erosion in aligned models, monitor-evasion tests of AI agent safety policies, and interpretable-by-design language models. Raphael Khalid — AI safety researcher and machine learning engineer, San Francisco Bay Area. Website: https://raphaelkhalid.com/ ## Contact - Email: raphaelbahadurkhan@gmail.com - https://www.linkedin.com/in/raphael-khalid/ - https://github.com/RaphaelKhalid - https://raphaelkhalid.medium.com/ - https://raphael-photography.vercel.app/ ## Focus - AI safety, AI alignment, Interpretability, Mechanistic interpretability, Sparse autoencoders, LLM evaluations, Red teaming, AI governance, Autonomous research agents, Machine learning engineering, Robotics, Complex systems ## Projects - [AutoLabs](https://autolabs-ebon.vercel.app/): A public laboratory where autonomous agents design, run, and report AI-safety experiments end to end — a spend ledger, frozen protocol hashes, and every public claim checked against the record. The live flagship run trains a Matryoshka sparse autoencoder on Qwen2.5-7B to surface persona-relevant directions that prompting can't reach. - [Afterlight](https://afterlight-research.vercel.app/): An agent-powered lab for reproducible AI-safety research: a harness that lets agents propose, execute, and write up experiments while keeping the receipts — protocols, results, and limitations in the open. Live web front end. - [RALYtable — Interpretability for Reasoning Models](https://ralytable.vercel.app/): An attempt at an interpretable-by-design model: a small language model forced through a 512-symbol readable bottleneck. The capability result was negative (a matched dense model won 152 of 179 blind comparisons), so the work turned to audits of whether the exposed structure is load-bearing. - [Watcher — Bash Policy Benchmark](https://github.com/RaphaelKhalid/watcher-monitor-evasion-benchmark): An offline test of Apollo Research's Watcher: does its deterministic Bash policy tier let dangerous commands through when a harmless-looking prefix or wrapper changes their surface form? On the installed 63-rule policy, 6 of 110 dangerous strings were routed to allow. It tests the policy router, not the full LLM monitor. - [RoolyTooly — Self-Improving Code Harness](https://roolytooly.vercel.app/): A self-improving inference harness that lifts a model's LiveCodeBench-hard pass rate from 90% to 93% by letting it iterate on its own tool use and test feedback. Live write-up. - [Deployment-Layer Refusal Erosion](https://deployment-layer-refusal-erosion.vercel.app): An evaluation harness showing that an aligned model's refusals collapse when the same request is routed through an ordinary product system prompt, with no jailbreak. Replicated across three developers' models (Google Gemini, DeepSeek V4 Flash, and an OpenRouter-routed model) at p<0.0001 via an exact McNemar test, and validated against a blind human labeling pass. Ships with a live, interactive demo. - [Robotics 101](https://robotics-navy.vercel.app): A 13-unit full-stack web application built independently to deepen robotics expertise, featuring interactive physics simulations, canvas-based rendering for robot control, and a puzzle-validation engine. Built with Python, TypeScript, Next.js, React, and Tailwind CSS; deployed to production. - [Instance Segmentation on Aerial Slum Images](https://drive.google.com/file/d/1n3MbnRve5zXM-yRi7PJOXz4bVbLFForH/view?usp=drive_link): Used QGIS to get satellite images of slums, creating an annotated dataset of 1,022 instances merged with iSAID. Fine-tuned a Faster R-CNN with ResNet-101 backbone and a Cascade R-CNN with ResNeXt-152 backbone using Detectron 2. - [A Non-Proliferation Treaty for AI](https://raphaelkhalid.medium.com/a-non-proliferation-treaty-for-ai-c30f5179c4a4): Blog post deep-diving into the Munich and Framework Conventions on AI, performing a literature review of AI governance frameworks, critiquing safety approaches, and proposing solutions towards a unifying framework for AI governance and regulation. - [Replication Paper: Medical Marijuana Legalization and Motor Vehicle Fatalities](https://drive.google.com/file/d/1Mwl-dVUWBQbSKpz2uwWV5hDuay-rg5w8/view?usp=drive_link): Replication of the paper 'A Replication of "Marijuana medicalization and motor vehicle fatalities: a synthetic control group approach'. - [The effect of parenting styles and exposure to deception under a reward-punishment paradigm on the rate of lying](https://drive.google.com/file/d/1-AZh-H-xQinn-xJCOoEh8xwiOMsfnipy/view?usp=sharing): The present study investigates how the ability to deceive is influenced by parenting style under a reward-and-punishment paradigm for children aged between 2 and 4 years. - [Sentiment Analysis of News Subreddit Comments](https://drive.google.com/file/d/1SMcLEZ17I7rw9c_mj24EAfpLjrlH367m/view?usp=drive_link): A brief look into the varying sentiments across r/news and r/worldnews, specifically following October 7th, using VADER and textblob. - [Live Beatbox Classifier](https://github.com/RaphaelKhalid/Python/tree/main/Live%20Audio%20Classifier%20with%20CNNs%20for%20Beatbox): A real time beatbox classifier that uses a convolutional neural network to classify beatbox sounds. The model was trained on 5 classes of beatbox sounds, built using tensorflow. - [Replicating Google Wavenets](https://drive.google.com/file/d/1pCqwpuC8xM4Mxc_ufunzxWLG8bU4n_bE/view?usp=sharing): An extension of the beatbox classifier, this project uses a wavenet architecture to generate novel sounds, trained on my own beatbox samples. - [Khawaja Sira - A Complexity Approach](https://drive.google.com/file/d/1mUFbG2ObSiok4ZHjtUuutQ5Kx47gPdNc/view?usp=sharing): A research paper on the Khawaja Sira community in Pakistan demonstrating the aggregation of mental models into ideologies, using Ostrom's ADICO syntax for rule categorization, and visualizing causal relations between both. - [Modeling Complex Systems - Waste Collection](https://drive.google.com/file/d/1aHRyuxobHT3GT39-MNwFL5fTLs26FnHs/view?usp=sharing): An implementation of a waste-collection system in Python using NetworkX. A Monte Carlo search is compared with other strategies on the metrics of fuel efficiency. - [A System Dynamics Approach to Hegemonic Theory](https://drive.google.com/file/d/1VVsRwBbYCj8BuZ8oeXB1XxpPKQbs23mV/view?usp=sharing): A research paper developing a quantitative basis supporting the thesis that the balance of power is shifting towards multipolarity, using 3-dimensional phase spaces to predict US and China growth trajectories. - [Housing Bubble in Turkey](https://drive.google.com/file/d/1R9XF_3Yak5ajcmvEthjr2mAzhzRHdlbY/view?usp=sharing): This paper presents evidence for a housing bubble in Turkey, supported by novel arguments about the contagion of conformity (simulated with NetLogo), economic analysis of systemic risk, business cycles, and monetary policy. - [Multilayer Networks to Analyze Monopoly Power](https://drive.google.com/file/d/1BnQ3PqWDanh213NLP57V93Db6IjH8ol0/view?usp=sharing): This research paper uses multilayer networks to consider Meta's social media monopoly from novel perspectives introduced by network theory. - [Classical Chess Engine](https://drive.google.com/file/d/11z8VYY05OapTW_UYkTvDLS1ncze-JTrm/view?usp=sharing): Inspired by my passion for Chess, this project implements the classical chess engine algorithm: minimax, with subsequent optimizations including alpha-beta pruning and the Negamax algorithm. - [Reconciling Disparate Conflicts - Kashmir and Israel-Palestine](https://drive.google.com/file/d/1NAAxodp0dd6vLu--WMw-T8w7_wEHG5Rz/view): This research paper compares the Kashmir and Israel-Palestine conflict to garner theoretical similarities and differences across formal and informal rules, governmental agents, and bureaucratic governance factors. - [Before You Click Send](https://before-you-click-send.vercel.app): An AI-safety onboarding tool (built at BlueDot Impact's Breaking Barriers hackathon) that catches risky messages before they are sent and coaches safer alternatives. Live, interactive web app. - [SelfBalance Lab](https://selfbalance-lab.vercel.app): An interactive 3D self-balancing robot assembly simulator: drag real components onto a chassis, wire the pins, edit an Arduino PID sketch, and watch a Rapier-physics robot try to balance. Built with Three.js and Rapier; live PID tuning. ## Experience - Program Manager, Center for Future Global Leaders (January 2025 - Present): Red-teamed educational chatbots over a 6-month project using intention obfuscation resulting in additional preventative measures being shipped, including an incident response policy and stricter model guardrails for security & age-appropriate designs intended for a 4-week online bootcamp with 500+ middle-schoolers. - L2 Technical Support, Minerva Project (May 2024 - May 2026): Triaged technical support issues for 3,000+ users on Minerva Project's proprietary videotelephony platform with median response times of ~43 seconds, whilst proactively monitoring Datadog's Pubsub and Licode server health and user connection metrics such as RTT, ping, IP, browser, OS details for critical live chat support. - Residential Counselor, Wharton Global Youth at UPenn (Summer 2024): Responded to unique circumstances like conflict mediations with urgency while maintaining compliance with protocol to maintain the well-being of a cohort of 30 students, as well as being on-call 24/7 for emergencies. - Undergraduate Teaching Assistant, Minerva University (September 2021 - May 2024): Assessed 84 students across 5 courses for daily written and video responses, graded Python projects and problem sets, and established trust with faculty, evidenced by promotions from SS51 - introductory Complex Systems, to CS110 - intermediate Data Structures & Algorithms, and CS152 - advanced Artificial Intelligence.