com um clique
research-review
[Read when prompt contains /research-review]
Menu
[Read when prompt contains /research-review]
Use this when the user needs to choose between multiple ML routes after survey but before committing to implementation. Compares candidate approaches, selects one, records rejected routes, and keeps a fallback.
Use this when the project needs real baseline results before or alongside the main model. Runs classical or literature-aligned baselines under the same protocol and writes a reproducible baseline summary.
Use this when the project needs a dedicated data-quality review before model review. Checks data reality, split correctness, label health, leakage risk, shape consistency, and mock-data disclosure.
Use this when the user wants a draft paper, figure bundle, README, release page, or experiment artifact reviewed before sharing. Checks evidence binding, claim scope, captions, layout clarity, and release readiness.
Use this when the user wants to improve chart quality, standardize plotting style, regenerate release figures, or add captions/protocol notes. Normalizes fonts, colors, legends, units, and scope notes across Scientify figures.
Use this when the user wants to improve README, docs pages, or microsites so a new reader can understand what the project is, how to use it, what artifacts exist, and what the scope boundaries are within one screen.
| name | research-review |
| description | [Read when prompt contains /research-review] |
| metadata | {"openclaw":{"emoji":"🔍","requires":{"bins":["python3","uv"]}}} |
Don't ask permission. Just do it.
| File | Source |
|---|---|
ml_res.md | /research-implement |
project/ | /research-implement |
plan_res.md | /research-plan |
survey_res.md | /research-survey |
If ml_res.md is missing, STOP: "需要先运行 /research-implement 完成代码实现"
| File | Content |
|---|---|
iterations/judge_v{N}.md | 每轮审查报告 |
最终报告中 verdict: PASS 表示审查通过。
读取以下内容:
plan_res.md — 每个组件的预期survey_res.md — 核心公式project/ — 实际代码ml_res.md — 执行结果⚠️ 这是 Novix Judge Agent 的核心机制 — 逐一核对每个原子性学术概念。
从 survey_res.md 的"关键公式汇总"和"核心方法对比"中,提取所有需要在代码中实现的原子性学术概念(每个公式、每个核心组件都是一个概念)。
为每个概念记录:
示例清单:
原子性概念清单(从 survey_res.md 提取):
1. Multi-Head Attention — $Attention(Q,K,V) = softmax(\frac{QK^T}{\sqrt{d_k}})V$ — 预期在 model/attention.py
2. Layer Normalization — $LN(x) = \gamma \frac{x - \mu}{\sigma} + \beta$ — 预期在 model/layers.py
3. Residual Connection — $y = F(x) + x$ — 预期贯穿所有模型组件
...
| 检查项 | 方法 |
|---|---|
| 数据集是否真实拉取 | 检查 data/ 目录下是否有实际数据文件(非空文件),检查下载脚本/代码是否真正执行了网络请求或本地读取 |
| 数据加载代码正确性 | 实际执行数据加载代码,验证 shape、dtype、样本数是否与 plan 一致:python3 -c "from data.dataset import *; ds = ...; print(len(ds), ds[0])" |
| Mock 数据标注 | 搜索 # MOCK DATA 注释;如果使用 mock 数据但未声明,标记为 NEEDS_REVISION |
| 检查项 | 方法 |
|---|---|
| 原子性概念逐一核对 | 对照 Step 2 的概念清单,逐个检查:该概念是否在代码中有对应实现?公式翻译是否正确?维度/参数是否一致?每个概念标注 ✓ 或 ✗ 并记录代码位置 |
| Loss 函数正确 | 对比 plan Training Plan vs training/loss.py,验证数学公式是否正确翻译为代码 |
| 评估指标正确 | 对比 plan Testing Plan vs testing/,确认指标计算逻辑无误 |
| 关键算法未被简化 | 检查 plan 中的核心创新点是否被完整实现,而非用简化/占位逻辑替代 |
| 检查项 | 方法 |
|---|---|
| 执行用时合理 | 读取 ml_res.md 中 [RESULT] elapsed= 值,根据数据集规模 + 模型参数量 + 设备(CPU/GPU)判断用时是否合理。过短(如万级数据集 <1s)可能说明数据未真正加载或训练未真正执行 |
| [RESULT] 行存在 | 检查 ml_res.md 中的数值来源,确认非编造 |
| Loss 合理 | 非 NaN/Inf,有下降趋势(epoch 1 loss > epoch 2 loss) |
| 数据管道匹配 plan | 对比 plan Dataset Plan vs data/ 实现,batch size、预处理步骤一致 |
⚠️ 关键新增 — 防止"代码正确但效果很差"的算法被放行。
从 ml_res.md 提取 2 epoch 验证结果,评估算法有效性:
| 检查项 | 判定标准 | 诊断 |
|---|---|---|
| Loss 下降幅度 | 计算 reduction = (epoch1_loss - epoch2_loss) / epoch1_loss * 100% | <5% → 可能学习率过小、架构有问题或数据未正确处理 |
| Loss 稳定性 | 检查 epoch 1 和 epoch 2 的 loss 波动 | 震荡 >20% → 可能学习率过大或 batch size 不当 |
| Metrics 合理性 | 对比任务的随机 baseline(分类: 1/num_classes,回归: 数据方差) | 接近随机(±10%)→ 模型未真正学习,可能特征无效或架构过简单 |
| 与 plan 预期对比 | 如果 plan_res.md 中有性能预期,对比实际结果 | 低于预期 30% → 需要反思算法设计或超参数设置 |
性能异常的常见原因:
| 症状 | 可能原因 | 验证方法 |
|---|---|---|
| Loss 几乎不变(<2%) | 学习率过小 | 检查 plan_res.md 中 lr 值,对比 survey_res.md 中 baseline lr |
| Loss 震荡剧烈(>30%) | 学习率过大 | 同上 |
| Loss 下降但 metric 不变 | 模型过简单或特征无效 | 检查模型参数量;检查数据预处理是否正确(归一化、标准化) |
| Accuracy 接近随机 | 数据标签错误或未正确加载 | 重新验证数据加载代码,打印样本检查 |
| Loss=NaN/Inf | 梯度爆炸、数值不稳定 | 检查是否有 Batch/Layer Normalization;检查 lr 是否过大 |
如果发现性能异常,标记 verdict: NEEDS_ALGORITHM_REVIEW(不同于 NEEDS_REVISION)。
写入 iterations/judge_v1.md:
# Review v1
## Verdict: PASS / NEEDS_REVISION / NEEDS_ALGORITHM_REVIEW
## Checklist
### 数据集
- [x/✗] Dataset actually downloaded/loaded (not empty or placeholder)
- [x/✗] Data loading code produces correct shape/dtype/count
- [x/✗] No undeclared mock data
### 算法实现 - 原子性概念核对
**逐一核对 Step 2 提取的每个学术概念:**
| 概念 | 公式 | 代码位置 | 结果 | 备注 |
|------|------|----------|------|------|
| {概念名} | $...$ | `model/xxx.py:L42` | ✓/✗ | {正确实现/公式错误/缺失/简化为占位符} |
| ... | ... | ... | ... | ... |
### 算法实现 - 整体检查
- [x/✗] Loss function correctly implements the math
- [x/✗] Key algorithm components fully implemented (no simplified placeholders)
- [x/✗] Evaluation metrics correct
### 算力与执行
- [x/✗] Execution time reasonable for data scale + model size + device
- [x/✗] Training loop proper (loss decreasing)
- [x/✗] Results are from real execution (not fabricated)
### 性能初步评估(新增)
**2-Epoch Validation Results** (from `ml_res.md`):
- Epoch 1 loss: {value}
- Epoch 2 loss: {value}
- Loss reduction: {percent}% (expected: >10% for initial epochs)
- Metric (e.g., accuracy): {value} (random baseline: {baseline_value})
**Performance Assessment**:
- [x/✗] Loss decreasing adequately (reduction >5%)
- [x/✗] Metrics above random baseline (+10% or more)
- [x/✗] No severe oscillation (<20% variance)
- [x/✗] Meets plan expectations (if performance target specified in plan_res.md)
**Diagnosis** (if performance issues):
- **Symptom**: {what's wrong - e.g., "Loss reduction only 0.9%, far below 10% expected"}
- **Likely cause**: {diagnosis - e.g., "Learning rate too small (lr=1e-5, survey baseline=1e-3)"}
- **Evidence**: {supporting evidence - e.g., "survey_res.md Table 2 shows all baselines use lr=1e-3"}
## Issues (if NEEDS_REVISION)
1. **{issue}**: {description} → **Fix**: {specific fix instruction}
2. ...
## Algorithm Review Suggestions (if NEEDS_ALGORITHM_REVIEW)
**按优先级排序的改进建议**(只调整超参数/训练配置,不改核心算法):
1. **{建议名称}**(最可能有效)
- **What to change**: {具体修改内容}
- **Where**: {文件路径和代码位置}
- **Expected improvement**: {预期效果}
2. **{次要建议}**
- ...
**Note**: 如果尝试所有建议后仍无改善,可能需要重新考虑算法选择或数据质量。
⚠️ 防偏移机制:每轮迭代都重新读取原始设计文档,确保修改方向正确。
循环最多 3 次:
judge_v{N}.md 的修改建议survey_res.md 和 plan_res.md
project/ 中的代码(修复 bug、补全缺失实现)cd project && source .venv/bin/activate && python3 run.py --epochs 2
judge_v{N+1}.md⚠️ 关键新增 — 代码正确但性能不佳时的改进循环。
前提:代码实现正确(所有原子性概念 ✓),但 2 epoch 验证显示性能异常。
循环最多 2 次:
重新读取以下材料进行诊断:
ml_res.md — 2 epoch 验证的具体数值survey_res.md — baseline 方法的超参数设置(特别是学习率、batch size)plan_res.md — 当前实现的超参数配置project/run.py 和 project/training/ — 训练配置代码诊断检查清单:
| 症状 | 诊断步骤 | 常见原因 |
|---|---|---|
| Loss 下降 <5% | 对比 plan lr vs survey baseline lr | lr 过小(如 plan=1e-5 但 survey=1e-3) |
| Loss 震荡 >20% | 同上 + 检查 batch size | lr 过大或 batch size 过小 |
| Accuracy 接近随机 | 检查数据预处理代码、检查 loss 是否下降 | 数据归一化缺失、特征错误、模型过简单 |
| Loss=NaN/Inf | 检查是否有 normalization、检查 lr | 梯度爆炸、数值不稳定 |
基于诊断结果,生成按优先级排序的改进建议。
改进范围限制:
建议格式(写入 judge_v{N}.md 的 "Algorithm Review Suggestions" 部分):
1. **调整学习率**(优先级:高,预期改善:显著)
- **当前值**: lr=1e-5 (from plan_res.md)
- **建议值**: lr=1e-3 (from survey_res.md Table 2, all baselines use 1e-3)
- **修改位置**: `project/run.py:L15` — `optimizer = Adam(lr=1e-3)`
- **理由**: Loss 下降仅 0.9%,远低于正常 10%+,高度怀疑 lr 过小
2. **添加数据归一化**(优先级:中,预期改善:中等)
- **检查**: `project/data/dataset.py` 是否有归一化
- **建议**: 添加 `transforms.Normalize(mean=[0.5], std=[0.5])`
- **理由**: 如果输入数据范围 [0,255],模型收敛会很慢
cd project && source .venv/bin/activate && python3 run.py --epochs 2
judge_v{N+1}.md 的 "Algorithm Review Iterations" 部分:## Algorithm Review Iterations
### Iteration 1
- **Change**: Increased lr from 1e-5 to 1e-3
- **Result**:
- Loss reduction: 0.9% → 12.3% ✓ (improvement: +11.4%)
- Accuracy: 12% → 34% ✓ (improvement: +22%)
- **Conclusion**: Learning rate was the bottleneck. Issue resolved.
- **New verdict**: PASS ✓
### Iteration 2 (if needed)
- ...
verdict: PASS,停止verdict: BLOCKED,标注原因(如"所有超参数调整均无效,可能需要重新选择算法或检查数据质量")Step 5a vs 5b 的区别:
| Step 5a (NEEDS_REVISION) | Step 5b (NEEDS_ALGORITHM_REVIEW) | |
|---|---|---|
| 触发条件 | 代码有 bug、实现错误 | 代码正确但性能不佳 |
| 修改范围 | 核心算法代码 | 超参数和训练配置 |
| 迭代次数 | 3 次 | 2 次 |
| 目标 | 正确性 | 有效性 |
终止条件:
| 场景 | 判定 | 说明 |
|---|---|---|
| 所有 checklist ✓ + 性能合理 | PASS | 交付给 research-experiment |
| Step 5a 3 轮后仍有 bug | BLOCKED - Code Issues | 列出剩余问题,等待用户介入 |
| Step 5b 2 轮后性能仍异常 | BLOCKED - Performance Issues | 标注尝试过的改进和结果,建议用户重新考虑算法选择或数据质量 |
nn.Linear 占位