Mohsen Iranmanesh

I build LLM agents that find, exploit, and patch vulnerabilities. Then I try to prove they don’t work.

Visiting researcher at Edinburgh, finishing an M.Sc. at SFU. Before that I built the agent layer of an LLM-powered IDE, and shipped ML to 10M+ users.

Mohsen Iranmanesh, portrait
University of Edinburgh
Visiting Researcher, School of Informatics
Simon Fraser University
M.Sc. Computing Science

Open to full-time roles from Dec 2026
Burnaby, BC, Canada

Research

Agentic LLM systems for security.

First-author preprint on cutting false positives out of static analysis. Two threads running now — automated exploitation and patching at Edinburgh, verified CVE reproduction at SFU.

Engineering

Production systems since 2016.

Trading engines, delivery ML at 10M+ users, and the multi-agent orchestration layer of an LLM-powered IDE. Six years of things that had to stay up.

Selected work

Five things, and what came out of them

5 of 11

Each one leads with its result and how that result was produced — hover any number to see the method behind it. One of them didn’t work.

Measured SFU · first author

ZeroFalse

Multi-stage LLM pipeline that reduces false positives in static analysis.

best F1, OWASP Java Benchmark

How this was measured 1,974 cases across 10 CWE categories, 10 frontier LLMs from 6 model families. On real-world code — 755 CodeQL alerts from 37 Java repositories — best F1 is 0.837.

ZeroFalse pipeline: CodeQL alerts feed a stage combining related code context, dataflow extraction, and CWE-specific prompting, which an LLM then uses to identify false alerts.

Figure 1 from the paper — where the alert goes before a model ever sees it.

What I built Close

Takes raw CodeQL alerts and runs them through contextual reasoning + structured evidence validation to filter false positives. Evaluated 10 frontier LLMs across 6 model families (Gemini, GPT, Grok, Mistral, DeepSeek, Qwen) on two benchmarks: OWASP Java Benchmark (1,974 cases / 10 CWE categories) and CWE-bench, a real-world dataset of 755 CodeQL alerts across 56 project–CVE pairs from 37 open-source Java repositories. CWE-specialized prompting improved F1 by up to +0.26 on real-world code.

LLMsCodeQLPythonStatic AnalysisMulti-Stage Prompting

Null result Edinburgh · 2026

Exploit-Informed Patching — A Controlled Ablation

Tested whether showing a repair agent a working exploit produces a better patch. It does not — and the mechanism behind that null result is the finding.

no significant difference

How this was measured Sign test over 12 matched CVE pairs, win/loss/tie 6–5–1. The +3.0-point mean difference on a 0–100 scale is smaller than the harness’s own measured scoring noise (ensemble stdev 3.44), and costs ~3× as much per run.

Ablation result over 12 matched CVE pairs: exploit-informed patching scored higher on 6, alert-only scored higher on 5, 1 tie. The mean difference of +3.0 points on a 0–100 scale falls inside the harness’s own measured scoring noise of plus or minus 3.44, so there is no significant difference between the two arms. Exploit-informed better 6 Alert-only better 5 -8 -4 0 +4 +8 +3.0 Measured scoring noise ±3.44
one matched CVE pair tie noise floor, measured before the comparison

Every pair, and the mean difference against the noise floor I measured before comparing anything.

What I built Close

Research thread at the University of Edinburgh (Mitacs Globalink Research Award). The pipeline runs worktree → docker build → exploiter → patcher → post-patch exploit re-run → regression → verifier, with the exploiter required to write and validate a proof-of-vulnerability in Docker before any patch is attempted. The comparison is an ablation against itself: both arms use the same agent, the same model, and the same system prompt, and the only thing that varies is whether the exploit evidence reaches the patcher — holding prompt wording fixed deliberately, to avoid confounding "more evidence" with "differently worded prompt". Upstream alerts come from vendored third-party IRIS (ICLR 2025) over CWE-Bench-Java. The evaluation harness is a reference-anchored LLM-as-judge scoring generated patches against the real upstream fix across 8 dimensions, with K=3 ensemble medoid selection, aggregates computed in code rather than asked of the model, hard gates on vulnerability-elimination and regressions, and a noise floor measured before the harness was used to compare anything. The mechanism diagnosis: a single proof-of-vulnerability is a narrowing signal, so an evaluation gate defined on that one path rewards patches that close it rather than the bug class behind it.

LLM AgentsAblation DesignLLM-as-JudgeDockerPythonCWE-Bench-Java

Measured Farpoint · 2025–26

Fabric — Agentic IDE (Farpoint)

LLM-powered agentic IDE. I owned the multi-agent DAG orchestration, subagent system, and context-management layers.

of frontier accuracy, at 18% of frontier cost

How this was measured Aider Polyglot, 225+ exercises across 6 languages. I authored the study behind the benchmark report Fabric published in March 2026.

