Manuscript Offprint

arXiv:2611.00352

Cross-Prompt Reuse of Entity-Replacement Responses

Jinkun Chen, Xuemin Yu, Sijia Han, Vlado Keselj

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

A PREPRINT

Jinkun Chen

Dalhousie University

Halifax, Canada

jinkun.chen@dal.ca

Xuemin Yu

Dalhousie University

Halifax, Canada

xuemin.yu@dal.ca

Sijia Han

Meta

hansijia@meta.com

Vlado Keselj

Dalhousie University

Halifax, Canada

vlado@cs.dal.ca

ABSTRACT

With model weights fixed, we measure how much of an entity-replacement response transfers between English factual questions, beyond whether answers change. We add the hidden-state change from two source questions to a target question about the same entity, comparing the predicted log-probability shift between two relations' published answers, given known answer prefixes, with the measured one. Hidden reuse injects the aligned change at 50% depth before the target's remaining layers; direct reuse adds source output-score changes. With other-relation sources, hidden reuse removes 45% and 49% of no-change error on 0.5–1B Qwen and Llama. Gemma-2-2B removes 22% and passes one of three comparisons in plain text without its default beginning-of-sequence (BOS) token. A later protocol restoring it yields 58–68%, passing every comparison on three cohorts. Larger checkpoints, chat format and new entities show replication and format- or cohort-dependent failures. On small plain-format checkpoints, other-relation hidden reuse mainly reproduces the shift both relations' questions share, without reliably lowering relation-selective error. With target-relation sources, hidden reuse's post hoc advantage over direct reuse is 0.2–0.9 nats outside chat format, unconfirmed and not replacement-specific. The same relation-neutral change at both questions' entity tokens lowers relation-selective error more than random or other-replacement changes, indicating receiving-question dependence.

1 Introduction

Steering and function vectors reuse recorded activation changes across prompts (Turner et al., 2024; Panickssery et al., 2024; Todd et al., 2024). Accounts of factual recall likewise predict that mid-depth changes at an entity's tokens can be read out by another question's later layers (Geva et al., 2023; Nanda et al., 2023). A changed answer, however, does not tell us how much of the receiving question's response has been reproduced. Entity replacement makes that reference measurable: we can replace the entity in the receiving question itself, which we call the target, and compare its actual response with the transferred one. How faithfully can a response recorded in one question reproduce the response in another, and does the transfer also reproduce the part of that response specific to the relation each question asks about?

An entity-replacement response is the hidden-state or output-score change caused by replacing the named entity. We measure its reproduction in answer scores. Replacing SLIB with JDeveloper in a question about SLIB's developer shifts the log probability of JDeveloper's published developer answer, Oracle Corporation, against its programming-language answer, Java; each answer is scored as a complete string, token by token after its known preceding tokens. The question about the programming language scores the same answers in the opposite order. A shift toward Oracle Corporation in both questions is shared; a shift of each question toward its own relation's answer is relation-selective (Section 3). Overall fidelity concerns the full measured contrast change. Each prediction is compared with predicting no change and with transferring a different replacement's response. Unlike interchange studies, which swap entity representations between prompts and evaluate the resulting answers (Huang et al., 2024; Wang and Xu, 2025), this reference lets us measure what share of the target's own signed contrast change a transfer reproduces.

We compare two reuse routes that combine the same two source questions with the same similarity weights (Figure 1). Hidden reuse adds the aligned changes at 50% depth to the unedited target and continues its remaining layers; direct reuse adds source output changes. With other-relation sources, which ask the target's other relation, direct reuse imports

A PREPRINT

a Block: replacements × relations

Figure

b Two reuse routes

Figure

s∈SOs \in S_O: “What is the programming language for SLIB?” + cue + answer prefix

tt: “What is the name of SLIB’s developer?” + same cue and prefix

a→ea \to e: SLIB → JDeveloper

AT,AOA_T, A_O: {Oracle Corporation}, {Java} (published answers for ee)

c Contrast and error

cx=Mx(AT)−Mx(AO)c_x = M_x(A_T) - M_x(A_O)

answer contrast

δc=ct,e−ct,a\delta c = c_{t,e} - c_{t,a}

measured: (t,e)(t,e) vs (t,a)(t,a)

δc^=c^t,e−ct,a\widehat{\delta c} = \widehat{c}_{t,e} - c_{t,a}

predicted: c^t,ehid\widehat{c}_{t,e}^{\text{hid}} or c^t,edir\widehat{c}_{t,e}^{\text{dir}}

Eans=∣δc^−δc∣E_{\text{ans}} = |\widehat{\delta c} - \delta c|

answer error

share removed = 1 - mean Eans/mean∣δc∣E_{\text{ans}}/\text{mean} |\delta c|

mean ∣δc∣|\delta c|: zero-prediction error

each cell: 1 target, 2 sources SS

roles shown for one target tt;

each target takes the role of tt in turn

Figure 1: Response reuse; model parameters stay fixed. Both routes reuse each source’s 50%-depth change and differ in which read-out, the remaining layers, transforms it: the source’s for direct reuse, the target’s for hidden reuse. (a) The three answer comparisons, pre-specified block sign tests, ask whether hidden reuse from SOS_O has lower error than each of zero prediction, hidden reuse from SO′S'_O and direct reuse from SOS_O. In the answer studies, analyses with read-out-matched sources (ST,ST′)(S_T, S'_T) are descriptive, exploratory or post hoc except one failed pre-specified family (Section 4.1). (b) In the source and target shapes, depth increases upward; fills as in (a). The target’s read-out runs twice, with the hidden change (left) and without it (right). Δs,e\Delta_{s,e} is the source’s 50%-depth change from aa to ee, recaptured at each known answer prefix; hidden reuse aligns its token rows to target positions (Equation 2). Weights wsw_s use only unedited states. c^hid\widehat{c}^{\text{hid}}, c^dir\widehat{c}^{\text{dir}}: cc from each route’s predicted scores. The block and example (plain format, cue \nAnswer: \n; Appendix A) are from the earlier crossing cohort, not the 35-block answer cohort, chosen retrospectively for readable wording, not outcomes (Appendix B.1). (c) Mx(A)M_x(A): log probability mass of group AA’s complete answers on input xx; shares measure contrast reproduction, not answer correctness or free generation.

that relation’s read-out, the mapping from states to its answers, whereas hidden reuse lets the target’s own computation read the change out. To reproduce the relation-selective part, that computation must then supply each question’s shift toward its own relation’s answer, not merely a shift both share. Target-relation sources ask the target’s own relation, so their read-out matches; we also call them read-out-matched.

The answer to the first question is a portable but incomplete response. In the plain format, raw text without a chat template or the beginning-of-sequence (BOS) token that Llama and Gemma add by default, other-relation hidden reuse removes 38–51% of the no-change error on Qwen and Llama across the original and two fresh cohorts of new entities, with format- and cohort-dependent failures. Gemma removes –6 to 22% and passes at most one of three comparisons per cohort, but 58–69% with BOS restored, passing every comparison (Tables 1 and 2). For the second question, the relation-selective part is not reliably reproduced on the small checkpoints in the plain format: hidden reuse there mainly reproduces the shared shift, and descriptive intervals for selective-error reduction never lie wholly above zero, even where overall reproduction is substantial. On the original cohort, hidden reuse removes 49% of plain-format Llama-3.2-1B’s no-change error, yet its selective-error reduction is –11.4% (Table 2). Pooled over the three cohorts, target-relation sources narrow hidden reuse’s advantage over direct reuse from 0.55–5.05 to 0.20–0.90 nats, except for plain-format Gemma (post hoc; Table 18). Yet the same relation-neutral change, added to both questions about a replacement, lowers relation-selective error more than random or other-replacement changes in pre-specified tests, indicating that these selective effects depend on the receiving question.

Depth and construction comparisons show where, and in what form, the response remains reusable. Up to 50% depth, transferred changes at the entity tokens remove somewhat less error than the target’s own change there (Figure 2). Span-aligned addition, which aligns the changed entity tokens one to one, outperforms the best tested single-vector construction on five of six checkpoints, four under pooled correction across all 223 tests (Table 3). Replications span model scales, input formats and new entities within largely familiar relation/template families.

A PREPRINT

References (61)