Ye (Lennon) Li

Agentic Architect for Data-Science Workflows — Secure, Reproducible, Sustainable, Human-Judged

Ye (Lennon) Li

Portrait of Ye (Lennon) Li

Ye (Lennon) Li

Agentic architect for data-science workflows

Secure · reproducible · sustainable · human-judged

I design the workflow behind data-science projects — how AI agents plan, code, retrieve, and execute, and where a human stays in control. The aim is work that is secure, reproducible, built to last, and always accountable to a person.

15+
years applied public health statistics

45+
publications and scholarly outputs

20+
graduate trainees supervised

P.Stat.
Statistical Society of Canada

I design the workflows behind data-science projects: how the work gets planned, coded, retrieved, executed, reviewed, and approved when AI agents do much of the building. My foundation is statistics — a PhD and MSc in biostatistics, an honours degree in computer science, and fifteen years building models, pipelines, and tools alongside scientists, clinicians, and analysts. That foundation is the reason I care about how AI is used, not just whether it runs.

AI used to be a tool we used to build things. That has changed. AI is becoming the interface between people and their data — and increasingly a part of the tool itself, an agent working inside the analysis rather than beside it. When the machine can write the model, the hard part is no longer the code. It is knowing what to ask, whether the answer is right, what to trust, and when to stop.

I teach graduate biostatistics, and that shift raised an uncomfortable question: is programming still the skill we should be teaching? If an agent can write the analysis, what is the human responsible for? My answer is judgment — and judgment is the hardest thing to teach, especially when AI is quietly taking over the thinking. So I focus on what does not transfer to the machine: framing the question, checking the assumptions, reading the uncertainty, and owning the decision. That is what I try to teach, and what I try to build into every workflow.

Where this started

This began with public-health surveillance work in 2015–16: a CUSUM aberration-detection system. The method was statistical, but the real task was coding human expertise into a model and putting it inside a tool that experts could actually use — what signals matter, when to alert, how a person should read the output. The tools have changed — statistical models are now joined by LLMs, retrieval, and code agents — but the design question hasn’t: how do we embed expert judgment into an end-to-end system without hiding assumptions or removing human responsibility?

My philosophy is simple. Data should not just produce models and dashboards; it should help people see more clearly, decide better, and understand the uncertainty behind the decision. And data work is rarely a one-off — the same question returns with new data, new assumptions, new subgroups. So I build for reproducibility and reuse: a good analysis answers today’s question and makes the next one easier.

What I design for

  • Data and system security — controlling what agents can see, touch, and do, and reducing unnecessary exposure of sensitive data.
  • Reproducibility — workflows that produce the same result, that another team can inspect, rerun, and trust.
  • Sustainability — analyses built to outlive the project, so the next question, dataset, and person are easier to handle.
  • Human judgment and control — agents propose; a person reviews, approves, and stays responsible for context, meaning, and the final call.

Biostats.ai

Statistical Consultant and AI Workflow Architect June 2010 to present

Independent biostatistics, data systems, R tooling, and AI-assisted workflow consulting for research and industry teams. Current focus areas include agentic workflow architecture for data-science projects, data and system security, reproducible and sustainable analytic workflows, human-directed automation, and trustworthy AI adoption.

Public Health Ontario

Biostatistical Specialist Jan 2012 to present

Design and lead complex statistical analyses with scientists and epidemiologists; build surveillance models, pipelines, interactive tools, and decision-support workflows that turn public health data into usable evidence.

University of Toronto, Dalla Lana School of Public Health

Adjunct Professor 2012 to present

Graduate teaching and thesis supervision in biostatistics and applied public health, with emphasis on statistical reasoning, assumptions, uncertainty, and responsible interpretation.

Courses

  • CHL5201: Biostatistics for Epidemiologists I
  • CHL7001: Applied Spatial Statistics for Public Health Data
  • CHL5207/5208: Laboratory in Statistical Design and Analysis