What I built Close

Production agentic IDE in the Cursor product space. Shipped: a six-tool subagent surface (DelegateTask / SendMessage / WaitForTask / CheckTaskOutput / StopTask / ListTasks) with headless execution, foreground/background promotion, and notification-queue injection back into LLM conversation history; a TDD-style RED→GREEN multi-agent DAG orchestrator with Mission Control dashboard; chain-of-density + KV-cache-aware summarization with unified context-budget tracking; the prepare→permission→execute tool lifecycle with path-scoped Bash/Read/Write/Edit/Glob; SWE-Bench and Aider-Polyglot evaluation infrastructure; and an MCP server exposing the test-and-break loop to AI agents. Also designed and ran a SWE-bench-with-vs-without-GraphRAG experiment over an 18,000-LoC code-knowledge-graph subsystem; the negative result (no measurable improvement) informed the team’s no-ship recommendation.

TypeScriptElectronReactLLM AgentsMCPSWE-BenchDocker

Measured SFU lab

Golden Repository — Verified, Executable CVE Reproductions

LangGraph-orchestrated agentic pipeline that reproduces and patches CVEs end-to-end. 89 verified completions (61 Python + 28 Java).

CVEs reproduced end-to-end

How this was measured 61 Python and 28 Java at commit 05743f35. Each one has to clear four gates: the exploit fires on the vulnerable build, the same exploit fails on the patched build, the diff applies, and the verifier agrees — with the verdict re-read from the filesystem in a fresh context to catch the model agreeing with itself.

89 CVEs reproduced end to end: 61 in Python, shown as filled squares, and 28 in Java, shown as outlined squares. Each square is one CVE with a verified exploit, a verified patch, an applied diff, and a passing verification check.
Python · 61 Java · 28

One cell per CVE that survived all four gates.

What I built Close

SFU lab project. Eight-phase LangGraph state machine drives the full exploit-and-patch lifecycle per CVE: parallel PoC analysis across 7 sources (GitHub, GitLab, Exploit-DB, PacketStorm, Nuclei, Metasploit, vendor advisories) + advisory enrichment, 0–10 composite PoC scoring with a synthesis fallback below threshold, parallel dockerized vulnerable + patched builds, automated exploit validation that verifies EXPLOIT_SUCCESS on vuln and EXPLOIT_FAILED on patched, and a three-layer hallucination defense at validation (filesystem-grounded verdict, fresh-context re-read, persistent audit trail). Planned bolt-on: hybrid retrieval-augmented context layer (pgvector + BGE-large dense + BM25 sparse → RRF fusion → bge-reranker-v2-m3 cross-encoder) over the 89-CVE artifact corpus plus ingested public-source documents, with a Recall@10 / MRR / nDCG / p95-latency eval harness and an ablation measuring whether retrieval-augmented context improves the synthesis-fallback path.

LangGraphLangChainDockerPythonClaude Code SDK

Shipped Farpoint client · BDC

BDC Market Watch — AI Strategic-Intelligence Pipeline

End-to-end news → signal pipeline shipped to the Business Development Bank of Canada in 3 weeks. Local embeddings + clustering cut LLM call volume by ~5–10× vs. a per-article baseline.

fewer LLM calls than judging every article

How this was measured Clustering before judging caps the judge at roughly 80–120 calls a day instead of one per article. Embeddings run in-process on CPU, so that layer costs nothing per call. Idea to production in 3 weeks.

What I built Close

Farpoint client engagement for BDC (Canada’s federal Crown corporation for entrepreneurs, serving the Senior Management Committee, Board, and Shareholder). End-to-end daily-cycle pipeline: multi-source poll (RSS / Atom / sitemap / JSON-feed) with a Copilot Studio Bing-search fallback agent for un-crawlable sources → deterministic noise / URL / recency filter + SHA-256 / SimHash / Jaro-Winkler dedup → in-process Xenova/all-mpnet-base-v2 ONNX embeddings (768-dim, ~15–30 ms/article CPU, cached per row) → cosine clustering against open same-category clusters at 0.65 threshold → top-K cluster selection (N=12 per category × ~7–10 BDC strategic pillars) → Microsoft Copilot Studio judge over Direct Line with strict JSON-schema validation → decision-ready Signal cards (title / summary / BDC angle / composite score). Idempotent at every stage with crash-recovery via durable per-run state in PostgreSQL.

Next.js 16TypeScriptPostgreSQLPrismaMicrosoft Copilot StudioDirect LineONNX RuntimeSentence Embeddings

Everything else, including what’s still in progress →

Career

Where I’ve done it

9 roles since 2016

Jun 2026 Present University of Edinburgh Visiting Researcher — School of Informatics Mitacs Globalink Research Award · Edinburgh–SFU collaboration Edinburgh, Scotland, UK

