test(workers): offline linkage comparison harness — production greedy clique vs constrained HAC #1033
Loading…
Reference in a new issue
No description provided.
Delete branch "experiment/linkage-comparison"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Experiment-only module
workers/people/experiments/linkage_comparison/(+29 tests inworkers/people/tests/test_linkage_comparison.py). No production code is imported or changed — no Spec-050 contract touched, no runtime behavior change.Why
Spec 050
semisupervised-v1groups via greedy complete-linkage cliques (_grow_greedy_clique, reusable anchors); many C-clusters end up as 2-face fragments. This harness measures whether constrained standard HAC average-linkage would group better, without changing anything.Methods (shared outcome-gate code, exact production transcription)
complete-clique_semisupervised_candidates, called directlyhac-averagehac-completeThe clique transcription is asserted bit-identical to production (candidates + admitted set) on every sweep row.
Approved results (synthetic multimodal embeddings, 512-dim)
Pair recall @ threshold 0.45 (pair precision 100% in all listed cases):
Threshold 0.35 shows no advantage for any method (all identical at 27.93% here).
Hard-negative anchor ablation @ 0.35 (removing 0/2/4 anchor faces of the first hard-negative pair only, all other labels preserved): precision — production 83.33 / 80.95 / 76.27; hac-average and hac-complete identical at 100 / 91.40 / 84.91.
Limitations (explicit)
Verification
results/sweep-20261005-005100.json/report-20261005-005100.md,experiment_code_hash a7933187dc9765f1(verified against actual code by reviewer; Markdown regenerated identically)results/.gitignore— regenerate withpython3 -m experiments.linkage_comparison.run_sweep(see README; pytest env:PYTHONPATH=src)Next step (separate work)
A design proposal for a potential average-linkage integration will be prepared as a DRAFT for Spec 050 discussion — not part of this PR, and no production change is proposed or implemented here.