Exact MeSH linking splits the work into a fast wide pass and a slow careful pass. Qwen, a family of open language models, first scores the whole candidate set quickly. A Qwen reranker then reads only the strongest query-candidate pairs in detail. A gradient-boosted model, which blends many signals into one score, combines those model scores with plain rule-based evidence.
embeddingrerankinggradient-boosted modelexact identifier
Inference path: Wide retrieval before deep verification
query → tokenizer → 500 frequency candidates → Qwen embeddings → ranking model top 20 → Qwen reranker → exact MeSH identifier
| Stage | Input | Output | Job |
|---|---|---|---|
| Tokenizer | Raw query | Tokens | Preserve phrases and identifiers. |
| Retriever | Tokens | 500 IDs | Maximize recall. |
| Embedding | Query and texts | 500 similarities | Measure meaning efficiently. |
| Ranking model | All features | Top 20 | Combine evidence. |
| Reranker | Twenty pairs | Final ID | Read pairs jointly. |
Model roles: Embedding and reranking are different jobs
500 retrieved and embedded
20 pairs reranked
1 exact identifier returned
One pair: Similarity and correctness are separate questions
The query supplies clinical, financial, or regulatory language. Candidate text combines the preferred term, entry terms, scope note, and hierarchy path. Embedding asks whether both texts occupy similar semantic space. Reranking asks whether this exact pair is correct.
Training: Same records with different examples and losses
| Example | Construction | Purpose |
|---|---|---|
| Positive pair | Record text plus an assigned descriptor | Learn exact label associations |
| Hard negative | High frequency candidate not assigned to the record | Separate plausible errors |
| Source group | PubMed and ClinicalTrials retained separately | Expose source-specific evaluation |
Combining evidence: Rule-based and semantic signals meet before verification
- Lexical inputs include overlap, phrases, acronyms, and frequency rank.
- Corpus inputs include source prevalence and support.
- Structural inputs include hierarchy coordinates and branch evidence.
- Semantic inputs include base, fine-tuned, and source-aware similarities.
- The reranker score can become a final-stage feature where required.