When Your Metric Rewards Cheating当你的评估指标开始奖励作弊

How automatic quality scores rewarded flattening 3D video back into 2D, and why four parameters beat sixty-four.自动画质评分怎样把 3D 视频一步步逼回 2D,以及为什么四个参数打败了六十四维模型。

Every machine-learning project eventually hits the same tempting shortcut: find an automatic score that correlates with what humans care about, plug it into your training or selection loop, and watch the curve go down. When the metric is faithful, it feels like pure leverage. When the metric has a loophole, you can spend months teaching a model to exploit it—and celebrate every checkpoint along the way.

While working on PixelMorph—trying to make monocular-to-stereo 2D-to-3D video genuinely comfortable to watch inside XR glasses—I ran headfirst into that failure mode from three different directions. What surprised me most wasn't how easily stereo video can go wrong; it was how universal the evaluation traps turned out to be.

Why perceptual comfort breaks naive proxies

On a flat laptop monitor, a converted stereo render looks convincing as long as the silhouettes are sharp. Inside RayNeo Air XR glasses—46° diagonal, 1920×1080 per eye, roughly 40.1° horizontal field of view, with the virtual screen focused roughly six meters away—the geometry stops being abstract. Deep foreground disparity pulls your eyes to converge much closer than the screen your lenses are focused on, triggering vergence–accommodation strain. When a nearby object crosses the left or right edge of the frame while popping forward in depth, stereo disparity tells your brain the object is closer than the display while the black frame border cleanly slices it off.

Human comfort inside a headset isn't a pixel-wise reconstruction loss you can eyeball from a still frame. It is a running trade-off between depth sensation and binocular artifacts—disocclusion seams, vertical offsets, shimmer on glass reflections, and subtle jumps between temporal windows—felt across a complete clip.

The easiest way to eliminate 3D artifacts is to delete 3D

Our first instinct was the standard ML one: benchmark an established automatic stereo quality model, Apple's frame-level iSQoE, against 244 human-rated clip pairs. The result reframed the entire project.

iSQoE preferred the flatter clip in 91% of pairs and agreed with human choices 57.0% of the time—statistically indistinguishable from the trivial heuristic "always pick the flatter video" at 55.7% (source-clustered bootstrap difference +0.012, 95% CI [−0.024, +0.049]). Even more damning, when we ran a sanity check across six diagnostic clips with the left eye held fixed, completely flat 2D video—the left eye copied verbatim into the right eye—scored higher than stereo neutral on every single clip.

Once you see why that happens, it is obvious. Any genuine 3D render introduces small imperfections around newly revealed disoccluded edges and inpainted regions. Flat 2D video has zero disparity and therefore zero stereo artifacts. Earlier reward experiments hit the exact same wall: a comfort-only score rated completely flattened 2D video as "more comfortable" than roughly 62% of real stereo clips, and only routing geometry into a separate hard validity gate rejected 98% of those flattened cheats. Optimize a static quality proxy directly, and you don't learn comfortable 3D—you just teach the model the laziest possible hack, which is to collapse the world back into 2D.

When a better average hides a worse result

Even standard supervised metrics can mislead you when they average away the exact failure mode humans notice.

Early in the year, we spent months testing richer learned depth corrections—a six-dimensional controller, per-video auto-decoders over temporal depth features, a localized object-boundary refiner, and a learned residual warping branch. The boundary refiner delivered the sharpest lesson. On standard indoor depth validation, it lowered average metric depth error from 0.48 m to 0.45 m—normally the exact headline improvement you drop into a progress deck.

Then we checked actual edge localization: boundary F1 dropped from 0.61 to 0.51, and seven of eight scenes got worse. The model was smoothing global error while corrupting the crisp depth discontinuities that keep foreground subjects from tearing into the background. Meanwhile, a representation sweep across four frozen vision backbones—Depth Anything V2's internal DINOv2 features, V-JEPA 2.1, VideoPrism, and SigLIP2—showed that training temporal heads on 903 clips still couldn't reliably beat plain PCA or ten simple geometry statistics at predicting stereo response.

Those dead ends forced a cleaner, humbler architecture: freeze Depth Anything V2 and freeze the M2SVid stereo renderer completely, turn off local boundary editing, and expose just two explicit clip-level controls—a global disparity scale s across {0.6, 1.0, 1.4} and a within-scene spacing control k. Whenever two versions of a clip looked different in the headset, we knew with certainty that the difference came strictly from those parameters, not from a drifted checkpoint or hidden decoder side effect.

Audit the data and the render farm before blaming the model

When a learning pipeline behaves strangely, the reflex is to blame the loss function or swap the model head. Twice in PixelMorph, the real culprit was sitting silently inside our own data pipeline.

