People searching medical or scientific collections often describe a concept rather than name it. A patient types "scratchy throat that won't go away," while the documents say "pharyngitis." Keyword search cannot connect the two, and learned rewriters that translate the query into document vocabulary tend to invent terms or substitute generic ones. This note proposes a small query rewriter with a second copy channel. Besides generating words from its vocabulary, it can copy words directly out of a handful of retrieved dictionary or ontology entries: concept names, synonyms, and definitions. Its training data needs no human labels. A dictionary definition is already a description of a rare concept written in common words, so replacing a technical term in a real document sentence with its definition yields a description-like input whose correct rewrite is the original term.
The claim is narrow and testable. It has three parts. Pointing into retrieved glosses lets a compact model emit exact, index-valid canonical terms. The attention mass the copy head places on competing entries performs concept and sense selection end to end, with no separate linker. A copy penalty applied only to canonical-term positions, rather than to the whole output, keeps that fidelity without freezing the rest of the rewrite into extraction. The decisive comparison is not against weak generators. It is against "link the query to the ontology and append the names," and against a standard sequence-to-sequence model that sees the same entries in its input but has no explicit copy gate.
What Exists and What Is Missing
Pointer-generator networks combine a vocabulary distribution with an attention-based copy distribution through a learned mixing weight $p_{gen}$. Get To The Point introduced the design for summarization. Dr. Summarize added a global penalty on generation so that medical facts are copied verbatim from dialogue. FiD-PGN showed that the copy head can reuse decoder cross-attention at a cost of 1,537 parameters on a 220M model. These papers supply the method. In all of them the copy target is the input text itself, whether a document, a dialogue, or retrieved passages. None copies from an external lexical resource. Dr. Summarize uses UMLS only to locate concept spans, not as something to copy from.
Lexical grounding work motivates the choice of definitions as the anchor. Dict-BERT appends Wiktionary definitions to rare words during encoder pre-training. It reports that defaulting to the first listed sense is a core failure, which directly constrains our design: we must present several candidate entries and let the model choose. GroC builds output embeddings from WordNet glosses and neighbors, but only for language-model perplexity, and it has no copy channel. CARD-660 reports that a subword model reaches only 0.19 Pearson on rare-word similarity, against 0.43 for a dictionary-based model. Together with Ruzzetti et al. and Zhu et al., this is evidence that definitions carry more meaning for long-tail words than spelling does.
On distant supervision, Kong et al. mine UMLS, SNOMED CT and ICD-10 synonym and is-a pairs to train an encoder for zero-shot entity retrieval. Their system only embeds; it never rewrites or generates. Query rewriters for vocabulary mismatch obtain supervision in other ways. RaFe uses reranker scores, and inherits the reranker's blind spots. Think Then Rewrite uses DeepSeek-R1 "golden rewrites" and reasoning chains. InteR runs multi-round LLM loops at inference time. None grounds the rewrite in a definition source, and none can guarantee that an emitted technical term exists in the target vocabulary. Unified Contextual Query Rewriting reports a 46.23% hallucination rate for plain BART rewriting. That figure is a concrete reason not to trust ungated generation for term-critical rewrites.
Core Mechanism
For a query $q$, a lexicon retriever returns $K$ candidate entries $e_1,\dots,e_K$ from the ontology. Each entry contains a concept name, its synonyms and its definition, and several senses of the same surface string are kept as separate entries. The decoder attends over the query tokens and the entry tokens jointly, and mixes three sources:
$$P(w) = \lambda_{gen} P_{vocab}(w) + \lambda_{q} \sum_{i \in q: x_i = w} a_i + \lambda_{e} \sum_{j \in e_{1..K}: x_j = w} a_j$$
Here $a_i$ is the reused cross-attention weight on input token $i$. The three weights $\lambda_{gen}, \lambda_q, \lambda_e$ are nonnegative, sum to one, and are predicted from the decoder state as in FiD-PGN. The share of entry attention that falls on each $e_k$ is read out as a soft choice of concept and sense.
Training uses selective gating. The distant data tells us which target tokens are canonical terms. At those positions we add a penalty $\delta\,\lambda_{gen}$, the Dr. Summarize penalty, applied only where the term is known. At all other positions generation is unpenalized, so the model remains free to drop filler words and restructure the query.
Distant Supervision Pipeline
We start with sentences from the target corpora: CORD-19-style abstracts for TREC-COVID, SciFact abstracts, and PubMed text for MedMention. In each sentence we locate mentions of ontology concepts by exact string match on canonical names. We then build three kinds of inputs. In the first, the mention is replaced by the concept's definition, a lay-like description. In the second, it is replaced by a non-canonical synonym. In the third, a parent concept's definition is used, following the hierarchical pairs of Kong et al. The input is that altered sentence, compressed to a query-length span around the mention plus a few context words. The target is a keyword-style query containing the canonical term together with retained context. To control difficulty, we filter pairs by how many content words the input shares with the target. This produces a curriculum toward zero overlap, the regime where WikiQA (Yang et al.) finds 20.3% of answers.
The known weakness is that definitions are formal, while real users write colloquially; the research file flags exactly this mismatch between knowledge bases and user language. We therefore evaluate only on genuine lay or user-written queries. The gap between results on the synthetic validation set and on real queries is itself reported as a finding.
Research Program
The rewriter is a T5-base or BART-base model of roughly 220M parameters, chosen to match FiD-PGN. The lexicon retriever combines BM25 and fuzzy n-gram matching over ontology names and definitions with a Kong-style dual encoder trained on the same knowledge-graph pairs. The rewritten query goes to two fixed downstream retrievers, BM25 and an off-the-shelf dense retriever, so that any gain is attributable to the rewrite.
The analyses cover three questions. First, does entry-level attention pick the right concept? We measure this against gold SNOMED links on COMETA. Second, how often does the model emit a technical term that does not exist in the ontology or the index? Third, how does performance fall as candidate-set recall drops? We test this by injecting distractor senses and by removing the correct entry.
Baselines
The naive reference point is the user's query sent unchanged to BM25 and to the dense retriever. Every other system must improve on this with identical downstream retrievers and identical corpora.
The most dangerous simple competitor is link-then-append expansion. The same lexicon retriever proposes the same $K$ entries. A threshold on retrieval score, tuned on the same synthetic validation set, selects concepts, and their canonical names and synonyms are appended to the query. It has no learned generation, so it is cheap and cannot hallucinate. It isolates whether the learned rewriter adds anything beyond linking. Beating it means higher Recall@10 and nDCG@10 on the full test sets, with the margin concentrated on queries whose candidate set contains several competing senses or concepts. If the margin vanishes there, the copy-head-as-linker claim fails.
The architectural ablation is a gate-less sequence-to-sequence model of the same size, trained on the same distant pairs with the same $K$ entries concatenated into its input, decoded with ordinary vocabulary generation. Pretrained transformers already copy fairly well through attention, so this is the main test of whether the explicit copy gate earns its place. A second ablation keeps the gate but removes the entry source, so the model can copy only from the query. This isolates the contribution of lexical grounding. A third replaces selective gating with a global generator penalty in the style of Dr. Summarize, and a fourth removes the penalty entirely. These two test the claim about selective penalties. All variants share the training data, the number of optimizer steps, and a fixed hyperparameter search budget.
The strongest existing methods differ by benchmark. For colloquial-to-concept resolution on COMETA's zero-shot general split, Basaldella et al. report Accuracy@1 of 0.57 with a back-off ensemble. On MedMention zero-shot, Kong et al. report R@1 of 0.32 against 0.04 for BM25. We will retrain Kong's encoder on our exact knowledge-graph pairs and use it as a direct retriever. For TREC-COVID, InteR is reported to exceed zero-shot baselines by over 10 nDCG@10 points, but no absolute value is given; we found no reported nDCG@10 for InteR on TREC-COVID in Lacuna. On KUAKE-IR, TTR claims the best results, but we found no reported per-metric number for TTR on KUAKE-IR in Lacuna. We will therefore run a RaFe-style reranker-feedback rewriter of the same size ourselves, and an LLM zero-shot rewriter, logging their inference cost. Beating Kong's encoder or the COMETA ensemble means exceeding 0.32 R@1 and 0.57 Acc@1 respectively under the reported protocols. Against the RaFe-style rewriter, success means higher nDCG@10 at equal training compute.
Why not just…?
Why not just link query phrases to the ontology and append the canonical names? This is the real threat. Its failures are the same as the linker's: wrong sense, a missing concept, or noisy appended synonyms that dilute the query. The proposal's only advantage is that concept choice is trained jointly with the rewrite on the distant objective. The ambiguous-candidate split described above decides this. If the expansion baseline ties overall and on that split, we will report that the learned rewriter is unnecessary, and that the value of the work lies in the distant data and the lexicon retriever.
Why not just fine-tune a standard T5 with the glosses in its input? Copying through attention is implicit in such models, and the gate-less ablation may come close on recall. Our expectation, which is not yet demonstrated, is that the explicit gate matters most for rare multi-token terms. The evidence behind that expectation is Hua et al.'s finding that decoders without a pointer substitute generic words for domain terms (Hua et al.), and the BART hallucination rate cited above. We will measure it as the rate of invalid technical terms, broken down by concept frequency. If no gap appears in the long tail, the gate is not justified.
Why not just train a dense retriever on the same knowledge-graph pairs and skip rewriting? Kong et al. show that this works well for linking mentions to concepts. However, document retrieval over TREC-COVID and SciFact requires a query that BM25 or an existing index can use, plus readable term-level output that can be audited. We run their encoder both as a competitor and as the source of candidate entries. A tie with it would mean rewriting buys interpretability and compatibility with existing indexes, but not accuracy.
Why not just prompt a large LLM? RaFe reports 78 hours to produce LLM judgments for 30,000 instances, against 0.67 hours with a reranker. TTR reports that a trained 1.5B rewriter beat Qwen2.5-turbo. We include a zero-shot LLM rewriter anyway, and report both its accuracy and its invalid-term rate alongside latency.
Decisive Checks
We evaluate on COMETA's zero-shot split, the MedMention zero-shot setting, TREC-COVID and SciFact from BEIR, and the lexical-gap subset of WikiQA. Metrics are Recall@1, @10 and @100, nDCG@10, MRR, the invalid-term rate, and concept-selection accuracy from entry attention. The idea survives if three things hold. It must beat link-then-append on the ambiguous subset. It must beat the gate-less model on long-tail term validity without losing recall. And selective gating must outperform both the global penalty and the no-penalty variant on nDCG@10.
The idea fails if most of the gain comes from the candidate retriever. We test this with an oracle candidate set and with candidates that exclude the correct entry. It also fails if models trained on definition-derived inputs do not transfer to real colloquial queries. We test this by comparing synthetic-to-real accuracy, and by a variant that adds COMETA-style lay synonyms to the distant pairs.
References
- Get To The Point: Summarization with Pointer-Generator Networks
- Dr. Summarize: Global Summarization of Medical Dialogue by Exploiting Local Structures
- A Copy-Augmented Generative Model for Open-Domain Question Answering
- Dict-BERT: Enhancing Language Model Pre-training with Dictionary
- Grounded Compositional Outputs for Adaptive Language Modeling
- Card-660: A Reliable Evaluation Framework for Rare Word Representation Models
- Lacking the Embedding of a Word? Look it up into a Traditional Dictionary
- Embedding Imputation with Grounded Language Information
- Zero-shot Medical Entity Retrieval without Annotation: Learning From Rich Knowledge Graph Semantics
- RaFe: Ranking Feedback Improves Query Rewriting for RAG
- Think Then Rewrite: Reasoning Enhanced Query Rewriting for Domain Specific Retrieval
- Synergistic Interplay between Search and Large Language Models for Information Retrieval
- Unified Contextual Query Rewriting
- WikiQA: A Challenge Dataset for Open-Domain Question Answering
- COMETA: A Corpus for Medical Entity Linking in the Social Media
- A Pilot Study of Domain Adaptation Effect for Neural Abstractive Summarization