Agentic LLM workflows for vulnerability detection, exploitation, and patching — co-supervised by Marc Juarez (Lecturer, Security, Privacy and Trust) and Adriana Sejfia (Institute for Computing Systems Architecture), with Dr. Mohammad Tayebi at SFU. Designed and ran a controlled ablation on whether exploit evidence improves LLM-generated security patches, holding the agent, model, and prompt wording constant so the evidence was the only variable: the result was a null one — no significant difference between the exploit-informed and alert-only arms (+3.0 points on a 0–100 scale across 12 matched CVE pairs, win/loss/tie 6–5–1, sign test p ≈ 1.0) at roughly 3× the cost. The contribution is the mechanism diagnosis behind it: a single proof-of-vulnerability is a narrowing signal, so an evaluation gate defined on that one path rewards patches that close it rather than the bug class behind it. Also built the evaluation harness (reference-anchored LLM-as-judge scoring against the real upstream fix across 8 dimensions, K=3 ensemble with medoid selection, aggregates computed in code, hard gates on vulnerability-elimination and regressions, and a measured noise floor so any reported difference can be read against it), curated a linked-CVE dataset and directed graph of security fixes that were themselves later found incomplete, and shipped the AutoSec Lab dashboard (FastAPI + React) for run orchestration and side-by-side arm comparison.

Sep 2025 May 2026 Farpoint Technologies Research Engineer Intern — Applied AI & LLM Systems Vancouver, BC

Building the agent layer of an LLM-powered agentic IDE. Shipped: a six-tool subagent system (DelegateTask / SendMessage / WaitForTask / CheckTaskOutput / StopTask / ListTasks), a TDD-style RED→GREEN multi-agent DAG orchestrator with Mission Control dashboard, the prepare→permission→execute tool lifecycle, chain-of-density + KV-cache-aware context management, SWE-Bench and Aider-Polyglot evaluation infrastructure, and an MCP server exposing the test-and-break loop to AI agents. Authored the empirical study behind Fabric’s externally-published March-2026 multi-model orchestration benchmark report, and ran a SWE-bench-with-vs-without-GraphRAG experiment whose negative result informed the team’s no-ship recommendation. Also designed and shipped BDC Market Watch end-to-end — a daily-cycle multi-source news → LLM-judged signals pipeline for the Business Development Bank of Canada (Farpoint client engagement, ~3 weeks idea-to-production), with a local-embeddings-and-clustering layer that cuts Copilot Studio LLM call volume by ~5–10× vs. a per-article baseline.

Sep 2024 Present Simon Fraser University Research and Teaching Assistant Burnaby, BC

M.Sc. Computing Science under Dr. Mohammad Tayebi. First-author of ZeroFalse (preprint, arXiv:2510.02534) and ThreatEZ (CMPT 785 course paper, ACM-formatted). Designer of AutoSec (fully agentic vulnerability remediation) and the Golden Repository (LangGraph pipeline producing 89 verified end-to-end CVE reproductions across Python and Java with vulnerable + patched container pairs). TA across Database Systems I, Software Development Methods, Digital Systems Design, Digital Logic. CGPA 4.00/4.33; SFU Graduate Fellowship (Summer 2025).

Jul 2023 Apr 2024 EnerGym Technical Product Manager Iranian fitness-tech startup Tehran, Iran

Evaluated emerging AI/ML capabilities (recommendation, personalization, vision-based form analysis, LLM coaching) for an Iranian fitness / health-tech platform; ran the user-research → spec → engineering-handoff loop and bridged product needs into concrete technical scope.

Oct 2020 Jun 2023 Pabla Co-founder & Software Engineer Iran’s leading crypto social-trading platform, ~40k users in 18 months Tehran, Iran

Co-founded Iran’s leading crypto social-trading and copy-trading platform; funded by Finnova (largest FinTech accelerator in Iran) after a 2-month MVP. Architected the trading engine: smart order routing across 5+ external exchanges (Binance, KuCoin, regional venues), best-execution price aggregation, async Python + Celery, per-exchange adapter pattern over a normalized schema, sub-second price-refresh fan-out via Redis Pub/Sub, and the Copycat replication state machine with slippage controls and per-follower position sizing tracking low-thousands of leader-follower pairs at peak. ~40k users in 18 months; code review and mentorship across a 3–5 engineer team.

Full history, education, and awards →

About

The part I actually care about

I started out building web apps in Tehran and ended up in a lab in Edinburgh trying to get language models to write security patches. The part I care about is the measuring.

Twice now the honest answer has been that my own system didn’t help — a code-knowledge-graph subsystem that showed no measurable gain, and the ablation above. Both are on this site. A result you only publish when it flatters you isn’t a result.

Looking for full-time work from December 2026 — AI and ML engineering, agentic systems, evaluation infrastructure. If that’s what you’re building, say hello.

[email protected]