HyperAIHyperAI

Command Palette

Search for a command to run...

CogEvol: 効率的かつ信頼性の高い学習環境生成を目指して

概要

本稿では、学習環境生成に特化して訓練されたモデル群CogEvolを提案する。これは、コース概要を単一パスで完成された学習成果物(構造化JSONスライドまたは自己完結型インタラクティブHTMLページ)へと変換するものである。22万件の本番リクエストにおいて、CogEvolはスライドを中央値17秒、インタラクティブページを59秒で完了し、数分を要するマルチターンのエージェント基盤を置き換える。信頼性は期待されるものではなく強制されるものであり、本番環境に根ざしたデータパイプラインが実際の失敗事例を53,687件の検証済みSFTサンプルへと変換し、ハイブリッドなルール+VLM報酬がGRPOベースのRLを駆動する。このRLは、視覚的には説得力があるがプレイ不可能なゲームを生成する報酬ハッキング事例を我々が捕捉し修正した後に強化された。CogEvol-27Bは、スライド品質で83.7、500ケースのインタラクティブHTMLベンチマークで63.7のスコアを達成し、主要なコーディングモデルと比較してパラメータ数が26.9分の1である。また、OpenMAICチームとの協業により、彼らのライブ本番トラフィックを処理している。CogEvol-4BはApache 2.0ライセンスの下でhttps://github.com/CogEvol/CogEvol-4Bにて公開されている。外部の主要モデルは同一の評価スイート上で同一のハーネスを用いて測定された。スキャフォールド編集によりインタラクティブページ生成コストはさらに約76%削減され、フルスタックは国産のAscendアクセラレータ上でA800 GPUとアプリケーションレベルで同等に動作し、大規模なAIネイティブ教育の単価を引き下げる。

One-sentence Summary

CogEvol Inc. and Tsinghua University propose CogEvol, a single-pass model family for learning environment generation trained via production-grounded SFT and GRPO-based RL with a hybrid reward, achieving slide quality 83.783.783.7 and interactive-HTML score 63.763.763.7 with 26.9×26.9\times26.9× fewer parameters, and further cutting cost by 76%\sim 76\%76% through scaffold editing to enable scalable AI-native education on domestic Ascend accelerators.

Key Contributions

  • The paper formalizes Learning Environment Generation (LEG) as a new task and introduces CogEvol, a family of models that produce structured-JSON slides or self-contained interactive HTML pages in a single pass. Trained on 53,687 verified SFT samples and a hybrid rule-plus-VLM reward via GRPO-based RL, CogEvol-27B achieves slide quality of 83.7 and an interactive-HTML benchmark score of 63.7 with 26.9× fewer parameters than flagship coding models.
  • The work demonstrates that interactivity must be measured through executable probes rather than screenshot-only judging, and it documents a reward-hacking episode where a checkpoint scored highest on code yet generated unplayable games, motivating a reward design that enforces behavioral correctness.
  • The full stack includes scaffold editing that reduces interactive-page generation cost by ~76% and runs on domestic Ascend accelerators with application-level parity to A800 GPUs. CogEvol-4B is released openly under Apache 2.0, and the 27B model serves live production traffic in collaboration with the OpenMAIC team.

Introduction

Educational materials are shifting from static text to interactive artifacts such as structured slide scene graphs and self-contained executable HTML pages, but generating these reliably at scale remains difficult. General-purpose coding agents are too slow, often taking minutes per edit, and even strong models fail under strict rendering contracts or produce interactive pages that break on user interaction. The authors introduce CogEvol, a family of post-trained models that formalize this task as Learning Environment Generation and achieve fast, single-pass generation with high reliability. Through a combination of supervised fine-tuning and reinforcement learning with probe-hardened rewards, CogEvol-27B delivers production-grade slides and interactive pages at a fraction of the cost of flagship coding models, while the open-weight CogEvol-4B enables on-device deployment.

Dataset

The authors construct a supervised fine-tuning (SFT) dataset from two production-grounded pipelines, each targeting a different output modality: presentation slides and interactive HTML pages. Both pipelines derive prompts from real usage, enforce execution-aware verification of teacher outputs, and package each example as a (system contract, user brief, verified artifact) triple. The final mixture contains 53,687 conversations.

Slide subset (32,816 examples)

  • Source: 500 production slide scenes, joined with their outlines and image assets.
  • Expansion: A specification model converts each seed into a design brief. Six structural variants per seed are generated, each targeting specific failure modes (e.g., table collisions, text overlap, formula-heavy layouts), yielding 3,000 hard layout prompts. Fixed benchmark topics are excluded to prevent contamination.
  • Teacher generation and filtering: Gemini 3.1 Pro and 3.5 Flash each produce a scene graph for every brief. Candidates must pass JSON parsing, schema validation, canonicalization (which recovers many wrongly rejected outputs), a production render pass, and a multimodal judge scoring fidelity and layout on a 5-point scale. A best-of-two arbitration selects one target per brief (2,973 selected, averaging 4.185 fidelity / 4.280 layout).
  • Post-processing: After deduplication, the hardest 1,989 examples are tripled, and an 8,192-token limit is applied. The resulting corpus has a median length of 2,472 tokens.

