计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
conditional_nce_protocol【效率与协作】Build finite conditional NCE protocols with noise distributions, adjusted scores, and paper counterexample fixtures.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a recovery or experiment needs the conditional NCE data protocol from Ma and Collins (2018): finite inputs, finite labels, a true conditional distribution, a strictly positive noise distribution, and candidate sets containing one observed label plus K independently sampled noise labels.
Do not use this skill to optimize the ranking or binary objectives; use it to construct and validate the inputs consumed by those estimators.
p_x, a probability table over inputs.p_y_given_x, a nested probability table over labels for each input.p_noise, a strictly positive probability table over labels.K >= 1.ConditionalNCEProtocol object.bar_score(score, label) = score - log p_noise(label).bar_s(x, y; theta) = s(x, y; theta) - log p_N(y)
x, the observed label, and all negative-label tuples rather than relying on Monte Carlo.Run:
python -m pytest tests
or validate through the Distiller skill tree checker:
python /share/project/yuyang/workspace/Paper2Skills/Distiller/skills/module-to-skill/scripts/validate_skill_tree.py . --run-tests
The tests construct the paper's Section 4.3 counterexample and check normalizers, true ratios, adjusted scores, and population-event mass.
This skill intentionally handles finite, small protocols suitable for recovery and tests. It does not implement neural language-model data loading or full Penn Treebank preprocessing.