Skip to content

Fuzzy dedup falsely merges similar-but-distinct entities (chip models, codenames with shared prefixes) #878

Closed

Description

@myf-cpu

Fuzzy dedup uses Jaro-Winkler string similarity (_MERGE_THRESHOLD = 92.0) and
incorrectly merges entities that are similar but semantically distinct.

Example cases:

Label A Label B Jaro-Winkler Result
───────── ───────── ───────────── ─────────────────
ASR1603 ASR1605 ~95.2 falsely merged
ASR1603 ASR1606 ~95.2 falsely merged
cranel cranelr ~96.3 falsely merged
cranel cranelrh ~95.2 falsely merged
cranelr cranelrh ~96.3 falsely merged

These are different chip name / hardware variants, not typos or formatting
variants. Merging them causes:

Nodes disappear from the graph (only the winner survives)
All edges are rewired to the survivor, creating false relationships
The merged entity appears connected to everything all variants were connected to
Do you have any suggestions regarding this issue?

Activity

  1. myf-cpu commented on May 15, 2026

    @myf-cpu
    Author

    Current workaround

    --dedup-skip-fuzzy KEYWORD exists and works, but has limitations:
    
    graphify extract . --dedup-skip-fuzzy 1601 --dedup-skip-fuzzy cranel
    Upon detecting these keywords, it will skip dedup
    Now this method is working, but I don't know if it will bring other problems, or if you have any other better methods

  2. added a commit that references this issue on May 15, 2026
  3. safishamsi commented on May 15, 2026

    @safishamsi
    Member

    Fixed in commit 6f8e6c5 (v0.8.5). Two new guards in dedup.py: _is_variant_pair() catches same-stem/different-suffix pairs like ASR1603/ASR1605, and _short_label_blocked() prevents Jaro-Winkler's prefix bonus from merging short labels unless they're same-length single-char typos. Both guards are gated at max(len) >= 12 so long labels still go through normal fuzzy matching. Five tests added in tests/test_dedup.py.

  4. added a commit that references this issue on Aug 13, 2026
  5. added a commit that references this issue on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions