Add coauthor-corroborated topic split to predict#74
Draft
atalyaalon wants to merge 1 commit into
Draft
Conversation
Same-name authors in different fields get over-merged because their SPECTER embeddings sit close in absolute cosine, so average-linkage fuses them. This post-clustering pass splits a cluster only when a 2-means embedding split is corroborated by disjoint coauthors between the two sides. It only ever splits, never merges, so recall on already-separated clusters is unaffected. Default on, configurable via Clusterer.topic_split_* attributes. f_matsen best-cluster purity 0.49 -> 0.70 (recall held at 0.99); s2and-mini mean B3 F1 0.9487 -> 0.9463.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits over-merged same-name clusters using embedding topics gated by coauthor disjointness. See #75 for a many-way alternative that also handles clusters with >2 distinct identities (e.g. n_harel).
Motivation
Same-name authors who work in different fields — e.g. Erick Matsen IV (computational biology) vs his father Frederick Matsen III (orthopedic surgery) — get over-merged. Their papers' SPECTER embeddings sit close in absolute cosine (most academic titles are ~0.7–0.9 apart), so the pairwise model treats them as compatible and average-linkage fuses them. Enabling the SPECTER2 title-only embedding fallback makes this worse: on
f matsenit dropped best-cluster purity from 72% to 49%.The separating signal is relative — each person's papers form a tight embedding sub-cloud with a distinct centroid — but topic alone is unsafe: real single authors also span topics, and splitting on topic bimodality alone over-fragments them (s2and-mini mean B3 F1 −0.030).
Change
Post-clustering pass (
s2and/topic_split.py): a recursive 2-means split on a cluster's embeddings, accepted only when (a) the split is bimodal (silhouette ≥ 0.15) and (b) the two halves have near-disjoint coauthors. Genuine authors carry recurring coauthors across topics; distinct same-name people do not. Affiliation is not used — shared geography tokens cause false overlap. Only ever splits, never merges, so it cannot lower recall on already-separated clusters.Wired into the full-block
predict()path, default on, configurable viaClusterer.topic_split_*attributes, read throughgetattrso older pickled bundles fall back to defaults.Results (s2and-mini, clean integrated predict, OFF vs ON)
Pathological blocks (best-cluster purity, recall held at 0.99):
vs #75 (many-way)
This 2-means + silhouette gate never fires on the n_harel 268-mention blob (10+ identities → top-level silhouette 0.10 < 0.15), so it leaves many-identity over-merges alone. #75 handles them at marginally higher benchmark cost. Pick one.
Scope / notes
predict()only — notpredict_incremental.tests/test_topic_split.pyadded.