research: publish AttnRes forward training study

This commit is contained in:
wuyang
2026-07-30 18:41:18 +08:00
parent 7ea91caabb
commit f177fa676d
47 changed files with 192164 additions and 192 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ if (numeric(reliability.initial.passAt) <= numeric(reliability.k2.passAt) || num
if (reliability.nonIdempotent.sideRisk === "LOW") failures.push("非幂等写操作风险没有提升");
if (numeric(rl.wait.utilization) >= numeric(rl.full.utilization) || numeric(rl.wait.lostWork) <= numeric(rl.full.lostWork)) failures.push("wait-all 长尾/重算方向异常");
if (!rl.wait.takeaway.includes("wait-all") || rl.keyboardSelected !== "rl" || rl.keyboardVisible !== "rl") failures.push("长程 RL 解释或键盘导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || papers.total !== 486 || !papers.hasAgentFilter || papers.agentVisible < 52) failures.push("论文库 Agent 标签或论文总数异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);
+1 -1
View File
@@ -226,7 +226,7 @@ if (!update.steps[0].includes("Fixed preference")) failures.push("DPO 更新流
if (!recipe.family.includes("Multi-effort") || !recipe.regime.includes("9 RL experts") || !recipe.constraints.includes("verbosity")) failures.push("K3 配方合同异常");
if (!recipe.path.some((step) => step.includes("3 domains × 3 efforts")) || !recipe.path.some((step) => step.includes("MOPD"))) failures.push("K3 配方路径异常");
if (recipe.keyboardSelected !== "recipe" || recipe.keyboardVisible !== "recipe") failures.push("实验 tab 键盘导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || papers.total !== 486 || !papers.hasAlignmentFilter || papers.alignmentVisible < 35) failures.push("论文库后训练标签或论文总数异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);
+1 -1
View File
@@ -234,7 +234,7 @@ if (layout.navLinks !== 20 || mobile.mobileLinks !== 20 || home.navLinks !== 20)
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") {
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") {
failures.push("首页 Transformer 新章入口异常");
}
if (home.paperCount !== "486") failures.push(`首页论文总数异常:${home.paperCount}`);
+1 -1
View File
@@ -1318,7 +1318,7 @@ if (completionDepth.tasks.panel !== "tasks" || completionDepth.tasks.mathCards !
if (completionDepth.hidden.panel !== "hidden" || completionDepth.hidden.stages !== 29 || completionDepth.hidden.selected !== "layer_07" || completionDepth.hidden.points !== 29 || completionDepth.hidden.exact === "1,537 / 1,537" || numeric(completionDepth.hidden.relative) <= 0) failures.push("29 阶段隐藏状态曲线或交互异常");
if (completionDepth.router.panel !== "router" || completionDepth.router.layers !== 26 || completionDepth.router.selected !== "layer 24" || completionDepth.router.points !== 26 || !completionDepth.router.ordered.includes("%") || !completionDepth.router.setExact.includes("%") || numeric(completionDepth.router.tv) <= 0 || completionDepth.router.reproCards !== 4 || completionDepth.router.links !== 4) failures.push("26 层 MoE 路由曲线或复跑证据异常");
if (completionDepth.keyboardSelected !== "tasks" || completionDepth.keyboardVisible !== "tasks") failures.push("完成度与全深度实验键盘 tab 导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/" || home.paperCount !== "486") failures.push("首页 K3 首发入口或论文数异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/" || home.paperCount !== "486") failures.push("首页 K3 首发入口或论文数异常");
if (papers.total !== 486 || !papers.hasFilter || papers.visible < 20 || !papers.hasCoder || !papers.hasEngram) failures.push("论文库 DeepSeek 聚光异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4 || mobile.artifactTabs !== 13 || mobile.behaviorTabs !== 4 || mobile.behaviorSources !== 16 || mobile.behaviorEdges !== 10 || mobile.behaviorDeviceCells !== 29 || mobile.completionDepthTabs !== 4 || mobile.completionDepthHiddenStages !== 29 || mobile.completionDepthRouterLayers !== 26 || mobile.artifactHeatCells !== 64 || mobile.corpusCohorts !== 3 || mobile.lengthDeltaCards !== 4 || mobile.templateLayers !== 6 || mobile.templateScopes !== 2 || mobile.templateModes !== 2 || mobile.templateDomainCards !== 4 || mobile.templateDepthCells !== 24 || mobile.historyLayers !== 6 || mobile.historyScopes !== 2 || mobile.historyModes !== 2 || mobile.historyEffects !== 3 || mobile.historyDomainCards !== 4 || mobile.historyDepthCells !== 24 || mobile.distanceLayers !== 6 || mobile.distanceScopes !== 2 || mobile.distanceModes !== 2 || mobile.distanceContrasts !== 2 || mobile.distanceDomainCards !== 4 || mobile.distanceDepthCells !== 24 || mobile.boundaryLayers !== 6 || mobile.boundaryScopes !== 2 || mobile.boundaryModes !== 2 || mobile.boundaryContrasts !== 3 || mobile.boundaryTokenCards !== 4 || mobile.boundaryDomainCards !== 4 || mobile.boundaryDepthCells !== 24 || mobile.roleLayers !== 6 || mobile.roleScopes !== 2 || mobile.roleModes !== 2 || mobile.roleContrasts !== 3 || mobile.roleLevelCards !== 4 || mobile.roleDomainCards !== 4 || mobile.roleDepthCells !== 24 || mobile.specialLayers !== 6 || mobile.specialScopes !== 2 || mobile.specialModes !== 2 || mobile.specialContrasts !== 4 || mobile.specialTokenCards !== 4 || mobile.specialDomainCards !== 4 || mobile.specialDepthCells !== 24 || mobile.roleBlockLayers !== 6 || mobile.roleBlockScopes !== 2 || mobile.roleBlockModes !== 2 || mobile.roleBlockEffects !== 3 || mobile.roleBlockMatrixCards !== 4 || mobile.roleBlockDomainCards !== 4 || mobile.roleBlockDepthCells !== 24) failures.push("移动端导航或实验异常");
if (mobile.offenders.length) failures.push(`移动端越界元素:${JSON.stringify(mobile.offenders)}`);
+1 -1
View File
@@ -277,7 +277,7 @@ if (numeric(system.initial.success) <= numeric(system.initial.model) || numeric(
if (numeric(system.cheap.success) >= numeric(system.initial.success) || numeric(system.cheap.cost) !== 4) failures.push("低预算没有降低成功率 / 成本");
if (numeric(system.locked.unsafe) !== 0 || numeric(system.locked.overrefusal) <= numeric(system.initial.overrefusal)) failures.push("安全壳没有展现危险服从 / 过拒权衡");
if (system.keyboardSelected !== "judge" || system.keyboardVisible !== "judge") failures.push("实验键盘 tab 导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || home.topicCount !== "17" || papers.total !== 486 || !papers.hasFilter || papers.visible < 80) failures.push("首页 / 论文库评测索引异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (mobile.offenders.length) failures.push(`移动端越界元素:${JSON.stringify(mobile.offenders)}`);
+1 -1
View File
@@ -264,7 +264,7 @@ if (!fleet.k3.avoided.includes("320K") || fleet.k3.shortSlo !== "PROTECTED") fai
if (!fleet.failed.state.includes("SECONDARY RE-PREFILL") || !fleet.failed.recompute.includes("FAILED PRIMARY")) failures.push("缓存故障没有触发原子失效后的重算");
if (fleet.bursty.shortSlo !== "VIOLATED") failures.push("平均并发阈值没有暴露长请求突发");
if (fleet.keyboardSelected !== "phase" || fleet.keyboardVisible !== "phase") failures.push("实验键盘 tab 导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || papers.total !== 486 || !papers.hasFilter || papers.visible !== 46) failures.push("论文库推理服务标签或总数异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (mobile.offenders.length) failures.push(`移动端越界元素:${JSON.stringify(mobile.offenders)}`);
@@ -0,0 +1,257 @@
import { writeFileSync } from "node:fs";
const cdpPort = process.env.CDP_PORT ?? "9231";
const baseUrl = process.env.SITE_URL ?? "http://127.0.0.1:4330";
const pages = await fetch(`http://127.0.0.1:${cdpPort}/json/list`).then((response) => response.json());
const page = pages.find((entry) => entry.type === "page");
if (!page) throw new Error(`CDP ${cdpPort} 没有可用页面`);
const socket = new WebSocket(page.webSocketDebuggerUrl);
await new Promise((resolve, reject) => {
socket.addEventListener("open", resolve, { once: true });
socket.addEventListener("error", reject, { once: true });
});
let nextId = 0;
const pending = new Map();
const exceptions = [];
socket.addEventListener("message", (event) => {
const message = JSON.parse(event.data);
if (message.id && pending.has(message.id)) {
const { resolve, reject } = pending.get(message.id);
pending.delete(message.id);
if (message.error) reject(new Error(message.error.message));
else resolve(message.result);
}
if (message.method === "Runtime.exceptionThrown") {
exceptions.push(message.params.exceptionDetails.exception?.description ?? message.params.exceptionDetails.text);
}
});
const command = (method, params = {}) => new Promise((resolve, reject) => {
const id = ++nextId;
pending.set(id, { resolve, reject });
socket.send(JSON.stringify({ id, method, params }));
});
const pause = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
const evaluate = async (expression) => {
const result = await command("Runtime.evaluate", { expression, returnByValue: true, awaitPromise: true });
if (result.exceptionDetails) throw new Error(result.exceptionDetails.exception?.description ?? result.exceptionDetails.text);
return result.result.value;
};
const navigate = async (path) => {
await command("Page.navigate", { url: `${baseUrl}${path}` });
for (let attempt = 0; attempt < 100; attempt += 1) {
await pause(100);
if (await evaluate("document.readyState === 'complete'")) return;
}
throw new Error(`${path} 加载超时`);
};
const screenshot = async (path) => {
const result = await command("Page.captureScreenshot", { format: "png", captureBeyondViewport: false });
writeFileSync(path, Buffer.from(result.data, "base64"));
};
await command("Page.enable");
await command("Runtime.enable");
await command("Emulation.setDeviceMetricsOverride", {
width: 1440,
height: 1100,
deviceScaleFactor: 1,
mobile: false,
});
await navigate("/k3/");
const desktop = await evaluate(`(() => {
const root = document.querySelector("[data-forward-lab]");
root.scrollIntoView({ block: "start", behavior: "instant" });
window.scrollBy(0, -78);
const text = (selector) => root.querySelector(selector)?.textContent.replace(/\\s+/g, " ").trim();
const panel = () => root.querySelector("[data-forward-panel]:not([hidden])")?.dataset.forwardPanel;
const setSelect = (selector, value) => {
const node = root.querySelector(selector);
node.value = value;
node.dispatchEvent(new Event("change", { bubbles: true }));
};
const initial = {
panel: panel(),
tabs: root.querySelectorAll("[data-forward-tab]").length,
panels: root.querySelectorAll("[data-forward-panel]").length,
ledger: root.querySelectorAll(".forward-ledger article").length,
targetGroups: root.querySelectorAll(".group-map article.target").length,
spikeLayers: root.querySelectorAll(".group-map i.spike").length,
variants: root.querySelectorAll(".variant-grid article").length,
boundary: root.textContent.includes("K3 的训练尖峰已被定位") &&
root.textContent.includes("Figure 5(c)") &&
root.textContent.includes("训练期架构消融"),
};
root.querySelector('[data-forward-tab="trajectory"]').click();
const trajectoryInitial = {
panel: panel(),
state: text("[data-forward-trajectory-state]"),
points: root.querySelectorAll("[data-forward-trajectory-series] circle").length,
lines: root.querySelectorAll("[data-forward-trajectory-series] polyline").length,
readouts: [...root.querySelectorAll("[data-forward-trajectory-readout] article")]
.map((node) => node.textContent.replace(/\\s+/g, " ").trim()),
};
setSelect("[data-forward-trajectory-seed]", "2026073002");
root.querySelector('[data-forward-trajectory-metric="peak_normalized"]').click();
const trajectoryChanged = {
state: text("[data-forward-trajectory-state]"),
readouts: [...root.querySelectorAll("[data-forward-trajectory-readout] article")]
.map((node) => node.textContent.replace(/\\s+/g, " ").trim()),
};
root.querySelector('[data-forward-tab="gate"]').click();
const gate = {
panel: panel(),
status: text(".status-banner"),
rows: root.querySelectorAll(".gate-table tbody tr").length,
passedRows: root.querySelectorAll(".gate-table tbody td.good:last-child").length,
quality: text(".gate-layout aside"),
claims: root.querySelectorAll(".claim-pair article").length,
};
root.querySelector('[data-forward-tab="interaction"]').click();
const interactionInitial = {
panel: panel(),
state: text("[data-forward-interaction-state]"),
cells: root.querySelectorAll("[data-forward-interaction-cells] article").length,
summary: text("[data-forward-interaction-summary]"),
};
root.querySelector('[data-forward-interaction-metric="peak_normalized"]').click();
const interactionChanged = {
state: text("[data-forward-interaction-state]"),
summary: text("[data-forward-interaction-summary]"),
};
root.querySelector('[data-forward-tab="spectrum"]').click();
const spectrumInitial = {
panel: panel(),
state: text("[data-forward-spectrum-state]"),
points: root.querySelectorAll("[data-forward-spectrum-points] circle").length,
contrast: text("[data-forward-spectrum-contrast]"),
peak: text("[data-forward-spectrum-peak]"),
layer: text("[data-forward-spectrum-layer]"),
audits: root.querySelectorAll(".audit-grid article").length,
replay: root.textContent.includes("scientific exact"),
};
setSelect("[data-forward-spectrum-seed]", "2026073002");
setSelect("[data-forward-spectrum-variant]", "uniform_groups_6_7_forward");
const spectrumChanged = {
state: text("[data-forward-spectrum-state]"),
points: root.querySelectorAll("[data-forward-spectrum-points] circle").length,
contrast: text("[data-forward-spectrum-contrast]"),
peak: text("[data-forward-spectrum-peak]"),
layer: text("[data-forward-spectrum-layer]"),
};
const first = root.querySelector('[data-forward-tab="contract"]');
first.focus();
first.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowRight", bubbles: true }));
const keyboard = {
selected: root.querySelector('[data-forward-tab][aria-selected="true"]').dataset.forwardTab,
panel: panel(),
};
return {
initial, trajectoryInitial, trajectoryChanged, gate,
interactionInitial, interactionChanged, spectrumInitial, spectrumChanged, keyboard,
documentOverflow: document.documentElement.scrollWidth - document.documentElement.clientWidth,
rootOverflow: root.scrollWidth - root.clientWidth,
};
})()`);
await pause(180);
await screenshot("/tmp/llm-atlas-k3-attnres-forward-desktop.png");
await command("Emulation.setDeviceMetricsOverride", {
width: 390,
height: 844,
deviceScaleFactor: 1,
mobile: true,
});
await navigate("/k3/");
const mobile = await evaluate(`(() => {
const root = document.querySelector("[data-forward-lab]");
root.scrollIntoView({ block: "start", behavior: "instant" });
window.scrollBy(0, -64);
root.querySelector('[data-forward-tab="gate"]').click();
const table = root.querySelector(".gate-table-wrap");
const gateTableScrolls = table.scrollWidth > table.clientWidth;
root.querySelector('[data-forward-tab="spectrum"]').click();
return {
tabs: root.querySelectorAll("[data-forward-tab]").length,
visiblePanel: root.querySelector("[data-forward-panel]:not([hidden])")?.dataset.forwardPanel,
points: root.querySelectorAll("[data-forward-spectrum-points] circle").length,
audits: root.querySelectorAll(".audit-grid article").length,
gateTableScrolls,
documentOverflow: document.documentElement.scrollWidth - document.documentElement.clientWidth,
rootOverflow: root.scrollWidth - root.clientWidth,
};
})()`);
await pause(180);
await screenshot("/tmp/llm-atlas-k3-attnres-forward-mobile.png");
const failures = [];
if (desktop.initial.panel !== "contract" || desktop.initial.tabs !== 5 || desktop.initial.panels !== 5 ||
desktop.initial.ledger !== 6 || desktop.initial.targetGroups !== 2 ||
desktop.initial.spikeLayers !== 5 || desktop.initial.variants !== 4) {
failures.push("五视图、账本、group 或 selector map 结构异常");
}
if (!desktop.initial.boundary) failures.push("reduced-model / K3 / Figure 5(c) claim boundary 缺失");
if (desktop.trajectoryInitial.panel !== "trajectory" || desktop.trajectoryInitial.points !== 24 ||
desktop.trajectoryInitial.lines !== 4 || desktop.trajectoryInitial.readouts.length !== 4 ||
!desktop.trajectoryInitial.state.includes("2026073001") ||
!desktop.trajectoryInitial.readouts.some((value) => value.includes("+73.5%"))) {
failures.push("seed 1 contrast 训练轨迹异常");
}
if (!desktop.trajectoryChanged.state.includes("2026073002") ||
!desktop.trajectoryChanged.state.includes("PEAK / MEAN") ||
!desktop.trajectoryChanged.readouts.some((value) => value.includes("+62.0%"))) {
failures.push("trajectory seed / metric 切换异常");
}
if (desktop.gate.panel !== "gate" || desktop.gate.rows !== 6 || desktop.gate.passedRows !== 6 ||
desktop.gate.claims !== 2 || !desktop.gate.status.includes("ATTENUATION ESTABLISHED") ||
!desktop.gate.status.includes("6 / 6") || !desktop.gate.status.includes("4 / 4") ||
!desktop.gate.quality.includes("+0.0066")) {
failures.push("冻结主门或 BPC quality readout 异常");
}
if (desktop.interactionInitial.panel !== "interaction" || desktop.interactionInitial.cells !== 3 ||
!desktop.interactionInitial.state.includes("8,000") ||
!desktop.interactionInitial.summary.includes("-0.367") ||
!desktop.interactionChanged.state.includes("PEAK / MEAN") ||
!desktop.interactionChanged.summary.includes("-0.170")) {
failures.push("I67 描述性 residual 切换异常");
}
if (desktop.spectrumInitial.panel !== "spectrum" || desktop.spectrumInitial.points !== 32 ||
desktop.spectrumInitial.contrast !== "3.046×" || desktop.spectrumInitial.peak !== "3.219×" ||
desktop.spectrumInitial.layer !== "L21" || desktop.spectrumInitial.audits !== 5 ||
!desktop.spectrumInitial.replay) {
failures.push("reference 32 层谱或 replay 审计异常");
}
if (desktop.spectrumChanged.points !== 32 || !desktop.spectrumChanged.state.includes("2026073002") ||
!desktop.spectrumChanged.state.includes("GROUPS 6+7") ||
desktop.spectrumChanged.contrast !== "0.758×" || desktop.spectrumChanged.peak !== "1.375×" ||
desktop.spectrumChanged.layer !== "L9") {
failures.push("joint variant spectrum 切换异常");
}
if (desktop.keyboard.selected !== "trajectory" || desktop.keyboard.panel !== "trajectory") {
failures.push("键盘 tab 切换异常");
}
if (desktop.documentOverflow > 1 || mobile.documentOverflow > 1) failures.push("页面出现文档级横向溢出");
if (desktop.rootOverflow > 1 || mobile.rootOverflow > 1) failures.push("Round 08 实验室出现横向溢出");
if (mobile.tabs !== 5 || mobile.visiblePanel !== "spectrum" || mobile.points !== 32 ||
mobile.audits !== 5 || !mobile.gateTableScrolls) {
failures.push("390px 移动端布局或局部表格滚动异常");
}
if (exceptions.length) failures.push(`运行时异常:${exceptions.join(" | ")}`);
console.log(JSON.stringify({ desktop, mobile, exceptions }, null, 2));
socket.close();
if (failures.length) {
console.error(`FAIL K3 AttnRes forward-training browser\n- ${failures.join("\n- ")}`);
process.exit(1);
}
console.log("PASS K3 AttnRes forward-training browser interactions");
+106
View File
@@ -0,0 +1,106 @@
import { createHash } from "node:crypto";
import { readdirSync, readFileSync } from "node:fs";
const hash = (bytes) => createHash("sha256").update(bytes).digest("hex");
const read = (path) => {
const bytes = readFileSync(new URL(path, import.meta.url));
return { bytes, json: JSON.parse(bytes), sha256: hash(bytes) };
};
const aggregate = read("../src/data/k3-attnres-forward.json");
const compact = read("../src/data/k3-attnres-forward-compact.json");
const reproduction = read("../experiments/k3/attnres_forward/reproduction.json");
const manifest = read("../experiments/k3/attnres_forward/manifest.json");
const rawDirectory = new URL("../experiments/k3/attnres_forward/results/raw/", import.meta.url);
const failures = [];
const expect = (condition, message) => {
if (!condition) failures.push(message);
};
const close = (actual, expected, tolerance = 1e-15) =>
Math.abs(actual - expected) <= tolerance;
expect(aggregate.sha256 === "f8df928adb8a563d851bb3c1abbf40bcada33626d9177821e4341d854980a097", "aggregate physical SHA-256 changed");
expect(compact.sha256 === "664f6d6226df7c0c9aba6314d54a1cb8ae90f6922016dfa7c7a823729606f0c1", "compact physical SHA-256 changed");
expect(reproduction.sha256 === "b029c333596dd1de957efc2b42f7ebfc1d32f241c687f06021c4d08ffa27b1d0", "reproduction physical SHA-256 changed");
expect(manifest.sha256 === "49546ed5baf36bcb30885062b7c671fafe4ccff2e606624cd7dbe23717f9a712", "manifest physical SHA-256 changed");
expect(aggregate.json.canonical_sha256_without_self === "eecf05c623e473ec5eba8afa54d555d2733a0af2fc5488398f1da095206d50c8", "aggregate canonical SHA-256 changed");
expect(compact.json.canonical_sha256_without_self === "c3e672adb6879f99efccf3bd2e0fabaab1a1159225a8ddaf4f5f9ea7a002784b", "compact canonical SHA-256 changed");
expect(reproduction.json.canonical_sha256_without_self === "57346df80c0d76bd1d306d5fa213feed74ac2094237c22ebcb49f16ea16437e0", "reproduction canonical SHA-256 changed");
expect(compact.json.protocol_id === "llm-atlas-k3-attnres-forward-training-v1", "protocol identity mismatch");
expect(compact.json.status === "forward_training_attenuation_established_within_reduced_protocol", "frozen status changed");
expect(compact.json.primary_step === 8000, "primary step changed");
expect(compact.json.spike_layers_1based.join(",") === "21,22,23,24,25", "spike window changed");
expect(compact.json.thresholds.material_relative_drop === 0.2, "attenuation threshold changed");
expect(compact.json.processed_target_bytes.formal_12_cells === 786432000, "formal target bytes changed");
expect(compact.json.processed_target_bytes.primary_replay === 65536000, "replay target bytes changed");
expect(compact.json.processed_target_bytes.total === 851968000, "new target bytes changed");
expect(compact.json.aggregate_sha256 === aggregate.json.canonical_sha256_without_self, "compact→aggregate canonical link mismatch");
expect(reproduction.json.scientific_payload_sha256 === compact.json.replay.scientific_payload_sha256, "reproduction→replay hash link mismatch");
expect(reproduction.json.passed && compact.json.replay.passed, "full replay is not exact");
expect(reproduction.json.post_result_grok_review.blocking_errors === 0, "post-result audit reports a blocking error");
expect(reproduction.json.post_result_grok_review.status_confirmed, "post-result audit did not confirm status");
expect(reproduction.json.post_result_grok_review.replay_confirmed, "post-result audit did not confirm replay");
expect(compact.json.metadata_warnings.length === 0, "historical pairing metadata warning appeared");
const rawNames = readdirSync(rawDirectory).filter((name) => name.endsWith(".json")).sort();
expect(rawNames.length === 13, "raw matrix is not 12 formal + 1 replay");
const expectedRaw = [
...aggregate.json.input_files.formal.map((item) => item),
{ ...aggregate.json.input_files.replay, variant: "uniform_groups_6_7_forward", seed: 2026073001 },
];
for (const item of expectedRaw) {
const name = item.path.split("/").at(-1);
const raw = read(`../experiments/k3/attnres_forward/results/raw/${name}`);
expect(raw.sha256 === item.sha256, `${name} physical SHA-256 mismatch`);
expect(/^[0-9a-f]{64}$/.test(raw.json.canonical_sha256_without_self), `${name} canonical self-hash missing`);
expect(raw.json.forward_intervention.passed, `${name} forward audit failed`);
expect(raw.json.forward_intervention.forward_calls === 8054, `${name} forward census changed`);
expect(raw.json.target_bytes_seen === 65536000, `${name} target bytes changed`);
}
const primary = compact.json.primary;
expect(primary.material_response_passed, "primary material response failed");
expect(primary.passed_cells === 6 && primary.required_cells === 6, "primary attenuation is not 6/6");
expect(primary.cells.every((cell) => cell.relative_drop >= 0.2 && cell.passed), "a primary attenuation cell fell below 20%");
expect(primary.quality.passed && primary.quality.passed_checks === 4, "BPC quality gate is not 4/4");
expect(close(primary.quality.mean_delta_bpc, 0.0065784582165467525), "mean BPC delta changed");
expect(close(Math.min(...primary.cells.filter((cell) => cell.metric === "spike_contrast").map((cell) => cell.relative_drop)), 0.6211080443849011), "minimum contrast drop changed");
expect(close(Math.min(...primary.cells.filter((cell) => cell.metric === "peak_normalized").map((cell) => cell.relative_drop)), 0.3234439150908039), "minimum peak drop changed");
expect(Object.values(compact.json.secondary_status).every((value) => value === "secondary_material_response"), "secondary status changed");
expect(compact.json.trajectories.length === 90, "trajectory cell count changed");
expect(compact.json.final_spectra.length === 15, "final spectrum count changed");
expect(compact.json.final_spectra.every((item) => item.normalized.length === 32), "a final spectrum is not 32 layers");
expect(compact.json.interaction.cells.length === 36, "interaction cell count changed");
expect(compact.json.interaction.summaries.length === 12, "interaction summary count changed");
expect(close(
compact.json.interaction.summaries.find((item) =>
item.step === 8000 && item.metric === "spike_contrast").mean_interaction_residual,
-0.3670379672721313,
), "final contrast I67 changed");
expect(close(
compact.json.interaction.summaries.find((item) =>
item.step === 8000 && item.metric === "peak_normalized").mean_interaction_residual,
-0.17044758609080035,
), "final peak I67 changed");
if (failures.length) {
console.error(`FAIL K3 AttnRes forward-training data\n- ${failures.join("\n- ")}`);
process.exit(1);
}
console.log(JSON.stringify({
protocol: compact.json.protocol_id,
status: compact.json.status,
rawRuns: rawNames.length,
attenuation: `${primary.passed_cells}/${primary.required_cells}`,
quality: `${primary.quality.passed_checks}/${primary.quality.required_checks}`,
replayExact: compact.json.replay.passed,
bytes: compact.json.processed_target_bytes,
hashes: {
aggregate: aggregate.sha256,
compact: compact.sha256,
reproduction: reproduction.sha256,
},
}, null, 2));
console.log("PASS K3 AttnRes forward-training frozen data");
+9 -3
View File
@@ -88,6 +88,10 @@ const overview = await evaluate(`(() => ({
localPathTabs: document.querySelectorAll("[data-local-tab]").length,
localPathPanels: document.querySelectorAll("[data-local-panel]").length,
localPathVerdict: document.querySelector("#attnres-local-path")?.textContent.includes("localization 未建立"),
forwardTabs: document.querySelectorAll("[data-forward-tab]").length,
forwardPanels: document.querySelectorAll("[data-forward-panel]").length,
forwardVerdict: document.querySelector("#attnres-forward")?.textContent.includes("6 / 6 PASS") &&
document.querySelector("#attnres-forward")?.textContent.includes("reduced protocol only"),
nativeVisionCorrected: document.body.textContent.includes("MoonViT‑V2 从头训练") &&
document.body.textContent.includes("同一个 next-token prediction objective"),
staleVisionClaim: document.body.textContent.includes("先固定语言模型训练视觉组件"),
@@ -300,8 +304,9 @@ const mobile = await evaluate(`(() => {
gradientTabs: document.querySelectorAll("[data-gradient-tab]").length,
spikeTabs: document.querySelectorAll("[data-spike-tab]").length,
localPathTabs: document.querySelectorAll("[data-local-tab]").length,
forwardTabs: document.querySelectorAll("[data-forward-tab]").length,
offenders: [...document.querySelectorAll("body *")]
.filter((node) => !node.closest(".paper-chain, .spec-table-wrap, .cache-strip, .architecture-explorer, [data-k3-lab], [data-k3-artifact-lab], [data-attnres-lab], [data-gradient-lab], [data-spike-lab], [data-local-path-lab]"))
.filter((node) => !node.closest(".paper-chain, .spec-table-wrap, .cache-strip, .architecture-explorer, [data-k3-lab], [data-k3-artifact-lab], [data-attnres-lab], [data-gradient-lab], [data-spike-lab], [data-local-path-lab], [data-forward-lab]"))
.filter((node) => node.getBoundingClientRect().right > document.documentElement.clientWidth + 1)
.slice(0, 15)
.map((node) => ({
@@ -332,7 +337,7 @@ console.log(JSON.stringify(report, null, 2));
const numeric = (text) => Number.parseFloat(text.replaceAll(",", "").replace("−", "-"));
const failures = [];
if (!overview.title.includes("因果环节")) failures.push("K3 二轮标题异常");
if (overview.sections !== 36 || overview.tocLinks !== 36) failures.push("35 个编号专题加阅读链的目录结构异常");
if (overview.sections !== 37 || overview.tocLinks !== 37) failures.push("36 个编号专题加阅读链的目录结构异常");
if (overview.ledgers !== 32 || overview.reportMap !== 9) failures.push("32 张问题账或报告地图异常");
if (overview.figureAtlas !== 21 || overview.paperLinks !== 100 || overview.paperGroups < 12) failures.push("图表审计或 100 节点阅读链异常");
if (overview.labTabs !== 8 || overview.labPanels !== 8) failures.push("八联实验结构异常");
@@ -341,6 +346,7 @@ if (overview.attnresTabs !== 5 || overview.attnresPanels !== 5) failures.push("A
if (overview.gradientTabs !== 5 || overview.gradientPanels !== 5) failures.push("AttnRes 梯度定义扩展五视图异常");
if (overview.spikeTabs !== 5 || overview.spikePanels !== 5) failures.push("AttnRes 尖峰路径五视图异常");
if (overview.localPathTabs !== 5 || overview.localPathPanels !== 5 || !overview.localPathVerdict) failures.push("AttnRes 局部路径五视图或冻结判定异常");
if (overview.forwardTabs !== 5 || overview.forwardPanels !== 5 || !overview.forwardVerdict) failures.push("AttnRes 训练期前向五视图或冻结判定异常");
if (!overview.nativeVisionCorrected || overview.staleVisionClaim) failures.push("原生多模态纠错未生效或旧错误残留");
if (overview.documentOverflow > 1 || mobile.documentOverflow > 1) failures.push("桌面或移动端存在文档级横向溢出");
if (labs.memoryInitial.panel !== "memory" || numeric(labs.memoryInitial.additiveError) <= numeric(labs.memoryInitial.deltaError)) failures.push("Delta memory 初始递推异常");
@@ -365,7 +371,7 @@ if (artifacts.parameterChanged.shape !== "[96,128] F32" || !artifacts.parameterC
if (artifacts.reproductionInitial.panel !== "reproduction" || numeric(artifacts.reproductionInitial.speedup) !== 1.85 || numeric(artifacts.reproductionInitial.localMean) < 2.6 || !artifacts.reproductionInitial.exactSuite || numeric(artifacts.reproductionInitial.cv) < 2) failures.push("FlashKDA H20、本机 exact suite 或 router 初始探针异常");
if (numeric(artifacts.reproductionChanged.speedup) !== 3.27 || numeric(artifacts.reproductionChanged.flash) !== 0.7064 || numeric(artifacts.reproductionChanged.localMean) >= numeric(artifacts.reproductionInitial.localMean) || !artifacts.reproductionChanged.localMode.includes("FP32 state") || numeric(artifacts.reproductionChanged.cv) <= numeric(artifacts.reproductionInitial.cv) || numeric(artifacts.reproductionChanged.zero) <= numeric(artifacts.reproductionInitial.zero)) failures.push("GB200 benchmark、本机 varlen/state 或 synthetic router counterexample 未更新");
if (artifacts.keyboardSelected !== "tensors" || artifacts.keyboardVisible !== "tensors") failures.push("开放工件键盘 tab 导航异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 8 || mobile.artifactTabs !== 4 || mobile.artifactLayers !== 93 || mobile.attnresTabs !== 5 || mobile.gradientTabs !== 5 || mobile.spikeTabs !== 5 || mobile.localPathTabs !== 5) failures.push("移动端导航或实验异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 8 || mobile.artifactTabs !== 4 || mobile.artifactLayers !== 93 || mobile.attnresTabs !== 5 || mobile.gradientTabs !== 5 || mobile.spikeTabs !== 5 || mobile.localPathTabs !== 5 || mobile.forwardTabs !== 5) failures.push("移动端导航或实验异常");
if (mobile.offenders.length) failures.push(`移动端越界元素:${JSON.stringify(mobile.offenders)}`);
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);
+1 -1
View File
@@ -246,7 +246,7 @@ if (ocr.unreported.status !== "OUT OF EVIDENCE" || ocr.unreported.accuracy !== "
if (loop.toolsStart.state !== "OPEN" || loop.toolsEnd.state !== "VERIFIED" || loop.toolsEnd.evidence !== "97%" || loop.toolsEnd.tools !== "3") failures.push("vision-in-the-loop 终局异常");
if (loop.cotEnd.state !== "FAILED" || !loop.cotEnd.takeaway.includes("不能凭空增加")) failures.push("文字 CoT 与新观察没有分开");
if (loop.keyboardSelected !== "connector" || loop.keyboardVisible !== "connector") failures.push("实验键盘 tab 导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || papers.total !== 486 || !papers.hasFilter || papers.multimodalVisible < 59) failures.push("论文库多模态标签或总数异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (mobile.offenders.length) failures.push(`移动端越界元素:${JSON.stringify(mobile.offenders)}`);
+1 -1
View File
@@ -277,7 +277,7 @@ if (layout.navLinks !== 20 || mobile.mobileLinks !== 20 || home.navLinks !== 20)
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") {
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") {
failures.push("首页 Transformer 新章入口异常");
}
if (home.paperCount !== "486") failures.push(`首页论文总数异常:${home.paperCount}`);
+1 -1
View File
@@ -289,7 +289,7 @@ if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentO
}
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强")) failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后")) failures.push("首页 K3 首发入口异常");
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
socket.close();
+1 -1
View File
@@ -288,7 +288,7 @@ if (numeric(residual.attnres.states) !== 9 || !residual.attnres.routeExplain.inc
if (!residual.clamp.activation.includes("V4") || !residual.clamp.bound.includes("100")) failures.push("DeepSeek-V4 clamp 展示异常");
if (!residual.situ.activation.includes("KIMI") || !residual.situ.bound.includes("100")) failures.push("K3 SiTU 上界展示异常");
if (residual.keyboardSelected !== "position" || residual.keyboardVisible !== "position") failures.push("实验键盘 tab 导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || home.topicCount !== "17" || papers.total !== 486 || !papers.hasFilter || papers.visible < 30) failures.push("首页 / 论文库表示索引异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (mobile.offenders.length) failures.push(`移动端越界元素:${JSON.stringify(mobile.offenders)}`);
+1 -1
View File
@@ -273,7 +273,7 @@ if (layout.navLinks !== 20 || mobile.mobileLinks !== 20 || home.navLinks !== 20)
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") {
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") {
failures.push("首页 Transformer 新章入口异常");
}
if (home.paperCount !== "486") failures.push(`首页论文总数异常:${home.paperCount}`);
+1 -1
View File
@@ -233,7 +233,7 @@ if (layout.articleSections !== 16 || layout.paperLinks !== 37 || layout.labTabs
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强")) failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后")) failures.push("首页 K3 首发入口异常");
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
socket.close();
+1 -1
View File
@@ -236,7 +236,7 @@ if (block.family.trim() !== "Hybrid MoE" || !block.kv.includes("3 KDA : 1 Gated
if (!block.path.some((step) => step.includes("KDA × 3")) || !block.note.includes("AttnRes")) failures.push("K3 Block 路径异常");
if (block.context.trim() !== "128K" || numeric(block.mha) !== 400 || numeric(block.kda) !== 1) failures.push("KV 成本缩放异常");
if (block.keyboardSelected !== "block" || block.keyboardVisible !== "block") failures.push("实验 tab 键盘导航异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("16 个局部 mixer 单侧证据很强") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.releaseCards !== 17 || !home.firstRelease.includes("局部 uniform routing 进入完整训练后") || home.firstHref !== "/k3/") failures.push("首页 K3 首发入口异常");
if (home.paperCount !== "486" || papers.total !== 486 || papers.transformerVisible < 30) failures.push("论文库或首页论文数量异常");
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);