We started with 1,586 candidate clips across seven video sources, filtered down to 1,061 eligible clips, diversity-sampled 312 sources, and cleared 272 paired renders. Right before collecting human ratings, we audited all 544 rendered clips—and instead of only comparing left eye against right eye, we compared every generated right-eye frame directly against its own raw forward warp.

Twenty-six corrupted sources lit up immediately. In those clips, M2SVid's diffusion refiner was repainting real foreground objects inside pixels that were already valid after warping—windshield wipers, car pillars, defocused foreground subjects, flames, sparklers, and phone screens. Your left eye saw a wiper blade; your right eye saw smooth glass. Earlier left-versus-right checks had only caught six of them because normal stereo parallax masked smaller repaints.

Cryptographic provenance audits caught a second quiet leak during cloud batch rendering: 62 clips rendered on a worker whose renderer fingerprint didn't match the rest of the batch, and 28 clips whose depth maps shifted subtly under multi-worker memory pressure. Throwing all 90 away and re-rendering them was tedious, and it probably protected the study more than any model tweak.

Even building the native Full HD demonstration pipeline had its own silent trap: our first 1080p run used a 60° perspective crop of a 4K VR180 video, which looked clean on paper until we checked the angular geometry and realized only ~640 raw columns were being stretched to 1920 pixels. We threw that run out, switched to unscaled 1920×1080 monocular originals, and when one generated clip—a gorilla in tall grass—showed grass re-synthesizing between 21-frame windows, we explicitly flagged it as not recommended rather than quietly omitting it.

A clean 245-pair dataset you have personally audited against its own failure modes is worth more than ten thousand clips you only ever inspected through summary averages.

Four parameters beat sixty-four

When our 245 human forced-choice judgments came back (strictly split by source into 168 training, 31 validation, and 46 untouched test pairs so adjacent clips could never leak), the temptation was to fit a rich visual preference policy. Instead, standard unregularized Direct Preference Optimization over a 64-dimensional visual embedding scored 0.866 negative log-likelihood and 40% accuracy on the test split—substantially worse than a 0.693 coin flip.

Looking closely at the raw labels explained why high-capacity models were hallucinating signal. Across the training pairs, stronger depth won 80 of 168 pairs (48%)—almost dead even—and the four viewers genuinely leaned in different directions (from 33% to 60%). Even live personalization ran into hard math: a single forced choice between 0.6× and 1.4× carries so little Fisher information (~0.18) against a reasonable viewer prior (precision ~11) that five answers barely move the posterior uncertainty, and sixty answers only shrink the standard deviation by a third.

Across eleven preference-model variants and standard ML baselines under grouped cross-validation, the winner wasn't the cleverest neural head. It was a four-parameter level-wise Bradley–Terry model over each scene's rendered default disparity span. It posted both the lowest cross-validated loss (0.675 versus 0.693 neutral) and the lowest decision flip rate across 30 source-bootstrap refits (15%, versus 24%–53% for the other non-constant learners). Better still, you can state the entire locked policy in one sentence: deep scenes with a default disparity span above roughly 11.7 pixels get compressed to 0.6×, shallow scenes keep 1.0×, and 1.4× is never chosen. Across 76 held-out scenes, it cuts average pre-inpainting holes from 2.16% to 1.62% while keeping 17% more depth than locking every clip to 0.6×.

Benchmarking the same pipeline against TencentARC's StereoCrafter across 14 scenes reinforced a similar lesson about preserving valid signal: running the entire right eye through a video diffusion latent round-trip produced softer outputs (sharpness ratio 0.40 vs. 0.65), 2.4× higher left–right inconsistency (0.314 vs. 0.130), and nearly twice the pre-inpainting hole area (3.16% vs. 1.60%).

Treating every metric as an adversary

The hardest part of evaluation discipline isn't running the numbers—it is resisting the urge to claim more than the numbers actually prove.

In PixelMorph, that four-parameter model's cross-validated loss edge over the neutral baseline (−0.018, 95% CI [−0.048, +0.011]) still has a confidence interval that crosses zero. Our first-round labels came from four internal viewers giving one forced choice per pair, not an independent confirmation cohort. Lower hole rates and tighter disparity spans are real, measured engineering gains, not a closed-loop proof that fresh viewers will always rate the policy more comfortable in a headset.

If there is one habit I am carrying out of this project into every future system, it is treating every metric as an adversary first. Before asking how to push a number up, ask how a lazy model could cheat it, check whether a prettier average is hiding a localized failure, and inspect the raw artifacts your pipeline quietly sweeps under the rug.

做机器学习项目,迟早都会碰上同一条诱人的捷径:找一个看起来和人类感受挂钩的自动分数,塞进训练或筛选循环,然后看着曲线一路往下掉。指标靠得住的时候,这像开了倍速;指标要是藏着漏洞,你可能会花上几个月教模型钻空子,而且每出一个新检查点还挺高兴。

