|
8 | 8 |
|
9 | 9 | **NeuroGhost** is a public catalog of neuroscience vocabularies. Labs publish their [LinkML](https://linkml.io/) schema; the registry compares it to every other schema and surfaces which terms mean the same thing across projects. |
10 | 10 |
|
11 | | -**Distance score** — 0.0 = identical, 1.0 = unrelated. Computed from IRI match (60%), name embeddings (15%), and definition embeddings (25%). Adjustable live on the Concepts page. |
| 11 | +**Distance score** — 0.0 = identical, 1.0 = unrelated. Computed via the Proteus pipeline: name similarity, token Jaccard, alias overlap, definition embeddings, IRI anchor, and unit dimensional veto. Adjustable live on the Concepts page. |
12 | 12 |
|
13 | 13 | --- |
14 | 14 |
|
@@ -76,6 +76,26 @@ curl -X POST https://sensein.group/NeuroGhost/api/transform \ |
76 | 76 |
|
77 | 77 | --- |
78 | 78 |
|
| 79 | +## How alignment works |
| 80 | + |
| 81 | +Alignment runs the **Proteus pipeline** ([github.com/neurovium/Proteus](https://github.com/neurovium/Proteus)) — inlined into [`neuro_ghost/align.py`](neuro_ghost/align.py). Six stages: |
| 82 | + |
| 83 | +| Stage | Name | What it does | |
| 84 | +|-------|------|--------------| |
| 85 | +| 0 | Load | Reads every class from LadybugDB into a `MatchingProfile` (name, aliases, IRI, units, definition) | |
| 86 | +| 1 | Block + Unit veto | Generates candidate pairs across schema pairs (recall-focused). Hard-vetoes pairs whose units have known but incompatible SI dimensions (e.g. Hz vs V). This is the **only** precision filter at this stage. | |
| 87 | +| 2 | SignalVector | For each candidate pair, computes a frozen evidence bundle: name similarity, token Jaccard, alias overlap, definition cosine (sentence-transformers), unit compatibility, anchor relation (IRI match). Absent signals are `None`, never `0.0`. | |
| 88 | +| 3 | Calibrate | Weights the present signals into a confidence score. Weights: name 0.45, token Jaccard 0.35, alias overlap 0.20 (renormalized when signals are missing). Adds a 0.05 bonus for known-compatible units. Blends in definition similarity at 25% when embeddings are available. | |
| 89 | +| 4 | Predicate | Two-pathway assignment. **Anchored** (IRI evidence): can reach `skos:exactMatch`, `skos:broadMatch`, `skos:narrowMatch`. **Statistical** (no IRI anchor): caps at `skos:closeMatch`. Pairs below 0.45 confidence are dropped. | |
| 90 | +| 5 | Repair | Structural cleanup — demotes duplicate `exactMatch` claims to `closeMatch`. Never deletes edges. | |
| 91 | +| 6 | Write | Writes `ALIGNED_TO` edges in LadybugDB with `distance`, `skos_relation`, `method`, and per-signal subscores. | |
| 92 | + |
| 93 | +**Distance** is `1 − confidence`, so 0.0 = identical, 1.0 = unrelated. |
| 94 | + |
| 95 | +**Definition embeddings** use `all-MiniLM-L6-v2` and are cached in `data/embeddings.parquet` so CI doesn't recompute from scratch. |
| 96 | + |
| 97 | +--- |
| 98 | + |
79 | 99 | ## Adding a schema |
80 | 100 |
|
81 | 101 | 1. Write a LinkML `.yml` file (copy `schemas/bbqs.yml` as a template). |
|
0 commit comments