Skip to content

Vectorize cSIL state evaluation - #124

Merged
AP6YC merged 1 commit into
developfrom
vectorize-csil
Sep 30, 2026
Merged

AP6YC merged 1 commit into
developfrom
vectorize-csil

Conversation

@NiklasMelton

@NiklasMelton NiklasMelton commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • vectorize changed cSIL dissimilarity rows and columns
  • rebuild structural state with matrix operations
  • compute all silhouette coefficients in one reduction
  • preserve the raw-moment definition, matrix orientation, and zero-denominator behavior

Performance

Five alternating trials; median trial-average time; complete construction and computation included; OPENBLAS_NUM_THREADS=1.

Workload Batch parent → PR Batch speedup Stream parent → PR Stream speedup
10k / 2D / 10 clusters 0.816 → 0.784 ms 1.04x 575.783 → 173.323 ms 3.32x
4096 / 8D / 128 clusters 3.081 → 2.680 ms 1.15x 2655.221 → 123.771 ms 21.45x

scikit-learn's sample silhouette score is mathematically different from this centroid-based cSIL, so it is not presented as a direct timing comparison.

Validation

  • 830 passed, 140 optional-JAX skips
  • incremental and structural cSIL state matches direct sample definitions on NumPy and Numba

Issue

Closes #133

@AP6YC AP6YC self-assigned this Sep 30, 2026
@AP6YC AP6YC added the enhancement New feature or request label Sep 30, 2026
Comment thread src/cvi/modules/cSIL.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the other vectorization improvements, great work.

@AP6YC
AP6YC merged commit 4222b62 into develop Sep 30, 2026
7 checks passed
@AP6YC
AP6YC deleted the vectorize-csil branch September 30, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vectorize cSIL state evaluation

2 participants