Manuscript Offprint

arXiv:2611.09454

From LoRA to Language: Recovering Skill Documents from Adapters

Saranya Dintakurthy Swadha, Pavan C Shekar, Arpit Jain, Aswanth Krishnan

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

Abstract

Agent skills are short documents that teach a language model how to handle a class of tasks. To save context, these documents are increasingly compiled into low-rank adapters (LoRA), which keep the behaviour but lose the text: an adapter is hard to read, edit, audit or move to another model. We ask whether the skill document can be written back from the adapter and its frozen base model, and we score each recovered document by the share of the original's key instructions it states and by the tasks it solves. Reading the weights alone recovered little with the methods we tried; a learned map from weights to text passed on about one bit of the document. Running the adapter worked much better. The Executing Writer, a small writer trained on top of the adapted model, recovers 39–44% of the key instructions of held-out skills, against 1.3–1.5% with another skill's adapter, and on adapters fitted to 41 external skills its documents restore 85–91% of the original's task gain. These strongest results are on adapters whose training stored the document; adapters trained on behaviour alone are much harder for trained writers (1–2% of instructions). For these adapters we test an agent that runs the base and adapted models and writes a skill from where they differ. On ALFWorld its skills recover 58–71% of a LoRA's gain and carry over to models that cannot load the LoRA, lifting Llama-3.1-8B from 5% to 55%. Whether such a skill comes from the adapter depends on what the adapter learned: when its behaviour cannot be guessed, the adapter is the source; when it can, a reward loop without the adapter does as well.

Keywords: low-rank adaptation; adapter interpretation; agent skills; weight-space reading; instruction recovery.

1 Introduction

An agent skill is a document, usually a few hundred to a few thousand words, that tells a language model how to handle a class of requests: how to review code, which conventions to follow, how to analyse a packet capture [1, 2]. Skills are written by practitioners, shared in marketplaces and placed in the model's prompt when needed. That costs context on every call, so a growing line of work compiles a skill into a low-rank adapter (LoRA) [3], a small set of extra weights that changes the model's behaviour with no text in the prompt [4, 5, 6, 9, 10]. The adapter is cheap to apply and to serve at scale [11], but it is a block of numbers. A text skill can be read before it is trusted; a weight skill is much harder to check.

The question. We study the inverse of compilation:

Given an adapter and its frozen base model, can we write the skill document that the adapter encodes?

A recovered document would make an adapter inspectable and editable, could be re-compiled for another model, and would let a user verify an adapter before running it. Existing weight-space methods predict attributes, labels or short descriptions of adapters [12, 13, 14, 15, 16]; none of them produces a document or measures how much of one is recovered.

Why a document and not only an adapter. A skill document and a LoRA can carry the same behaviour, but they are not equally useful. A document can be read and reviewed like code, edited in one line, combined with other skills, and given unchanged to a different model or agent harness. A LoRA is tied to the weights and tokenizer of the base model it was trained on: it does not load on Llama if it was trained on Qwen, nor on a model served only through an API, and changing one rule means retraining it. Recovering the document turns a model-locked artefact back into a portable one. We therefore measure recovery in two ways: the share of the original's instructions that the recovered document states, and the share of the original's task gain that it restores.

Why it is hard. Three properties of adapters shape the methods. (i) Adapters for different skills are mostly alike: the cosine between the weight updates of two skills is 0.88, and only 11.6% of their energy is specific to the skill. (ii) Knowing which skill an adapter holds is not knowing what it says. An encoder identifies the skill from its weights for all 37 test skills, yet a learned channel from the weights to a writer passes on about one bit of the document's content. (iii) Text similarity is a weak measure, because word overlap rewards generic text. We therefore score recovered documents against frozen lists of the original's instructions, run every method with a wrong adapter as a control, and measure tasks solved wherever we can.

Our approach. The content of an adapter shows in what the network computes with it, so we let the network do the reading. We compare three readers (Figure 1, Section 4). The first treats the weights as data and learns a map from them to a prompt. The second reads the weights without running them, through the model's vocabulary and by retrieving similar instruction lines. The third, the Executing Writer, attaches the adapter to its frozen base model and trains one small writer adapter on top, so that the adapted model itself writes the document. Section 7 adds a fourth reader, which needs no training and suits adapters that never saw their document: an agent that runs the base and adapted models on real tasks and writes a skill from where they differ.

One distinction matters throughout. Adapters differ in whether the document text was ever a training target. A recitation adapter was trained to print its document, so the text is stored in it, and recovering it is extraction. A behavioural adapter was trained only on answers that the document shaped, so the text never appears in any training target, and recovering it is inference. The second case is the common one in practice. Our trained writers read the first kind well and the second poorly; for the second kind we turn to the executing agent.

References (57)