Chen Zhao.Contact
Sheridan College CS β€’ Cloud Computing Specialization

Software Developer &
Creative Systems Builder

Hi, I'm Chen. My work bridges reliable AI research and hands-on systems engineering, with past projects ranging from specification compilers to physical interactive computing installations. Right now, I'm pursuing my thesis on AI reasoning and faithfulness. Alongside my research, I develop AI pipelines for an industry collaboration with StereoLOGIC under the direction of Professor Nick Sajadi from Sheridan College, turning enterprise process, and task-mining data into actionable efficiency and cost savings.

Chen Zhao

More Featured Projects

Bachelor's CS Thesis (2025–2026)AI Alignment & Interpretability

Sequential Dual-LoRA vs. Monolithic Distillation

Addressing reasoning unfaithfulness where LLMs cheat their own visible logic. Uses runtime adapter hot-swapping on Qwen-3-8B to physically decouple thinking from answering.

Scientific Contribution:Proves that wiping the KV-cache between stages forces the model's output to condition strictly on explicit reasoning tokens.
PyTorchvLLMQLoRAMcNemar's Test
Sheridan College β€’ Honours Bachelor of Computer Science Thesis
Bachelor's Thesis Proposal (2025–2026)AI Safety & AlignmentMechanistic Interpretability

Sequential Dual-LoRA vs. Monolithic Distillation

A Comparative Study of Reasoning Faithfulness in GSM8K

Author: Chen Zhao β€’ Supervisors: Dr. Ghassem Tofighi, Prof. Richard Pyne

1. Motivation: Readout Unfaithfulness in Reasoning Engines

As Large Language Models have advanced from pattern matchers to multistep reasoning engines, empirical research has uncovered a critical reliability vulnerability: reasoning unfaithfulness, and specifically readout unfaithfulness, where the model bypasses its explicit reasoning trace to emit an answer derived from latent shortcuts and memorized parametric priors.

In standard monolithic architectures, reasoning generation and answer readout share an entangled parameter space and continuous hidden activations, eliminating any structural guarantee that the final prediction causally depends on the stated logic. This research addresses this interpretability gap by proposing a Sequential Dual-LoRA Architecture.

By physically decoupling the "Thinking" and "Solving" phases within a single quantized Qwen-3-8B base model and clearing the Key-Value (KV) cache between steps, this framework establishes the intermediate reasoning trace as an inspectable, discrete Intermediate Representation (IR). This enforces a strict causal bottleneck, testing whether physical parameter separation compels the readout module to condition exclusively on explicit textual logic on standard consumer hardware.

2. Architecture Comparison

Continuous hidden activation shortcuts vs. discrete tokenized Intermediate Representation bottleneck.

BASELINE: MONOLITHIC ARCHITECTURE (Shared Continuous Activations)❌ READOUT UNFAITHFULNESSInput QMath BenchmarkQwen-3-8B MonolithicEntangled Latent Space(Shared Weights & KV Cache)Generated CoTSuperficial TraceAnswer ReadoutParametric HallucinationLatent Shortcut (Bypasses CoT)PROPOSED: SEQUENTIAL DUAL-LORA (Discrete Intermediate Representation)βœ… STRICT CAUSAL BOTTLENECKInput QMath BenchmarkPHASE 1: LOGICThinker AdapterBase Qwen-3-8B (QLoRA r=16)Emits Discrete Reasoning TraceDiscrete IRInspectable CoT(Token Stream)⚑KV Cache ClearedPHASE 2: READOUTSolver AdapterBase Qwen-3-8B (QLoRA r=16)Input: [Question] + [Explicit IR]CausalAnswer
Entangled Latent Space (Monolithic)

In monolithic distilled models, the answer token distribution is conditioned simultaneously on input tokens and internal transformer activations stored in the Key-Value (KV) cache. The generated Chain of Thought (CoT) often acts as an ungrounded post-hoc explanation rather than the true generator of the prediction.

The Discrete IR Bottleneck (Dual-LoRA)

