Steerable Groundedness: Control Tokens and Tiered Graph Constraints for Drug Repurposing Hypotheses

Large language models asked to propose new uses for existing drugs fail in a peculiar way. They can often guess that a drug and a disease are related, but when forced to say how — whether a drug inhibits or activates a target, whether it should push a gene's expression up or down — they guess, and guess wrongly. Work on evaluating biomedical hypothesis generation named this the "How vs. That" gap and found that even the best models rarely exceed 60% accuracy when specifying mechanism, with smaller open models degrading further when given dense retrieved context (Toward Reliable Biomedical Hypothesis Generation). At the same time, a separate line of work showed that you can stop an LLM from inventing graph edges entirely: Graph-constrained Reasoning (GCR) builds a prefix tree — a trie — of every valid path in a knowledge graph and masks the model's token choices at each decoding step so it can only follow edges that actually exist, achieving a 100% faithful reasoning ratio where unconstrained prompting yields only 48–62% (Graph-constrained Reasoning). But this hard constraint has a known cost: if the graph is missing an edge, the model is mathematically unable to propose it, so it can never surface a genuinely new therapeutic link.

This proposal argues that the tension between these two findings is artificial, and that the missing ingredient is attribute-conditioned generation — the technique of prepending discrete control tokens to steer what a model produces, which has been proven to beat natural-language instructions for fine-grained control (A Framework for Fine-Grained Complexity Control in Health Answer Generation) but has so far only been applied to stylistic properties like reading level, never to biological mechanism. The core claim: in a generative drug repurposing model, groundedness itself can be made a controllable attribute. Entity hops should be hard-constrained by the graph trie (guaranteeing the "that"); the directional mechanism verb between two hops should be steered by discrete control tokens and verified against directional evidence (fixing the "how"); and a single explicit novelty token should be the only place where the model is permitted to leave the graph, marking that segment for post-hoc verification. Hallucination stops being an uncontrolled failure mode and becomes a dial.

Core Claim

We call the proposed system a mechanism-steered, tier-constrained hypothesis generator. Concretely, a mid-sized instruction-tuned LLM (Llama-3.1-8B class, with a 27B/70B replication following the model scales used in K-Paths) is fine-tuned on verbalized multi-hop paths from PrimeKG and Hetionet, where each training example is prefixed with discrete control tokens: mechanism class, direction (e.g., inverse of the disease's expression signature, in the spirit of transcriptomic signature inversion used for sorafenib-resistant hepatocellular carcinoma in Transcriptomics-Based Drug Repurposing), tissue context, and a groundedness tier. At inference, decoding splits into three regimes. Entity and relation tokens are masked to the graph trie, exactly as in GCR, using the released graph-constrained-reasoning codebase. Mechanism-direction tokens — the "upregulates/downregulates/antagonizes" segment that knowledge graphs typically leave unlabeled — are decoded freely but shifted by the control token's learned prior. And a designated novelty token, when emitted, suspends the trie for exactly one hop and flags that hop as ungrounded, routing it to KnowHD-style atomic-claim verification against PubMed and the graph (Toward Reliable Biomedical Hypothesis Generation).

The decoding rule is a two-regime mask. Let $x_t$ be the next token, $c$ the control-token prefix, and $V_{\text{trie}}(x_{<t})$ the set of tokens GCR's trie permits given the history. Then

$$P(x_t \mid c, x_{<t}) \propto P_\theta(x_t \mid c, x_{<t}) \cdot \begin{cases} \mathbb{1}\left[x_t \in V_{\text{trie}}(x_{<t})\right] & \text{entity/relation segments} \\ 1 & \text{direction and novelty-flagged segments.} \end{cases}$$

The novelty token is what separates this from a straightforward port of GCR to biology, and it is also what engages the sharpest unresolved contradiction in the file: Can Hallucinations Help? showed that LLM "hallucinations" about molecular structure act as useful counterfactual perturbations, lifting downstream property classification by up to 15.8% for Llama-3.1-8B — yet the same freedom in a clinical repurposing context fabricates contraindications and trials (A foundation model for clinician-centered drug repurposing). Our design takes both findings seriously: exploration is confined to one bounded, explicitly flagged slot per hop, and everything else is graph-guaranteed.

Research Program

Three things get built. First, a training corpus: multi-hop drug–disease paths extracted from PrimeKG (57,557 nodes, 670,013 edges in the filtered form used by DrugCORpath) and Hetionet, extracted with Yen's algorithm plus the relational diversity filter from K-Paths so that training paths represent distinct mechanisms rather than redundant variants. Each hop is verbalized with a directional template where the graph knows the direction, and with a masked direction token where it does not — those masked slots are precisely where control tokens must learn to fill in. Second, the decoding engine: an extension of the released GCR implementation in which the trie mask is segment-conditional and can be suspended by the novelty token. Third, the verification layer, reusing KnowHD's atomic-claim decomposition for flagged hops only, which keeps verification cost proportional to the amount of exploration rather than to the whole output.

This design deliberately inverts the architecture of LLaDR, which anchors unverified GPT-4 text into graph embeddings and thereby risks permanently baking hallucinated mechanism facts into the embedding space; we instead generate nothing unconstrained and verify the single exception. It also differs from every bridge paper in section 2 of the file. DrugCORpath uses an LLM only as a frozen feature encoder for an XGBoost ranker; K-Paths retrieves paths but passes them passively into prompts; GCR constrains decoding but has no conditioning and no escape from graph incompleteness; the phenotype-conditioned model of Phenotype-Conditioned Drug Repurposing conditions on attributes but outputs ranked drug IDs from a graph neural network, not verifiable generated chains, and its own authors warn that its cross-attention explanations track graph coverage rather than biological truth. No existing system generates text that is simultaneously graph-faithful, mechanism-steered, and explicitly gated for novelty.

Baselines

The naive reference point is an off-the-shelf instruction-tuned LLM given the same retrieved path text in its prompt, with no trie and no control tokens. GCR's ablation tells us what to expect: without structural constraints, reasoning-path faithfulness falls to roughly 48–62%, and about a third of generated paths are structurally invalid (Graph-constrained Reasoning). Any system worth building must clear this bar trivially.

The strongest existing competitor is GCR itself, adapted to PrimeKG and Hetionet using its own released code and trie-building scripts. It is the strongest because it already solves the faithfulness half of the problem perfectly (100% faithful reasoning ratio, and 4.5× faster with ~30× fewer input tokens than agent-style alternatives), so any contribution from conditioning must be measured on top of it, not instead of it. It will be run on the same graphs, the same splits, and the same base models, with the same fine-tuning budget, so the only difference is our token conditioning and novelty gate. For the predictive side, the reference number to beat is REx, which reports an MRR of 0.427 on Hetionet drug-disease recovery (against 0.402 for MINERVA and PoLo); we will evaluate our generated chains as ranked predictions under the identical split, and also run REx itself as a baseline under matched conditions. Beating the combined baseline means: matching GCR's ~100% structural faithfulness on grounded segments, exceeding GCR-adapted's mechanism-direction accuracy (which it cannot steer at all), exceeding its novelty yield (which is exactly zero by construction), and approaching or exceeding REx's 0.427 MRR. For the undiagnosed-patient regime we additionally compare against the PubCaseFinder→TxGNN cascade, which collapsed to MRR 0.103 on undiagnosable cases while the end-to-end phenotype model held 0.311 (Phenotype-Conditioned Drug Repurposing).

The key-ingredient ablation is the same fine-tuned model with the control tokens removed and their content moved into a natural-language instruction in the prompt, trie kept intact. This isolates whether discrete token conditioning — rather than the trie or the fine-tuning — is what improves direction accuracy. The health-complexity paper found control codes beat few-shot prompting by 23% MAE on reading level (A Framework for Fine-Grained Complexity Control); if the analogous gap is near zero here, the proposal's central claim fails and we will report that.

Why not just…?

Why not just retrieve the paths and put them in the prompt? This is the K-Paths recipe, and it is a real threat: it lifted Tx-Gemma 27B by 19.8 F1 points on drug-interaction severity and raised DrugBank classification from roughly 1% F1 to 30–40% (K-Paths). But the same literature documents three failures of passive prompting: the integration paradox, where added context reduces accuracy for models below roughly 70B parameters (Toward Reliable Biomedical Hypothesis Generation); path faithfulness of only 48–62% without decoding constraints (Graph-constrained Reasoning); and severe noise from uncurated retrieved paths, which DrugCORpath had to cluster-filter before paths were useful. We will settle this empirically rather than by argument: prompt-based RAG is run as a baseline at matched model scale, and scored on the same direction-accuracy and faithfulness metrics.

Why not just write the mechanism in the instruction? Because the one paper that directly compared the two found discrete control codes substantially more precise than instructions — 23% lower MAE than few-shot prompting and roughly 50% lower than the unconditioned baseline, with a 0.84 correlation between requested and delivered attribute levels (A Framework for Fine-Grained Complexity Control) — and because prepended tokens act as persistent attention anchors across a long generation, while instructions buried in a prompt are subject to attention decay (MuseCoco). CtrlProt adds that instruction tuning alone failed to keep multiple biological attributes satisfied jointly, which matters here since efficacy, safety, and direction compete. Honesty requires noting that all of this evidence comes from readability and protein design, not drug repurposing; that is exactly why the instruction ablation above is a first-class experiment rather than an afterthought.

Why not just generate freely and verify afterwards? KnowHD's Best-of-N filtering already lifts GPT-4o-mini from 60% to about 73% accuracy on chemical–gene relations (Toward Reliable Biomedical Hypothesis Generation), so post-hoc verification demonstrably works. It is nonetheless wasteful — GCR showed constrained decoding is ~4.5× faster and uses ~30× fewer tokens than iterative verification loops — and it arrives too late: once a hallucinated token enters the context, all subsequent steps condition on it as fact (Interpretability of Process Reward Models). We do not treat verification as a competitor but as a complement: it is retained, cheaply, for the one slot where generation must be free. If the experiments show that pure Best-of-N matches our direction accuracy at acceptable cost, we will say so and the contribution narrows to the controllability result.

Proposed Experiments and Decisive Checks

The evaluation runs on four axes over PrimeKG, Hetionet, and a TruthHypo-style temporal benchmark (pre-2023 literature as context, later discoveries as ground truth). Structural faithfulness is the fraction of generated edges present in the graph, with GCR's 100% as the target and its 48–62% unconstrained figure as the floor. Mechanism-direction accuracy is scored on held-out relations with known direction, against the reference points that only GPT-4o exceeded 60% raw accuracy and Best-of-N verification reached ~73% on chemical–gene relations (Toward Reliable Biomedical Hypothesis Generation). Predictive quality is MRR on held-out drug–disease pairs, with REx's 0.427 on Hetionet as the number to approach. Novelty yield is the decisive check for the escape hatch: the fraction of trie-escaping, flagged hops that are later validated in the temporal holdout. GCR-adapted scores exactly zero here by construction, so any reliably validated nonzero yield — at a bounded rate of false flagged claims — demonstrates something no existing system can do; conversely, if flagged hops are almost never validated, the "Can Hallucinations Help?" benefit does not transfer from molecular property prediction to network repurposing (Can Hallucinations Help?), which would itself be a publishable negative result.

Finally, the controllability experiment: sweep the groundedness-tier token from strict to exploratory and plot the resulting faithfulness/novelty curve. If the tradeoff traces a monotone, predictable frontier — the analogue of the 0.84 attribute-tracking correlation in the health-complexity work — then groundedness has been demonstrated to be a steerable attribute, which is the claim this proposal exists to test.