Graduate Supervision

  • Aaron Zheng, MSc. 2025-2026
  • Soohyun Yoon, MSc. 2025-2026
  • Sadia Ahmed, MSc. 2025-2026
  • HaoYue Wang, MSc. 2025-2026
  • Junzi Chen, MSc. 2024-2025
  • Harieswar Sundaram, MSc, and Hunter Pozzebon, MSc. 2023-2024
  • Marija Pajdakovska, MSc. 2023-2024
  • Yushu Zou, MSc. 2022-2023
  • Fatima Shire, MSc. 2022-2023
  • Hana Fu, MSc. 2021-2022
  • Wei Zhuo, MSc. 2019-2020
  • Shuting Luo, MSc. 2019-2020
  • Hana Dampf, MSc. 2018-2019
  • Ling Lin, MSc. 2018-2019
  • Yue Wang, MSc. 2017-2018
  • Sudipta Saha, PhD. 2016-2017
  • Reuben Pereira, MSc. 2015-2016
  • Wenqi Fan, MSc. 2014-2015
  • Osvaldo Espin-Garcia, PhD. 2013-2014
  • Konstantin Shestopaloff, PhD. 2012-2013

Methods and Core Contributions

  • Erjia Ge, Chengchun Yu, Eric Lavigne, Paul J Villeneuve, Xin Liu, Nicholas Grubic, Wendy Lou, Jeffrey Brook, Zihang Lu, Ye Lennon Li, Teresa To. Early-life greenness and childhood asthma and allergic rhinitis: An Ontario birth cohort study. European Respiratory Journal. 2026. doi:10.1183/13993003.02272-2025
  • Paul LA, Li Y, Leece P, Gomes T, Bayoumi MA, Herring J, Murray R, Brown P. Identifying the changing age distribution of opioid-related mortality with high-frequency data. PLoS One. 2022;17(4):e0265509
  • Li Y, Whelan M, Hobbs L, Fan WQ, Fung C, Wong K, Marchand-Austin A, Badiani T, Johnson I. Data Driven Approach of CUSUM Algorithm in Temporal Aberrant Event Detection Using Interactive Web Applications. Canadian Journal of Public Health. 2016;107(1):e9-e15
  • Li Y, Brown P, Rue H and Gesink D. Log Gaussian Cox processes and spatially aggregated disease incidence data. Statistical Methods in Medical Research. 2012;21(5):479-507
  • Li Y, Brown P and Rue H. Spatial modelling of lupus incidence over 40 years with changes in census areas. Journal of the Royal Statistical Society Series C (Applied Statistics). 2012;61(1):99-115