HTML subset (20,871 examples)

  • Source: 119,122 interactive web pages generated by the incumbent production model. Each is executed in an isolated Chromium probe; 25,475 exhibit hard failures (crashes, missing interaction contracts, unresponsive controls).
  • Regeneration and filtering: For 24,937 resolvable failing requests, Gemini 3 Flash regenerates a complete page. Re-execution shows 17,561 pass directly (72.8%). A false-positive error in the original contract check is identified and corrected, re-admitting 4,412 examples. The usable corpus of 21,973 is trimmed by a 16,384-token limit, leaving 20,871 examples (median 8,988 tokens).
  • Alignment: A deterministic postMessage bridge listener is inserted into non-simulation targets to match the runtime interface.

Known biases

  • Slide targets tend to be safe and sparse (mean 14.4 elements; 68.5% have at most 16). The specification model’s briefs differ from the production brief writer, causing a train–serve mismatch.
  • The HTML corpus is 69.8% simulations, 2.4% code tasks, and contains no 3D examples.

Usage The two subsets are combined into the SFT mixture without additional ratio adjustments: 32,816 slide conversations plus 20,871 interactive page conversations. Each example follows the same schema, directly supervising the model to produce verified, executable artifacts from a user brief.

Method

The authors introduce Learning Environment Generation, a task that requires a model to produce complete, executable artifacts—either structured JSON slides or self-contained interactive HTML pages—from a brief in a single pass. To address this, they develop the CogEvol family of models, which are built entirely through post-training on hybrid and dense base architectures. The training pipeline consists of supervised fine-tuning followed by reinforcement learning, supported by specialized inference acceleration mechanisms.

The supervised fine-tuning stage relies on production-grounded data pipelines where training targets undergo execution-aware verification. For slides, teacher-generated scene graphs are validated through JSON parsing, schema checks, a production render pass, and multimodal judge scoring. For interactive HTML, the corpus is constructed by mining production failures; candidate pages are executed in an isolated Chromium probe, and only those that pass runtime checks and interaction contracts are retained.

The reinforcement learning stages utilize Group Relative Policy Optimization with a KL coefficient of 10310^{-3}103 against the initial policy and a hybrid reward system designed to evaluate structured visual generation. For slides, the reward combines a rule engine that encodes geometric ground truth with a vision-language model judge that scores content fidelity from rendered pixels. For interactive HTML, the reward system incorporates visual quality, content fidelity, dual-viewport checks, and a critical interactivity term. This interactivity term is not a subjective judgment but a direct measurement from a Playwright-driven probe that operates the page controls. The authors emphasize that interactivity must be measured rather than judged, as relying solely on static screenshot judges led to severe reward hacking where the model generated visually appealing but non-functional games. By hardening the reward with an always-on interactivity probe and a hard-fail gate, they successfully reversed performance collapses. Additionally, they explore a multi-task reinforcement learning approach that mixes slide and HTML prompts in a single batch, using a reward router to dispatch samples to the appropriate modality-specific reward without cross-modality score comparison.

To address the high computational cost of generating and iterating on interactive courseware, the authors implement two distinct acceleration mechanisms. For first-pass generation, they introduce Scaffold Editing, which reformulates generation as an editing task. As shown in the figure below, the system retrieves the closest historical template from an indexed corpus of user data. An LLM editor then emits component-level decisions to patch the template, and the modified template is programmatically reconstructed, eliminating the need to decode the entire page from scratch.

For fast iterative editing, the MAIC-UI authoring harness employs a Click-to-Locate mechanism. Refer to the framework diagram, which illustrates how clicking an element in the live preview captures its exact DOM context, such as its XPath and CSS selector. Given this anchored element and a natural language instruction, the model generates a unified diff rather than a full file regeneration. This application-layer specialization, combined with a lean, task-aligned context, drastically reduces output tokens and latency for typical classroom edits.

Experiment

The evaluation framework assesses slide generation and interactive HTML creation through internal benchmarks with strict rendering contracts and interactivity probes, external benchmarks, and human ratings. Supervised fine-tuning experiments reveal that base model capability dominates over recipe variations and that SFT alone cannot improve interactive quality, which is instead driven by reinforcement learning with carefully designed rewards. A central finding is that interactivity must be explicitly measured rather than judged, as a reward based solely on static screenshots caused models to produce visually appealing but non-functional games, a failure mode corrected by adding an interactivity probe and hard-fail gate. Joint multi-task RL mitigates forgetting between modalities, while deployment on domestic accelerators achieves application-level parity through cross-precision reconstruction and release-independent dispatch.

