Add many-way coauthor-corroborated topic split to predict#75
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; one cluster can hold many such distinct identities. This post-clustering pass over-segments each cluster's embeddings (agglomerative, cosine) and re-merges sub-groups that share at least two full-name coauthors. Genuine single authors carry recurring coauthors across their own topics and re-merge; distinct same-name people have disjoint networks and stay apart. It only ever splits within a cluster, 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.71 (recall held at 0.99); n_harel 0.03 -> 0.58 (multiple N. Harel identities separated); s2and-mini mean B3 F1 0.9487 -> 0.9458.
Collaborator
|
I tried this approach on my labeled data in some real blocks: Smallest full big-block by dry-plan pair count was
I ran Key
So on the smallest block, #75-style splitting does reduce false merges, but it gives up noticeably more recall than it gains in false-merge reduction. Topic split stats:
Outputs are in [eps_overall.tsv](scratch/topic_split_eps065_smallest_block/s_gupta_20260629_1015/eps_overall.tsv), with run log at [eps_sweep.log](scratch/topic_split_eps065_smallest_block/s_gupta_20260629_1015/eps_sweep.log). |
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.
Alternative to #74. Same goal (split over-merged same-name clusters using embedding topics gated by coauthor disjointness) but handles many identities per cluster, not just a 2-way split.
Motivation
Same-name authors who work in different fields — e.g. Erick Matsen IV (computational biology) vs his father Frederick Matsen III (orthopedic surgery), or a "N. Harel" block holding a dozen unrelated people — 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. The separating signal is relative: each person's papers form a tight embedding sub-cloud with a distinct centroid.
Change
Post-clustering pass (
s2and/topic_split.py): over-segment each cluster's embeddings with agglomerative cosine clustering (no fixed cluster count, so it adapts to however many identities are present), then re-merge sub-groups that share ≥2 full-name coauthors. Genuine single authors carry recurring coauthors across their own topics and re-merge; distinct same-name people have disjoint networks and stay apart. Full names (not initial+surname blocks) avoid common-name collisions like "j lee" spuriously gluing distinct people. Affiliation is not used — shared geography tokens cause false overlap. Only ever splits within a cluster, 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):
vs #74 (2-means + silhouette)
Many-way fixes the many-identity case (#74's 2-means silhouette gate never fires on the n_harel 268-blob) at marginally higher benchmark cost. Pick one.
Scope / notes
predict()only — notpredict_incremental.tests/test_topic_split.pyadded (6 tests).