Applications and Collaborations

  • Butt DA, Li Y, Moineddin R, O’Neill B, Train AD, Gronsbell J, Gershon AS, Tu K. Healthcare use in individuals with and without attention-deficit/hyperactivity disorder: A population-based longitudinal matched cohort study. PLOS Mental Health. 2025;2(7):e0000342
  • Peci A, Zhang P, Sullivan A, Li Y, Bi Y, Murphy A, Leibson K, Gubbay JB, Majury A. Impact of COVID-19 pandemic on Legionella testing and infection rates in Ontario. BMC Public Health. 2025;25(1):1-10
  • Duvvuri V, Shire F, Isabel S, Braukmann T, Clark S, Marchand-Austin A, Eshaghi A, Bandukwala H, Varghese N, Li Y, et al. Large scale analysis of the SARS-CoV-2 main protease reveals marginal presence of nirmatrelvir-resistant SARS-CoV-2 Omicron mutants in Ontario, Canada, December 2021-September 2023. Canada Communicable Disease Report. 2024;50(10):365
  • Weerasinghe A, Thielman J, Li Y, Doguparty VB, Medeiros A, Keller-Olaman S, Carsley S, Richmond SA. Trends in falls among older adults before and during the COVID-19 pandemic in Ontario, Canada: A retrospective observational study. BMC Geriatrics. 2024;24(418)
  • Medeiros A, Li Y, Smith BT, Carsley S, Zheng A, Pike I, Macpherson AK, Thielman J, Weerasinghe A, Karmali S, Saunders N, Richmond RA. Inflicted violence-related injuries among children and youth in Ontario during the COVID-19 pandemic. Child Protection and Practice. 2024;2(1):100020
  • Bolotin S, Osman S, Hughes SL, Ariyarajah A, Tricco AC, Khan S, Li Y, Johnson C, Friedman L, Gul N, Jardine R, Faulkner M, Hahne SJM, Heffernan JM, Dabbagh A, Rota PA, Severini A, Jit M, Durrheim DN, Orenstein WA, Moss WJ, Funk S, Turner N, Schluter W, Jawad JS, Crowcroft NS. In Elimination Settings, Measles Antibodies Wane After Vaccination but Not After Infection: A Systematic Review and Meta-Analysis. Journal of Infect Diseases. 2022;226(7):1127-1139
  • Nelder MP, Russell CB, Johnson S, Li Y, Cronin K, Cawston T, Patel SN. American dog ticks along their expanding range edge in Ontario, Canada. Scientific Report. 2022;12(1):11063
  • Abdulnoor M, Eshaghi A, Perusini S, Broukhanski G, Corbeil A, Cronin K, Fittipaldi N, Forbes J, Guthrie J, Kus J, Li Y, Majury A, Mallo G, Mazzulli T, Melano R, Olsha R, Sullivan A, Tran V, Patel S, Allen V, and Gubbay J. Real-time RT-PCR Allelic Discrimination Assay for Detection of N501Y Mutation in the Spike Protein of SARS-CoV-2 Associated with Variants of Concern. Microbiology Spectrum. 2022;10(1):e0068121
  • Warren C, Hobin E, Manuel DG, Anderson LN, Hammond D, Jessri M, Arcand J, L’Abbe J, Li Y, Rosella LC, Manson H, Smith BT. Socioeconomic Position and Consumption of Sugary Drinks, Sugar-Sweetened Beverages and 100% Juice among Canadians: A Cross-Sectional Analysis of the 2015 Canadian Community Health Survey-Nutrition. Can J Public Health. 2022;113(3):341-362
  • Myran DT, Smith BT, Cantor N, Li Y, Saha S, Paradis C, Jesseman R, Tanuseputro P, Hobin E. Changes in the dollar value of per capita alcohol, essential, and non-essential retail sales in Canada during COVID-19. BMC Public Health. 2021;21(2162)
  • Crowcroft NS, Bolotin S, Li Y, Campbell H, Amirthalingam G. Infant pertussis and maternal immunity: The curious case of Canada. Vaccine. 2021;39(14):1977-1981
  • Wilson SE, Bunko A, Johnson S, Murray J, Wang Y, Deeks SL, Crowcroft NS, Friedman L, Loh LC, MacLeod M, Taylor C, Li Y. The geographic distribution of un-immunized children in Ontario, Canada: Hotspot detection using Bayesian spatial analysis. Vaccine. 2021;39(8):1349-1357
  • Hughes SL, Kwong JC, Schwartz KL, Chen C, Johnson C, Li Y, Marchand-Austin A, Bolotin S, Jamieson FB, Drews SJ, Russell ML, Svenson LW, Mahmud SM, Kwong JC. Exploring the reasons for low pertussis vaccine effectiveness in Ontario - 2006-2008: A Canadian Immunization Research Network study. Can J Public Health. 2021. PMID: 34424508. DOI: 10.17269/s41997-021-00536-1

About Me

AI Safety and Transparency

Tools for making AI-assisted work safer and more understandable across execution environments, data handling, transparency, and human review.

Data Safety

Tools for reducing unnecessary exposure of sensitive data in AI-assisted analytic workflows.

  • DataGangeR · GitHub · Docs — On CRAN. A human-gated privacy protocol for agent-assisted prototyping. You answer a short set of privacy questions once, in a guided Shiny app; DataGangeR turns your real dataset into a synthetic stand-in that a coding agent can build on at full speed — the agent never sees the original records, and it can instead be handed a reproducible recipe (spec, roles, seed) to regenerate safe data itself. Makes no network calls and launches no browser, proven by a shipped self-test and a no-network CI job. AI-implemented · human-gated.

Environment Safety

Tools for running AI agents safely — controlling what agents can see, touch, and do.

  • Rock · GitHub — Docker container for agentic R-based data science. Runs Claude Code, Codex, and Gemini CLI alongside a full R environment. Agents are isolated from your host files and credentials by default — they propose changes, you review and commit.

Transparency and Human Control