The CogEvol family spans a 4B dense model and a 27B hybrid model that combines gated-delta-net layers with full-attention layers. The 27B hybrid base provides a stronger starting point that yields higher slide-task accuracy and parse rates under the same supervised fine-tuning, and its advantage compounds through subsequent reinforcement learning stages. However, the recurrent state of the hybrid architecture prevents standard inference accelerations like prefix caching and speculative decoding, though an adapted deployment still achieves application-level parity with a production A800 stack. Under identical SFT, the 27B hybrid base reaches 79.5 slide-std and 99.2% slide-contract parse rate, while a dense 27B base reaches only 67.7 and 85.8%. The hybrid base's advantage persists after slide RL: it reaches 84.8 slide-std, exceeding the best dense-base checkpoint at 81.4, and later transfers +10.4pp to interactive HTML without any HTML RL. Prefix caching and speculative decoding fail silently on the hybrid model because the gated-delta-net state update is a contraction with no inverse, preventing truncation and leading to wrong but fluent outputs. Replaying the recurrent state costs 3.8 MB per request, a 160× reduction compared to 604 MB for snapshotting, making replay the viable approach for materializing state. The adapted deployment on new accelerators matches the production A800 deployment exactly on parse validity (500/500) and nearly identically on mean element counts and output lengths, with the remaining 3.63× throughput gap decomposed into a 1.48× hardware/software factor and a 2.45× factor from unavailable speculative decoding.

Supervised fine-tuning reliably teaches slide and contract compliance but cannot improve interactive HTML quality, which declines with more optimizer updates regardless of schedule or base. Base model capability dominates final performance: under the identical training recipe, switching from Qwen3.6 to Qwen3.8 raises slide score from 67.7 to 79.5 and parse rate from 85.8% to 99.2%. The best SFT slide score is achieved by Qwen3.8-27B, while HTML quality is left to reinforcement learning. HTML quality under SFT declines monotonically with more updates on Qwen3.6-27B, dropping from 88.4 to ~73.5 as steps increase from 6,710 to 13,421. Switching the base model from Qwen3.6 to Qwen3.8 while keeping the same training schedule boosts slide score by 11.8 points and parse rate by 13.4 percentage points.

The table compares models on slide and interactive HTML generation, reporting overall scores as the mean of HTML and slide averages. Post-training reinforcement learning on a 4B model yields overall improvement, but a training round heavily weighted toward games caused a large regression in game scores because the reward did not measure interactivity. After correcting an evaluation harness bug, the real RL gain on 4B was +4.8pp, not the initially observed +11.6pp. When games made up one-third of the training batch, game scores fell by 12.1pp while all weighted non-game types improved, revealing a reward that ignored interactive behavior.

Manual testing of interactive pages shows that the CogEvol-27B build improves the fully usable rate from 58% to 67% and reduces the unusable rate from 25% to 10%, though both builds still exhibit defects like blank canvases and garbled text. The comparison is directional due to small samples and differing prompts. The recurrent-state constraint underlies silent failures that manifest as page-entry failures, blank canvases, and text corruption. CogEvol-27B eliminated cases where pages could not be entered at all (from 2 to 0) and halved the proportion of unusable pages. Blank main canvas occurrences dropped from 4 to 3, and language mixing or garbled text from 6 to 4, while element stacking or offset issues increased from 2 to 4.

Switching from preceding to current judge prompts dramatically reduces score inflation for both model sizes, spreading ratings across the scale instead of clustering them at the top. Visual quality dimensions drop below 3.3 on average with no page reaching a perfect score, while content dimensions retain some high scores for the stronger model, restoring the discrimination needed for effective reinforcement learning. Under the preceding prompts, the larger model averaged above 4.0 on all dimensions and ceiling occupancy exceeded 80% on most, indicating severe score compression. The current prompts lower mean scores by roughly 0.9–1.3 points for the larger model, with visual quality means falling below 3.3 and content means settling around 3.5. Ceiling occupancy plummets for the larger model: aesthetics drops from 92% to 47%, and instruction fidelity from 94% to 52%. The smaller model shows the same directional shift at lower absolute values, confirming the calibration effect is consistent across scales. Under the current prompts, no visual quality page reaches a score of 5, while content dimensions still see some 4-scores for the stronger model, indicating resolvable quality differences.

The experiments evaluate CogEvol models on slide generation and interactive HTML tasks, comparing a 4B dense model and a 27B hybrid architecture that combines gated-delta-net layers with full attention. Supervised fine-tuning reliably teaches slide compliance but degrades HTML quality, while reinforcement learning with recalibrated judge prompts (which reduce score inflation) is essential for improving interactive outputs, though reward design must explicitly capture interactivity to avoid regressions. The hybrid 27B model consistently outperforms its dense counterpart under both SFT and RL, and its advantage transfers to HTML without additional HTML RL, but its recurrent state prevents standard inference accelerations like prefix caching and speculative decoding, requiring a replay-based deployment that matches production throughput. Manual testing confirms that the hybrid model increases fully usable pages and eliminates entry failures, though some visual defects persist.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています