Inspiration

AI coding assistants are confidently wrong. They produce code that passes casual human review, reads like idiomatic senior-engineer syntax, and contains persuasive docstrings, yet fails disastrously when real production edge conditions strike.

Existing industry benchmarks like HumanEval, MBPP, or SWE-bench fall short: they are heavily contaminated by training set memorization, evaluate basic textbook puzzles rather than production pitfalls like OWASP injection vectors or IEEE-754 precision clipping, and rely on subjective "LLM-as-a-judge" grading.

We wanted to answer one definitive question: Which AI models actually write correct code -- or just code that looks correct?

To answer this, we built FrontierBench: an open-source, deterministic evaluation harness that subjects the world's premier frontier models to zero-hint, real-world engineering edge cases with strict binary PASS/FAIL verdicts.

What it does

FrontierBench is a comprehensive deterministic benchmark and automated red-teaming harness designed to evaluate code generation across frontier and open-weight models:

  1. Deterministic Binary Verification: Zero LLM judges. Every model response is extracted into isolated Node.js and Python test containers and evaluated against hardened unit tests. The verdict is always binary: PASS or FAIL.
  2. 16-Task Edge-Case Taxonomy: Spans four core pillars: Precision & Numeric Integrity (IEEE-754 double precision collapse, largest-remainder integer distribution), Security & OWASP Hardening (CWE-601 open redirects, RegExp stateful mutation bugs, prototype pollution), Concurrency & Asynchrony (search-as-you-type race conditions, idempotent webhooks), and Data Parsing & Streaming (SSE mid-chunk fragmentation, unescaped nested JSON braces).
  3. Multi-Model Benchmark Analysis: Evaluated 7 industry-leading models across 147 test runs (Claude 3.5 Sonnet, DeepSeek V2.5, Meta Llama 3.1 8B, Mistral Large, Google Gemini 1.5 Pro, OpenAI GPT-4o, and xAI Grok 2).
  4. Confident-But-Wrong Detection: Automatically flags models whose natural language prose claimed the code was "fully robust" while failing the deterministic unit test.
  5. Integrated Lexsi Safety Repair Loop: Integrates AuditKIT v1.1.3 + CuratorKIT v0.1.22 in a 4-stage pipeline that curates failed traces into 15 repair pairs (Alpaca/ShareGPT schemas) and verifies a +100% safety improvement.
  6. Institutional Dark-Mode Leaderboard: A hosted static web app featuring real-time ranking badges, tabular progress meters, and an interactive task failure matrix.

How we built it

FrontierBench was developed from first principles with zero runtime bloat:

  • Harness Core (run_eval.py): Written in pure Python 3.9+ without external pip requirements. Features CLI arguments to validate test suites, export markdown prompts, bootstrap directory structures, grade multi-trial responses, and execute API runs via OpenRouter.
  • Symmetric Task Sandboxing: Each task contains a task.json specification, a broken starter implementation demonstrating test coverage, a hardened gold-standard reference solution, and an immutable deterministic test suite.
  • Lexsi AI Safety Pipeline (lexsi_pipeline.py): Orchestrates a 4-stage repair pipeline: baseline audit (AuditKIT), automated fine-tuning dataset curation (CuratorKIT), post-repair verification, and cryptographic delta reporting.
  • Web Leaderboard: Custom-coded with an institutional titanium-and-gunmetal aesthetic, responsive CSS Grid, sub-mesh background grid, and micro-SVG status crests with zero heavy frontend frameworks for instant loading.

Challenges we ran into

  1. Neutral Prompt Engineering: Ensuring prompts specified technical objectives clearly without inadvertently revealing the specific edge case (such as describing URL validation without mentioning "protocol-relative URLs" or "tab characters").
  2. Deterministic Concurrency Grading: Testing async race conditions in Node.js without introduced flakiness. We constructed deterministic event loop interleaving to verify that stale promises never overwrite fresh state.
  3. Language Boundary Nuances: Dealing with deep ECMAScript and Python quirks, such as JavaScript's silent month overflow (new Date(2026, 1, 31) becoming March 3) and Python's regex backslash replacement expansion in re.sub().

Accomplishments that we're proud of

  • 100% Deterministic Consistency: Perfect reproducibility across 3 separate evaluation trials per model per task with zero stochastic flakiness.
  • Exposing Real-World Security & Precision Bugs: Identifying critical vulnerabilities in top proprietary models that standard benchmarks overlook (such as IEEE-754 precision clipping in Claude and DeepSeek, and OWASP tab-redirect bypasses in Llama 3).
  • Closed-Loop Alignment Pipeline: Going beyond critique to generate verified 15-pair fine-tuning datasets via CuratorKIT, establishing a +100% safety delta.
  • Zero-Dependency Portability: Delivering an open-source evaluation suite that requires no external package installations.

What we learned

  • Fluency is Not Correctness: Models with the most eloquent, confident explanations often had the highest failure rates on nuanced edge cases.
  • Open-Weight Models are Production Contenders: Meta Llama 3.1 8B matched the 86% pass rate of Claude and DeepSeek, proving that focused alignment beats raw parameter count on logical precision.
  • The Necessity of Hard Verification: LLMs cannot reliably judge the correctness of other LLMs on deep architectural edge cases; deterministic test harnesses are essential.

What's next for FrontierBench: Deterministic AI Code Safety Benchmark

  • Scale to 100+ Production Tasks: Expanding coverage into WebAssembly memory safety, distributed consensus (Raft/Paxos), and smart contract reentrancy bugs.
  • CI/CD Gating Action: Releasing frontier-bench-action on the GitHub Actions Marketplace for automated PR validation of AI-generated pull requests.
  • Hugging Face Fine-Tuning Corpus: Publishing the curated Lexsi dataset pairs as an open-source DPO/SFT training resource for the developer community.
  • Polyglot Test Harnesses: Adding native compilers for Rust, Go, and C++ to stress-test memory management and concurrency primitives.

Built With

Share this project:

Updates

Submission history