Tools for making AI-assisted analyses easier to inspect, explain, review, approve, or stop.

  • insideR — An x-ray for a single R package call. explain_call() shows which function actually runs, what it calls internally, and how replayable it is; unpack_call() extracts the executed R functions with their documentation, captures the inputs, and generates a standalone replay script that reproduces the original result and verifies itself against it — including a static security scan of the extracted code. The point is not to replace packages with loose scripts, but to make package-based work less of a black box for the human or coding agent that has to review it. AI-implemented · human-gated.
  • IPD — Independent Peer Deliberation: a portable agent skill for decisions that deserve two independent AI perspectives and an explicit human gate. Two equal peers receive the same frozen task, produce blind proposals, and review each other’s claims; a facilitator enforces the process but never picks the winner. It returns what both peers support, what remains contested with both positions preserved, the assumptions and evidence gaps behind each — and leaves the decision with the person. Agreement is not proof; IPD makes agreement, disagreement, and uncertainty inspectable.
  • Lens — In progress. Transparency layer for evidence, assumptions, uncertainty, workflow state, and review artifacts.
  • Gate — In progress. Human-control layer for permissions, checkpoints, escalation, approval, and release decisions.

Demos

Tools and workflows you can look at directly — running apps you can open in a browser, and a walkthrough of how a full analytic workflow is designed.

  • Lab Testing Toolkit — Example of a custom-built Shiny app developed to meet specific lab needs. Accepts user-supplied data and supports a full lab measurement analysis workflow in the browser — exploration, modelling, and export. Built to show what a purpose-built, need-specific interactive tool can look like.
  • ONgeoR — Live Shiny interface for resolving Ontario locations to public health geography: link facilities and points to Public Health Units and Ontario Health Regions, and inspect the results on a map. This is the R package’s own app, not a mock-up — the same code an analyst installs. See the package entry under Ontario Public Health Data Tools.

Ontario Public Health Data Tools

Open R packages for the geography and linkage problems that recur in Ontario public health analysis — built to be reproducible and source-documented rather than to bundle data that goes stale.

  • ONgeoR · Shiny app · Docs — Resolves Ontario locations, facilities, and infrastructure to public health geography. Retrieves boundaries and facility locations at runtime from authoritative sources such as the Ontario GeoHub (Land Information Ontario) REST services, links points and polygons to Public Health Units and Ontario Health Regions, and builds auditable crosswalk tables with full source provenance. The bundled Shiny app — live in the browser, or run locally with run_app() — lets you explore links and maps without writing code. No geospatial data is bundled — everything is retrieved and documented at the time of use. AI-implemented · human-gated.
  • OPCC — Open Postal Code Correspondence: source-qualified, reproducible many-to-many links between Ontario postal codes and Statistics Canada 2021 census geographies (Dissemination Areas and Blocks). Every result carries allocation weights, evidence source, lineage, method, and vintage; unmatched postal codes stay explicit rather than being silently dropped. Release artifacts are checksum-verified before use, and every artifact can be rebuilt from raw public sources using package functions alone. Benchmarked against an authorised PCCF-derived Ontario export at 99.5% any-link agreement. Built only from open, redistributable evidence — it does not redistribute Canada Post, PCCF, or PCCF+ data. AI-implemented · human-gated.

Public AI Co-Authored Packages

All open source and publicly available on CRAN and GitHub.

Packages designed, orchestrated, and reviewed by Lennon Li — built end-to-end by AI coding agents under human direction and gating.

  • courieR · GitHub · Docs — Migrates installed R packages between R versions on the same machine. Detects every R installation automatically, with both a Shiny dashboard and a CLI interface. Cross-platform (Windows, macOS, Linux). AI-implemented · human-gated.
  • dataganger · GitHub · Docs — Creates synthetic data doubles from real datasets for prototyping, teaching, Shiny development, and AI-assisted programming. Data profiling, role detection, configurable synthesis, utility comparison, and disclosure-risk warnings, driven from a guided Shiny app. AI-implemented · human-gated.

Public AI-Powered Applications

All open source and publicly accessible. These are live, deployed tools — not demos.

Applications with an AI agent embedded and actively working inside the tool. Designed, orchestrated, and reviewed by Lennon Li; built and maintained through AI agents under human direction and gating.

  • aiR · GitHub — AI-assisted companion for R-based statistical analysis. Agent-guided workflow for data exploration, modelling, and interpretation — the analyst stays in control of every decision. AI-implemented · human-gated.
  • SSC Accreditation Review · GitHub — Agent-assisted review tool for P.Stat. accreditation applications. Retrieves guideline sections, applies a structured rubric, and flags cases for human review — final decisions remain with a person. AI-implemented · human-gated.

More to come…