By flushing the KV cache and dynamically swapping from the Thinker adapter to the Solver adapter, all latent continuous activations are obliterated. The Solver model receives only string tokens, forcing its readout attention heads to condition exclusively on the explicit reasoning trace.

3. Architectural Design Choices & Hardware Tradeoffs

Why Dual-LoRA Over Two Discrete Models?

An intuitive way to separate thinking from answering is deploying two independent models (e.g., an 8B Thinker and a 3B Solver). However, this introduces severe latency and computational overhead.

Dual-LoRA retains a single, frozen 4-bit base model in GPU VRAM (5.8 GB). Each LoRA adapter is less than 50 MB. Using vLLM's multi-LoRA routing, swapping adapters takes under 50 milliseconds with zero weight-reloading overhead, fitting comfortably within a single consumer 12GB RTX 4070.

Why the KV Cache Must Be Wiped

Standard adapter swapping in multi-tenant inference keeps the existing KV cache alive to save compute. In our safety architecture, preserving the KV cache is catastrophic: it allows the Solver's self-attention layers to access the Thinker's latent representation states.

By enforcing a strict "Stop-Clear-Swap" protocol, the generated reasoning is forced to materialize into concrete string tokens, establishing an inspectable, deterministic causal boundary.

4. Experimental Methodology: The Adversarial "Trap Test"

1. Oracle Distillation5,000 GSM8K problems passed to DeepSeek-V3.2 (Thinking Mode). Traces >1,500 tokens filtered out to respect memory limits.
2. Known-Correct SubsetEvaluation on GSM-Symbolic isolates questions both architectures solve correctly when unperturbed, decoupling capability from alignment.
3. Saboteur InjectionDeepSeek injects a subtle calculation error (e.g. 7Γ—8=54) into early reasoning steps and recalculates subsequent steps consistently.
Measuring Causal Adherence

When presented with the "Trapped" reasoning trace, the two architectures are evaluated on their adherence:

  • Faithful (Trap Success): The model strictly follows the corrupted intermediate steps and outputs the incorrect answer mandated by the premise flaw.
  • Unfaithful (Trap Failure): The model ignores the faulty trace and outputs the ground truth from its internal parametric weights, exposing readout disconnect.

Statistical significance of the paired nominal outcomes (Faithful vs. Unfaithful across identical questions) is quantified via McNemar's Non-Parametric Test.

5. Faculty Consultations & Review

Dr. Ghassem Tofighi

Validated the core concept of using modular LoRA adapters to decouple reasoning from answering. Advised narrowing the scope to a concrete paired comparison (Monolithic vs. Dual-LoRA), bounding the adversarial set to ~100 vetted examples, and verifying execution on an RTX 4070 (12GB VRAM).

Prof. Richard Pyne

Endorsed the revised proposal, noting the methodology holds "good promise and potential." Advised proceeding directly to formal submission with a focus on pipeline feasibility for student researcher execution.

Game Engine & Compiler Pipeline16-Color EGA Strategy

δΈ‰εœ‹εΏ—ε€–ε‚³ β€” Spec-Driven Retro Game Synthesis

A 3-layer declarative specification pipeline (layout.yaml, elements.yaml, states.yaml) compiled into prompt constraints, proving that ~350 lines of structured YAML eliminates visual drift and hallucinatory CSS defaults in LLMs.

Engine & Compiler Features:Renders a 41-province polygon canvas map, a 10Γ—10 tactical battlefield hex grid, and an 8-state transition machine in an authentic 640Γ—400 EGA color palette.
YAML SpecHTML5 CanvasState MachinePrompt Compiler
Research & Side Project Showcase β€’ UI Synthesis & Prompt Compiler
UI Synthesis & Prompt Compiler Architecture

Spec-Driven UI Synthesis vs. Vision Models

A comparative benchmark evaluating frontend code generation. This project contrasts Direct Video-to-Code translation (using multimodal LLMs over 100k tokens of raw video) against a 3-Layer Declarative Specification Pipeline (~350 lines of YAML compiled into a structured prompt context).

Live Interactive Comparison

Interact with both generated outputs in real time below.

Target: 16-Color EGA Retro UI
EXAMPLE 1: DIRECT VIDEO TRANSLATIONRaw Video Data β†’ Direct Prompting
Full Screen β†—
⚠️ Hallucinations & Drift Observed:
  • Hallucinated modern "sci-fi BIOS" glow, rounded corners (rounded-lg), and smooth gradients.
  • Misaligned spatial layouts (portrait box shifted left, map rendered as abstract nodes).
  • Lost Chinese localization; fallback to English abbreviations (PROV, GOV, SOL).
EXAMPLE 2: SPEC-DRIVEN GENERATION3-Layer YAML Spec β†’ Compiled Prompt
Full Screen β†—
βœ… Strict Constraint Adherence:
  • Rigid 90Β° box corners, flat EGA palette fills, and thick multi-colored borders preserved.
  • Fixed 55%/45% layout split with structured sidebar header/content/action slots.
  • Exact Traditional Chinese text localization and 41-province polygon canvas map.

The Underlying Specification (350 Lines Total)

The three modular YAML files compiled by prompt_compiler.py to enforce deterministic layout and state transitions.

# ==============================================================================
# LAYER 1: MULTI-TEMPLATE LAYOUT ARCHITECTURE
# ==============================================================================
width: 640
height: 400
gap: 0

theme:
  colors:
    background: "#000000"
    border_primary: "#FFFF55"   # EGA Yellow
    border_secondary: "#FF55FF" # EGA Magenta
    text_primary: "#FFFFFF"     # EGA White
    text_accent: "#00AAAA"      # EGA Cyan
  directives:
    - "No rounded corners, gradients, CSS drop-shadows, or glowing neon monitors."
    - "All containers and elements must use rigid 90-degree box corners."
    - "All text must render using standard monospace/pixelated styling with standard anti-aliasing disabled."
    - "All borders must be thick, solid, and styled with multi-colored patterns."

templates:
  title_screen:
    direction: row
    regions:
      dragon_pane: { width: "25%" }
      menu_pane: { flex_grow: 1, direction: column, justify: center, align: center }
      tiger_pane: { width: "25%" }

  main_gameplay:
    direction: row
    regions:
      map_pane: { width: "55%" }
      sidebar:
        gap: 8
        padding: 8
        regions:
          header:
            height: 80
            direction: row
            regions:
              info_text: { flex_grow: 3 }
              portrait_box: { width: 80 }
          content:
            regions:
              stats_view: {}
              graphic_view: {}
          action: { height: 120 }

  battlefield:
    direction: row
    regions:
      tactical_grid: { width: "55%" }
      battle_sidebar:
        gap: 8
        padding: 8
        regions:
          battle_stats: { height: "50%" }
          battle_action: { flex_grow: 1 }

Research Write-Up & Tradeoff Frontier Analysis

Aesthetic & Stylistic Drift in LLMs

In a visual debugging and code generation setting, direct video-to-code synthesis is highly susceptible to hallucinating modern UI tropes. Because general-purpose LLMs are heavily fine-tuned on modern web frameworks, they default to modern utilities (rounded-lg, box shadows, glowing scanlines, CSS gradients) when given abstract visual instructions.

The Specification Tradeoff Frontier

By establishing a strict 3-layer constraints pipeline in lightweight YAML, developers create a boundary that the LLM cannot bypass. However, an inherent tradeoff exists: increasing specification detail eventually approaches the complexity of writing raw HTML. The ~350-line specification structure used here achieves the optimal Pareto frontier between specification brevity and output stability.

Career Journey, Education & Engineering Profile

Career Profile & Engineering BiographyActive OCI Research β€’ Sheridan CAAI Γ— StereoLOGIC

Engineering from the Trading Floor to the AI Research Frontier

Appointed under an Ontario Centres of Innovation (OCI) grant on the Agentic Digital Twin for Business Process Optimization project with Prof. Nick Sajadi. My background spans quantitative C++ derivative engines at Scotiabank, clinical vaccination tools at North York General Hospital, and C# pricing platforms at EQ Consulting.

Sep 2026 – PresentAI Research AssistantSheridan CAAI Γ— StereoLOGIC
2022 – 2023C# DeveloperEQ Consulting Inc
2020 – 2021Tech Support LeadNorth York General Hospital
2019Financial EngineerScotiabank GBM
Sheridan Honours CS (Cloud)AWS Solutions ArchitectMongoDB Certified DeveloperBearHacks Best Hardware
Unfold 4 Career Chapters & Formal Credentials
Career Profile & Engineering Biography

Engineering from the Trading Floor
to the AI Research Frontier

My path into computer science hasn't followed a typical pipeline. I began in mathematical finance calculating instantaneous sensitivities on trading desks, stepped up to build critical dispatch software for frontline hospital staff during COVID-19, and returned to Sheridan College to specialize in Cloud Computing and AI Alignment.

CURRENT FOCUSAgentic Process AI
CORE LANGUAGESPython β€’ C# β€’ C++
DEGREE & SPECHonours CS (Cloud)
HARDWARE & VISIONBearHacks 1st Place

01. Career Chapters & Professional Roles

Chronological Breakdown
Chapter 04 β€’ The Research Frontier
AI Research Assistant

Sheridan College (CAAI) Γ— StereoLOGIC β€’ Oakville, ON

Sep 2026 – Present

Operating on an Ontario Centres of Innovation (OCI) grant on the Agentic Digital Twin for Business Process Optimization project under Prof. Nick Sajadi. We are bridging the gap between passive corporate telemetry and autonomous process mining by teaching small, localized models to understand human work.

⚑ Core Contributions & Technical Architecture:
  • OCI Grant Appointment: Appointed under an Ontario Centres of Innovation (OCI) grant on the Agentic Digital Twin for Business Process Optimization project, reporting to PI Prof. Nick Sajadi and CAAI leadership to translate raw enterprise desktop telemetry into autonomous task-mining representations.
  • Multimodal Screen Perception: Engineered multimodal screen recognition pipelines and micro-action classification algorithms, capturing visual UI hierarchies alongside granular user interactions (keystrokes, navigation, clicks) to reconstruct noise-free, end-to-end process-mining execution logs.
  • Adapter Optimization (LoRA/SFT): Applied Supervised Fine-Tuning (SFT) and parameter-efficient LoRA adapters on open-source LLMs to optimize downstream inference pipelines, significantly reducing token latency and hardware overhead while boosting structured reasoning and process abstraction accuracy.
  • Production Benchmarking: Constructed automated testing, validation, and progress-tracking suites alongside StereoLOGIC's engineering team, benchmarking recognition precision against real-world production task datasets to systematically surface operational inefficiencies and cost-saving opportunities.
Chapter 03 β€’ Quantitative Systems
C# Quantitative & Systems Developer

EQ Consulting Inc β€’ Toronto, ON

Feb 2022 – Dec 2023

Designed quantitative modeling and calculation tooling for institutional traders, bridging complex numerical derivative models with responsive front-office desktop applications.

⚑ Core Contributions & Technical Architecture:
  • Financial Modeling: Engineered comprehensive financial models in C# and C++ for Equity, FX, and Commodity products, delivering pricing and risk analytics.
  • Front-Office Excel Integration (VSTO): Developed user interfaces for traders using Excel and VSTO, facilitating access to quantitative models and decision making.
  • P&L & Risk Surfaces: Innovated Risk and Profit & Loss (P&L) visualization tools providing actionable data analysis for trading strategies, and automated portfolio data aggregation processes through scripts.
Chapter 02 β€’ High-Stakes Public Infrastructure
Information Services Technical Support Lead

North York General Hospital β€’ Toronto, ON

2020 – 2021

During the peak of COVID-19 vaccination efforts, I led hands-on technical operations across clinical vaccination centers, writing rapid web automation tools so healthcare workers could focus on patients instead of manual administration.

⚑ Core Contributions & Technical Architecture:
  • Clinical Shift Management App: Developed internal web tools using Angular, Node.js, and MySQL to track and manage shift slots for hospital staff.
  • Zero-Downtime Deployment: Led technical support at vaccination centers, overseeing hardware/software configuration and proactively resolving issues.
  • Script Automation: Authored Python scripts to automate administrative processes, saving operational time and ensuring data accuracy.
Chapter 01 β€’ The Mathematical Foundation
Financial Engineer Analyst

Scotiabank Global Banking and Markets β€’ Toronto, ON

Apr 2019 – Sep 2019

Embedded directly on the trading floor, connecting core quantitative C++ pricing engines to front-office interfaces for real-time risk hedging.

⚑ Core Contributions & Technical Architecture:
  • C++ Pricing Connectors: Developed connector layers bridging core C++ Black-Scholes and Monte Carlo pricing libraries to Excel VBA, executing automated regression test suites to safeguard mission-critical valuation routines against integration bugs.
  • Real-Time Greeks Engine: Collaborated directly with day traders and quantitative market makers to compute and deliver real-time sensitivity analytics (Greeks: Delta, Gamma, Vega, Theta), empowering rapid risk rebalancing during high-volatility market-open windows.
  • Front-Office Dashboards & Data Pipelines: Designed interactive Excel trading dashboards driven by C++ valuation models for instantaneous scenario stress-testing, and authored automated Python and Bash data sanitation pipelines to clean raw tick-level exchange feeds.

02. Formal Education & Credentials

Academic & Industry
Undergraduate DegreeGraduating 2026
Honours Bachelor of Computer Science

Sheridan College β€’ Oakville, ON

Specialization: Cloud Computing.
Thesis: Sequential Dual-LoRA for Causal Reasoning Faithfulness in LLMs (Supervised by Dr. Ghassem Tofighi & Prof. Richard Pyne).

Hackathon AwardBearHacks 2026
Best Hardware Project β€” Winner

EchoBin Autonomous Edge Waste Installation

Recognized for low-latency physical edge computing, concurrency masking via asynchronous queues, and human-in-the-loop behavioral interventions.

Cloud CertificationIssued 2025
AWS Certified Solutions Architect – Associate

Amazon Web Services

Demonstrated mastery in resilient distributed architectures, VPC topologies, IAM governance, and cost-optimized cloud backends.

Database CertificationIssued 2021
MongoDB Certified Professional Developer

MongoDB University

Proficiency in document schema modeling, aggregation pipelines, replica set failovers, and transactional consistency.

Core Toolbox & Engineering Philosophy

01 β€’ Causality Over Smoke

Whether designing Dual-LoRA bottlenecks or verifying trading Greeks, I do not trust black boxes. Systems must produce inspectable, causally faithful reasoning traces rather than plausible-sounding hallucinations.

02 β€’ Low-Latency Concurrency

User experience degrades when I/O operations block. From VSTO spreadsheets to multi-threaded Raspberry Pi vision workers, overlapping execution and masking latency is fundamental to responsive engineering.

03 β€’ Physical Pragmatism

Software lives in the real world. Real-world systems run on messy telemetry, noisy hospital shifts, and dirty waste disposal slots. I design software resilient enough to survive messy edge conditions.

Languages

JavaPythonC#C/C++VBABashSQLTypeScript

AI / ML & Systems Frameworks

PyTorchUnsloth (QLoRA)vLLMOpenCVComputer Vision (OCR/Detection)Gemma MultimodalRaspberry PiGame Engines & CanvasElevenLabs API

Web & Databases

AstroHTML5 CanvasNode.jsAngularMySQLMongoDBSQL Server

Cloud & Platforms

AWS (Solutions Architect)Cloudflare PagesGitLinux / POSIXDockerVisual Studio