做 PixelMorph 时,我的目标是把普通 2D 视频转成在 XR 眼镜里真正看得舒服的 3D。结果一路下来,从三个完全不同的方向正面撞上了指标作弊的墙。最意外的不是立体视频有多容易翻车,而是这些评估坑换到别的领域居然一模一样。

为什么视觉舒适度容不下偷懒的代理指标

在普通笔记本屏幕上,只要人物边缘抠得利落,转出来的立体画面看着就很像样。可一旦戴上 RayNeo Air XR 眼镜——46° 对角视场、单眼 1920×1080、水平视场约 40.1°、虚像焦平面大概在六米外——几何立刻变成眼睛上的实感。前景视差推得太深,眼球就被迫往远近于六米的地方内聚,辐辏和焦距拧巴在一起,眼眶很快发酸;近处物体一边往前冲一边压过画面左右边,立体视差说它在屏幕前面,黑框却齐刷刷把它截断,违和感当场拉满。

头显里的舒适度,根本不是盯着静帧就能算出来的像素误差。它是在整段动态视频里,在立体纵深感和各种双目瑕疵(遮挡接缝、垂直错位、玻璃反光闪动、时间窗口切跳)之间走钢丝。

消灭 3D 瑕疵最省事的办法,就是干掉 3D

我们一开始走的是最标准的机器学习路子:拿 Apple 官方的帧级立体质量模型 iSQoE,在 244 组人类评分视频对上跑了一轮测试。结果直接把整个项目的方向扭了过来。

这 244 组里,iSQoE 有 91% 的时候挑了更扁平的那一版,和人类选择的吻合度是 57.0%。单看 57% 好像比瞎蒙强一点,可拿它跟最笨的规则「永远选更扁平的视频」(55.7%)一比,统计学上压根没差别(按源视频聚类的自助法差值 +0.012,95% 置信区间 [−0.024, +0.049])。更离谱的是我们在六段诊断视频上做了个对照:固定左眼不动,把左眼原封不动拷给右眼做成纯 2D,结果 iSQoE 在全部六段视频上都给纯 2D 打了比正常 3D 更高的分。

想明白原因其实一点不稀奇。只要是真的 3D 渲染,遮挡边缘和补全区域总会带上细微瑕疵;彻底拍扁的 2D 视差为零,立体瑕疵自然也是零。更早之前测奖励函数时也栽过同一个跟头:纯舒适度打分把彻底压扁的 2D 判得比约 62% 的真实 3D 片段「更舒服」,直到把几何有效性拆成独立的硬门槛,才拦住 98% 这种作弊。直接拿静态画质代理当优化目标,你教不出舒服的 3D,只会把模型教成最懒的投机者:把世界重新压回 2D。

更好看的平均值,往往盖着更糟的局部

就算换回常规监督指标,一旦平均值把人眼真正敏感的毛病抹平,照样会指错路。

年初那几个月,我们试了好几套更复杂的可学习深度修正:六维手工控制器、基于时序深度特征的逐视频自解码器、局部物体边界优化器,还有可学习残差扭曲分支。边界优化器给的教训最狠:在标准室内深度验证集上,它把平均度量深度误差从 0.48 m 降到了 0.45 m。平时看见这个数,早就写进周报邀功了。

可回头一查真正的边缘定位,边界 F1 反倒从 0.61 掉到了 0.51,八个场景里有七个变差。模型是在拉低全局误差的同时,把前景和背景之间原本利落的深度断点磨糊了。另一边,我们把四个冻结视觉骨干(Depth Anything V2 内部 DINOv2 特征、V-JEPA 2.1、VideoPrism、SigLIP2)拉出来横扫了一遍,结果在 903 段视频上训出来的时序头,预测立体响应时依然稳赢不了普通 PCA 或者十个简单的几何统计量。

撞完这几面墙,架构反而被迫变得干净老实:彻底冻结 Depth Anything V2 和 M2SVid 立体渲染器,关掉局部边界编辑,只留两个明明白白的片段级旋钮——全局视差缩放 s({0.6, 1.0, 1.4})和场景内深度间距 k。从此只要同一段视频在头显里看着不一样,我们就百分之百确定是这两个参数起的作用,不用再怀疑是不是权重飘了或者解码器藏了猫腻。

怀疑模型之前,先查数据和渲染节点

管线跑出怪结果时,人的第一反应总是改损失函数、换网络头。但在 PixelMorph 里,真正的祸根两次都悄悄藏在数据管线里。

