About Me

Hi! I am a Ph.D. student in the Programming Language Lab, School of Computer Science at Peking University, advised by Prof. Sergey Mechtaev. Previously, I completed a double major in Cyber Science and Law at Nankai University.

While LLMs and AI agents provide substantial support for programming, they frequently generate plausible code that fails to align with human intent. My research aims to address the oracle problem in AI-generated code through advances in programming languages and software engineering. Specifically, I seek to construct reliable correctness oracles or derive oracle-like signals in settings where no explicit oracle is available.

Education

Peking University emblem
Peking UniversitySep 2025 – Present
Ph.D., Programming Language Lab, School of Computer Science

Supervisor: Sergey Mechtaev · Expected graduation: 2030

Nankai University emblem
Nankai UniversitySep 2021 – Jun 2025
Bachelor’s Degree, College of Cyber Science

Double major in Cyber Science and Law · GPA: 3.79/4 · Ranked 1st

Publications

Validating Autoformalized Specifications via Contrapuntal Languages
Yihan Dai, Xuanlin Liu, Haoxiang Jia, Tianchi Li, Xin Zhang, Sergey Mechtaev
Under review · 2026 Preprint

An oracle-free approach to validating LLM-generated formal specifications using synthesized contrapuntal languages. Representational diversity helps reduce correlated errors and makes cross-language agreement a more reliable validation signal.

Reducing Hallucinations in LLM-Generated Code via Semantic Triangulation
Yihan Dai, Sijie Liang, Haotian Xu, Peichu Xie, Sergey Mechtaev

An oracle-free approach that detects hallucinations in LLM-generated code by checking consistency across transformed programming tasks, supported by theoretical analysis and empirical evaluation.

HoarePrompt: Structural Reasoning About Program Correctness in Natural Language
Dimitrios Stamatios Bouras, Yihan Dai, Tairan Wang, Yingfei Xiong, Sergey Mechtaev

An oracle-free approach that uses structured natural-language reasoning about program states to assess code correctness.

Authority Is Not a String: A Capability-Scoped Harness for Prompt-Injection-Resistant Coding Agents
Dimitrios Stamatios Bouras, Yihan Dai, Sergey Mechtaev
Statistical Independence Aware Caching for LLM Workflows
Yihan Dai, Dimitrios Stamatios Bouras, Haoxiang Jia, Sergey Mechtaev

Selected Awards & Honors

National Scholarship2022, 2024
TCL Huameng Scholarship2023
Outstanding Graduate Award; Outstanding Student Award2025

Academic Service & Teaching

Subreviewer2025–2026

ICSE 2026; ICSE 2027

Teaching Assistant · Peking UniversityMar – Jun 2026

04834580 Software Engineering (Honor Track), taught by Prof. Sergey Mechtaev

Teaching Assistant · Nankai UniversitySep 2024 – Jan 2025

Operating System, taught by Prof. Xiaoli Gong