Skip to content

Fix: remove artificial fallback scores in surface similarity functions#30

Open
Apprentice2907 wants to merge 3 commits into
humanai-foundation:mainfrom
Apprentice2907:inflated-fallback-similarity
Open

Fix: remove artificial fallback scores in surface similarity functions#30
Apprentice2907 wants to merge 3 commits into
humanai-foundation:mainfrom
Apprentice2907:inflated-fallback-similarity

Conversation

@Apprentice2907

@Apprentice2907 Apprentice2907 commented Feb 21, 2026

Copy link
Copy Markdown

Fixes #28
Three similarity functions in surface_matcher.py were returning
artificially high fallback scores (0.85–0.95) when feature data
was missing, silently inflating overall match scores and causing
unrelated fragment pairs to pass the 0.6 similarity threshold.

Changes:

  • compute_shape_similarity: return 0.0 instead of 0.95 when eigenvalues are missing
  • compute_curvature_similarity: return 0.0 instead of max(intersection, 0.90) when histograms are empty
  • compute_boundary_similarity: return 0.0 instead of 0.85 when boundary length or compactness is missing

These three functions account for 50% of the weighted overall score,
so the bad fallbacks were directly causing false matches in the
reconstruction pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inflated fallback similarity scores cause false-positive fragment matches

1 participant