我们从七个视频源收了 1,586 段候选素材,滤掉不合格的剩 1,061 段,多样性采样挑出 312 个源视频,最后跑通 272 组成对渲染。临近人工评分前,我们把全部 544 段成片逐一过了一遍审计——这回不再只拿左眼比右眼,而是把每一帧生成的右眼直接和它自己的原始前向扭曲结果比对。

26 个坏源当场现形。这些片子里,M2SVid 的扩散修复器竟然跑进「前向扭曲本来已经好好的」有效像素里,把真实前景抹掉重画了:挡风玻璃上的雨刮器没了,汽车 A 柱融进了后面的马路,虚化的前景主体糊成背景墙,火焰、仙女棒和手机屏幕凭空消失或变形。左眼看着一根雨刮,右眼看着一片光玻璃,戴进眼镜立刻犯晕。之前的左右眼对比之所以漏了大多数,正是因为正常视差把小面积擦除盖过去了。

加密溯源检查还在云端批渲染里抓出第二处静默事故:62 段视频跑在一台渲染器指纹和整批不一致的节点上,另有 28 段视频的深度图在多进程显存吃紧时悄悄漂了。把这 90 段全扔了重渲确实枯燥,但它对后续实验的保护,大概率胜过任何一轮调参。

就连搭原生 1080p 演示管线也藏着暗坑:第一批 1080p 测试取了 4K VR180 视频的 60° 透视裁切,文件头写着 1920×1080 看着挺像样,一算投影几何才发现其实只有约 640 列原像素被硬拉成了 1920。我们当场作废,换回没缩过的原生 1920×1080 单目素材;后来有段「高草丛里的大猩猩」在 21 帧窗口交界处出现草叶闪烁重绘,我们也干脆标成「不推荐」,绝不藏着掖着。

亲手按失效模式逐条查过的 245 对干净数据,比一万段只扫过汇总均值的视频值钱得多。

四个参数打败六十四维

245 组人类强迫选择标注回来后(严格按原视频切分成 168 组训练、31 组验证、46 组未碰过的测试,绝不让同源相邻片段跨集泄漏),第一直觉还是想训个丰富的视觉偏好策略。结果在 64 维视觉嵌入上跑无正则化 DPO,测试集负对数似然高达 0.866,准确率只有 40%,比 0.693 的抛硬币还惨。

翻看原始标注,很快就能明白为什么高维模型全在抓噪声。训练集 168 组里强深度赢了 80 组(48%),几乎五五开;四位观察者的口味也不一致,有人只选 33% 的强深度,有人选到 60%。连「点几下就实时个性化」也过不了数学这关:在合理的先验(精度约 11)下,一次 0.6× 对 1.4× 的二选一只提供约 0.18 的 Fisher 信息量,答五题几乎撼动不了不确定度,答满六十题标准差也才缩掉三分之一。

在分组交叉验证下把十一种偏好模型变体和常规机器学习基线全拉出来跑完,胜出的不是什么精巧神经头,而是只看「场景默认渲染视差跨度」的四参数分级 Bradley–Terry 模型。它交出了最低的交叉验证损失(0.675 对中性基线 0.693),以及 30 次按源自助重拟合里最低的决策翻转率(15%,其余非常数模型都在 24%–53% 之间)。更爽快的是,整套锁定策略一句话就能讲完:默认视差跨度超过约 11.7 像素的深场景压到 0.6×,浅场景留 1.0×,1.4× 永远不用。在 76 个留出场景上,它把补全前平均空洞从 2.16% 降到 1.62%,同时比一刀切压死 0.6× 多留住 17% 的立体深度。

把同一套管线拉去和 TencentARC 的 StereoCrafter 在 14 个场景上正面比了一轮,也印证了保住有效信号的重要性:让整帧右眼钻进视频扩散潜空间兜一圈,清晰度比值立刻掉下来(0.40 对 0.65),左右不一致高出 2.4×(0.314 对 0.130),补全前空洞面积几乎翻倍(3.16% 对 1.60%)。

先把每一个指标当成对手

评估纪律最难的从来不是算出数字,而是管住自己别替数字吹牛。

在 PixelMorph 里,那套四参数模型相对中性基线的交叉验证损失优势(−0.018,95% 置信区间 [−0.048, +0.011])依然跨着零点;首轮标注也来自四位内部观察者每对一次强迫选择,而不是独立外部验证人群。空洞变小、视差收紧是实打实的工程收益,但还不能拿来当「新观众戴上头显一定更舒服」的闭环证明。

如果说这个项目让我养成了一个会带去以后所有系统的习惯,那就是先把每个指标当成对手。在琢磨怎么把分数刷高之前,先问自己三句:偷懒的模型会怎么钻它的空子?漂亮的均值底下是不是藏着局部崩坏?还有,管线是不是正悄悄把脏东西扫进地毯下面?