SubtractLab
SubtractLab / SweepSearch

SweepSearch

single-pass semantic search. Scan the constellations, then descend into stars.

SweepSearch is the search engine of MeaningSpace. It combines QIS interference scoring with 3Gravity’s cluster structure into a single-pass retrieval process that finds the most meaningful memories, not just the nearest vectors.

Why 2 Stages?

Standard vector search operates on a flat index — every memory is equal, and the nearest one wins. But real knowledge has structure. Memories cluster around themes, projects, and domains. A search engine that understands this structure can make better decisions.

SweepSearch exploits this structure:

Stage 1 — Panorama: Rank all clusters by interference score. Each cluster’s panoramic signature is computed from the vector centroids of its members — posi centroid, nega centroid, content centroid. No pre-stored summaries needed; the panorama is calculated at search time.

Stage 2 — Descend: Drop into the top-ranked clusters and re-rank individual crystals by their own interference scores. This narrows the search space while ensuring thematic relevance.

The result: the search first identifies which domain of knowledge matters, then finds which specific memories within that domain are most meaningful.

The Interference Model

The original QIS formula (posi_sim - nega_sim) × proximity collapsed on real data — posi and nega vectors of the same crystal share topic vocabulary, so their similarities nearly cancel. SweepSearch uses a proximity-primary model that isolates the pure success/failure signal:

score = proximity + α × max(0, posi_sim − proximity) − β × max(0, nega_sim − proximity)

Only the component of posi/nega that exceeds topical proximity counts. The shared-topic component cancels against proximity, leaving only the judgment signal — success bonus or failure penalty beyond mere relevance.

Implementation

Proven on 1,400+ real crystals. KMeans clustering (24 clusters, ~60 crystals each) on DuckDB-stored 768-dimensional embeddings. The entire pipeline — clustering, embedding, scoring — runs on CPU. No GPU. No external service.

The system uses cl-nagoya/ruri-v3-310m (768 dimensions, Japanese-optimized) for embeddings, optimized for Japanese semantic search.

Relation to Other Concepts

Explore SubtractLab


Developed by Koji Okuda at SubtractLab.

© 2024–2026 Koji Okuda / SubtractLab. All rights reserved.