WorksComputer Science
Dynamic Shaping: Acquiring Interfaces and Constructing Execution over Frozen Pretrained Components
Abstract
We introduce Dynamic Shaping, a method for constructing executable neural arrangements through acquired response and partial-derivative interfaces over frozen pretrained components. The method learns local descriptions of available computation, ranks component rebindings using task-gradient alignment, transports the current interface across a rebinding, and retains changes through behavioral feedback. Continuous interface acquisition uses proximal policy optimization; the source coefficients remain fixed. We derive an exact identity relating transport error in component responses and partials to changes in action logits and their sensitivities. A pixels-only ViZDoom Basic study evaluates first task acquisition without a competent reference controller, demonstrations or intact response targets. Across three initializations and 100 shared held-out game seeds, initial arrangements succeed on 86/300 controller/episode pairs; joint interface-and-binding construction succeeds on 295/300. Fixed-binding interface acquisition also reaches 295/300. Each policy executes four source fragments, with 110 acquired interface values and fixed random visual and action projections. The artifact includes all candidate trials, interventions and costs; all 1,200 recorded initial/retained outcomes replay exactly. The contribution is an explicit profile, rebind, transport and retain procedure and a reproducible reference-free acquisition case over frozen pretrained computation.
Code and complete evidence: https://github.com/calysteon/shaping-gap-benchmark. Checkpoint 8, immutable revision 73971c5a31f2acbfb7ea1e8131c456964e6e1826.
Introduction
Pretraining produces numerical computation that can be used through interfaces other than its original application. The research question here is how a runtime can acquire an executable arrangement of that computation from a task requirement and experience. We study a component-level construction process: describe the effects of available frozen parts, choose how to connect them, learn the interfaces through which they act, and retain a working execution.
We call this process Dynamic Shaping. Its studied object is the acquired arrangement and interfaces. A task contract supplies observable success conditions, rather than a successful implementation. The runtime receives no per-instance human repair or hand-selected successful binding. Frozen source coefficients supply the available functions; task experience determines their stimulus, binding and interface parameters.
The mechanism has four coupled operations. First, local response and partial measurements describe the available components at states the runtime actually visits. Second, task-gradient alignment ranks proposed changes to the active bindings. Third, an affine transport changes the interface along with a binding so that it can preserve useful responses and sensitivities. Fourth, real behavioral feedback accepts or rejects the proposal. Standard policy optimization continues acquiring the continuous interfaces between these discrete construction steps.
Our contribution is the specific construction-and-transport procedure, its exact transport-error identity, and an auditable first-acquisition experiment. The procedure combines established tools: reinforcement learning, derivative supervision, local approximation and affine alignment. § 7 positions the combined method against the closest approaches. The experimental question is whether it supplies reliable behavior absent from its initial execution under the stated information and resource permissions.
We evaluate a simple pixels-only move-and-shoot task. Each initial runtime is untrained on the task and occasionally succeeds, but falls below the specified reliability contract. Acquisition receives game feedback without a competent controller to imitate. This differs from the preceding reconstruction study, which damaged a trained controller and supplied recorded intact responses [12]. The current study learns a first task implementation. Both the full construction procedure and its fixed-binding interface control meet the quality contract; the full procedure has no aggregate success advantage in this experiment. The complete results and costs accompany the mechanism.
Frozen substrate and acquired execution
Let be an inventory of callable scalar neural components with immutable materialized parameters. A policy arrangement selects distinct identifiers. Continuous interfaces determine the stimulus supplied to these components and how their responses reach a fixed consumer. A shaping procedure receives , an initial arrangement and interfaces, a behavioral contract , permitted experience, and a resource specification. It returns a retained executable arrangement, interfaces and acquisition record.
The experimental inventory has RMSNorm/SwiGLU gate/up scalar responses from the public Qwen3-0.6B-derived component bank, context 151003 [11, 13]. A fixed nine-dimensional source-coordinate compilation materializes these responses. The original transformer attention graph, scheduling, language head and native down projection are not executed by this controller. Source coefficients and source normalization arrays stay fixed. Appendix § 10 specifies the executed scalar formula.
Each observation is a RGB frame. Generic block means produce 576 numbers, standardized using unlabeled random-action observations. A random fixed projection and fixed calibration produce a row vector . Execution is
Here , , , and are acquired: 110 real values. The random action projection and its zero bias remain fixed, as do and its calibration. A four-value critic and scalar bias are auxiliary acquisition state. Initially , and . Generic diversity of native partials at zero selects the initial bindings without task-performance selection. Figure 1 separates execution from acquisition.
Figure 1. Dynamic Shaping separates fixed computational parts from acquired interfaces and bindings. Task experience drives continuous interface learning and the discrete profile–rebind–transport–retain loop. Discovery queries the inventory; policy execution uses four bound fragments.
The four-component limit is a policy execution budget. Discovery queries all 24 available components on its calibration states. Those queries, temporary arrays, profile fits and candidate evaluations are charged separately. Freezing the source does not freeze the complete policy: its interfaces are learned parameters that can change end-to-end behavior.
Response and partial interfaces for construction
Continuous acquisition
Proximal policy optimization (PPO) supplies the continuous optimizer [9]. Game rewards and generalized advantage estimates train the input/output interfaces and auxiliary critic. No target action or target hidden response is provided. Exact native partials connect the fixed functions to the acquired stimulus. For action logit , for example,
Thus the learning signal can change how observations drive existing neural responses while leaving their coefficients and the action consumer fixed. Interface acquisition is training and is included in the ledger.
Acquire an integrable local response description
Every 20 updates, take 384 evenly spaced observations from the latest rollout and recompute their current native input states . Query responses and analytic partials for all available components. Write normalized profile coordinates as the column , with each coordinate of floored at 0.03. For component , fit
where is symmetric. Values and partials therefore describe one common response function, rather than independent fitted fields. The first 256 states fit the profile and the remaining 128 check approximation error.
The implementation uses ridge-regularized polynomial/Hermite regression with both response and derivative observations, normalized per output. This is an instance of established value-and-derivative supervision [7, 8]. It yields a local description of a component’s current usable effects; the original component remains the executed function.
Fit a value-and-partial transport
For active slot and unused component , let be the current slot response, its proposed replacement, the measured current partial, and the profile partial. The algorithm fits an affine bridge by minimizing
with , and . Here averages over both states and native-input coordinates. Centering values gives the implemented closed form
These targets describe the runtime’s own current computation. They are not saved responses of a competent teacher or intact predecessor.
Rank, transport and retain
Let and . The predicted raw-logit displacement is . A policy-loss gradient proxy , computed from rollout actions and standardized advantages under the current probabilities, ranks each proposal by
The second term is a softmax-curvature penalty. This score is a proposal heuristic, not an exact PPO loss difference or a guarantee of reward gain. Appendix § 11 gives its implementation correspondence. Candidates are sorted by , followed by partial-transport error and deterministic identifiers. For each of the top three, clone the current interfaces and apply, using the old row ,
Real development episodes evaluate these transported constructions. Accept only a strict lexicographic improvement in success rate and mean return over the unmodified current policy; otherwise roll back. Acceptance resets optimizer moments. Continuous acquisition then resumes. A separate development score selects the best snapshot across the complete acquisition horizon for final retention. No terminal outcome selects any binding or interface.
Algorithm 1: Dynamic Shaping over a frozen inventory
Generate the initial arrangement and fixed visual/action projections; calibrate observations without demonstrations.
Collect a rollout from the current policy; update input/output interfaces and critic using PPO through native partials.
At a construction round, measure available responses/partials and fit local profiles using Eq. (3).
For every slot/unused component pair, fit Eq. (5), rank with Eq. (7), and construct the top three transported candidates using Eq. (8).
Evaluate candidates on development episodes. Accept the best strict success/return improvement, or retain the current execution unchanged.
Record every trial and cost. Select and seal the best development snapshot; evaluate the retained construction on fresh episodes.
Exact effect of interface transport
The transport step has a useful algebraic property independent of the profile approximation and proposal ranking. Let and denote raw action logits before Eq. (8), with all other bindings and arrays fixed. Define the actual response discrepancy at a native input as . Use an input-by-action Jacobian convention. Then
Proof. All unchanged slot contributions cancel. The changed feature contribution is instead of . Multiplication by the unchanged gives Eq. (9); differentiation with fixed , , , gives Eq. (10). Consequently,
Exact response matching preserves the policy at that input; matching partials also preserves its local logit sensitivity. Approximate matching exposes the remaining discrepancy through Eq. (12). The identity explains what the transport controls. It does not certify the fitted profile away from its measured states or guarantee improved game behavior; behavioral evaluation supplies the retention decision.
First acquisition from a task contract
Task, information and protocol
ViZDoom Basic supplies a single target at a randomized horizontal location and three actions: move left, move right and shoot [10]. Pixels are the only policy observations. Game rewards train the interfaces; game variables record outcomes but are not policy inputs. The runtime receives the action set, generic preprocessing, optimizer, construction grammar and budgets. It receives no target coordinates, object labels, scripted control rules, demonstrations, teacher actions or intact-response targets.
The behavioral contract is at least 80 successes among 100 terminal episodes. Initial arrangements can sometimes succeed; the missing behavior is reliable control. The prospective strict criterion additionally required the initial arrangement to succeed at most 30/100 times. We retain and report both conditions separately.
The no-acquisition reference is the exact initial arrangement. Two acquisition arms share its arrays, random seed and continuous optimization settings: interface acquisition keeps the initial bindings fixed, while joint construction adds the profile, rebinding and transport loop. Both are autonomous learning procedures. Matched PPO update counts do not imply matched total interactions: the joint arm uses extra development evaluations for candidate selection, charged in the ledger.
Each run performs 160 updates of 1,024 sampled action steps, six PPO epochs per update, minibatches of 128, learning rate 0.003, discount 0.99, GAE parameter 0.95, clipping 0.2 and entropy coefficient 0.01. Calibration uses 1,024 random-action observations. Construction occurs every 20 updates: eight rounds, three candidate evaluations per round, 24 trials per joint run.
Calibration game seeds start at 810000; acquisition seeds start at 820000. Twenty development seeds, 830000–830019, serve all development comparisons. All choices for a controller are sealed before its terminal evaluation by a separate process on seeds 980000–980099. Initialization/action-sampling seeds are 81, 82 and 83. The same 100 terminal game seeds are used for all controllers; totals are controller/episode pairs, not 300 different maps. Seed 81 joint is the engineering pilot. The implementation was locked after its development run and before any terminal evaluation; seeds 82/83 use it unchanged.
Held-out outcomes
Every acquired controller exceeds the 80/100 quality contract (Table 1). The strict initial-failure ceiling is met by seeds 81 and 83 but missed by seed 82, whose initial score is 33/100. The criterion is not revised after observing that result. Figure 2 shows development trajectories; all terminal claims use the sealed snapshots.
| Runtime | 81 | 82 | 83 | Total |
| Initial arrangement | 27/100 | 33/100 | 26/100 | 86/300 |
| Interface acquisition | 100/100 | 95/100 | 100/100 | 295/300 |
| Joint construction | 99/100 | 97/100 | 99/100 | 295/300 |
Table 1. Successful terminal episodes. Paired acquisition arms begin with identical initial arrays; their duplicated initial outcomes are counted once.
Figure 2. Development success during acquisition. The dashed line is the 80% contract. The horizontal axis counts continuous-acquisition game ticks; calibration and development selection work are additional, not hidden in it.
Joint construction accepts 3, 2 and 5 rebindings during the three runs. Its retained snapshots occur at updates 150, 120 and 160; their binding lists are (12, 5, 13, 4), (12, 5, 10, 17) and (21, 23, 3, 2), versus the initial (12, 5, 11, 17). Acceptance and final snapshot selection are distinct: a later accepted change need not be in the best retained snapshot.
The two acquisition arms tie in aggregate success. Thus this experiment establishes first acquisition under the stated permissions for both arms, while leaving an aggregate advantage of discrete construction unresolved. No random-weight substrate comparison or conventional game-agent performance comparison is performed. The experiment does not isolate a causal benefit of pretraining itself. Its positive result is a working executable construction over the specified frozen pretrained inventory, without a successful task reference.
Post-acquisition interventions
| Intervention | J81 | I81 | J82 | I82 | J83 | I83 |
| Retained | 99 | 100 | 97 | 95 | 99 | 100 |
| Original bindings | 71 | 100 | 97 | 95 | 24 | 100 |
| Original input interface | 24 | 19 | 40 | 34 | 17 | 24 |
| Original output interface | 36 | 97 | 82 | 66 | 7 | 95 |
| Zero native outputs | 22 | 0 | 0 | 22 | 22 | 22 |
| Zero standardized pixels | 0 | 0 | 22 | 22 | 22 | 0 |
Table 2. Successful episodes out of 100 after interventions without refitting. J denotes joint construction and I denotes fixed-binding interface acquisition.
These diagnostics were declared after the seed-81 joint terminal result and before running the interventions. They cause no further learning, selection or retention changes. Original-bindings interventions are redundant for the interface-only arm but remain recorded. Binding reversion has different effects: it reduces J81 and J83 performance while leaving J82 success unchanged. Input-interface reversion lowers every retained score. Source-output and sensory interventions expose the remaining baseline behaviors rather than assuming that every intervention must produce zero successes.
Reproducibility and verification
All 1,200 original initial/retained terminal episode records replay exactly in fresh processes. This includes 300 duplicated initial records from paired arms; the main experiment has 900 distinct initial/acquired-controller episode pairs. The 3,000 intervention episodes are recorded separately. Fixed source, projection and decoder arrays pass before/after hash checks. Centered finite differences validate the learned-interface gradients to maximum absolute error .
A complete fresh acquisition from portable code and the compiled bank reproduces every retained array, all eight binding-selection decisions and all 200 seed-81 initial/retained terminal episode records exactly. The public artifact supplies the raw data, captured runners, profiles, ranked candidates, rejections, selections, seals and manifests at a pinned Git revision [13]. Appendix § 11 maps the paper to its entry points.
Language-model assistance from OpenAI Codex supported code development, experiment orchestration, literature checks and manuscript preparation. Runtime and package versions are included in the artifact.
Acquisition and lifecycle costs
Each action repeats for four requested game ticks. Requested counts upper-bound actual elapsed ticks when a terminal action ends early. Table 3 includes discovery, continuous acquisition, profile construction, candidate evaluation and development selection. Separate ledger entries charge terminal tests, replay, interventions and fresh-acquisition verification. Source response and partial-entry counters include the queried inventory, not only selected parts. The records retain all rejected trials and all work performed after the selected snapshot.
| Run | Development ticks | Seconds | RSS MiB | Accepted/tried |
| 81/joint | 78,424 | 58.21 | 64.52 | 3/24 |
| 81/interface | 29,060 | 53.32 | 62.12 | 0/0 |
| 82/joint | 79,688 | 59.29 | 66.59 | 2/24 |
| 82/interface | 27,708 | 51.54 | 62.28 | 0/0 |
| 83/joint | 44,844 | 56.98 | 67.20 | 5/24 |
| 83/interface | 20,440 | 53.33 | 63.78 | 0/0 |
Table 3. Complete original acquisition runs, including failed candidates and acquisition after the best retained snapshot. Common additional work per row: 655,360 requested acquisition ticks and 4,096 calibration ticks.
| Arrays | Bytes |
| Fixed projection, calibration and action decoder | 41,736 |
| Pixel standardization | 9,216 |
| Compiled source inventory | 5,336 |
| Acquired input/output interfaces | 880 |
| Auxiliary critic | 40 |
| Active identifiers | 32 |
| Total | 57,240 |
Table 4. Retained raw arrays
This is deployed array storage, not a full language model or whole-process RAM. The 1,024 calibration observations temporarily occupy 4,718,592 raw bytes. Profiles, candidate archives and logs are separate discovery/evidence storage; they are not included in the deployment tally. Python peak RSS excludes the separate game-engine process. Acquisition jobs ran sequentially, with brief validation inference potentially overlapping; elapsed times describe this machine, not a controlled throughput or electricity comparison. Source pretraining and extraction are inherited costs, not assigned zero.
Relation to existing methods
Reprogramming frozen computation. Adversarial reprogramming learns an input program that makes a fixed network perform a different task [1]. Frozen Pretrained Transformers adapt language-pretrained computation to other modalities while retaining the core attention/feedforward weights [2]. Borrowed Geometry studies cross-distribution head importance and cross-modal behavior through thin interfaces over frozen text-pretrained slices [3]. These works establish that task acquisition through interfaces over existing computation is an important prior foundation. Here the acquired object additionally includes discrete bindings of callable scalar components outside the original transformer execution graph, with measured profiles guiding their replacement and interface transport.
Pathways and stitching. PathNet evolves pathways while gradient learning updates permitted weights; transfer freezes a learned path and evolves new paths [4]. Model stitching learns a simple bridge between frozen neural representations [5]. Weight Agnostic Neural Networks demonstrate structural search for task behavior while sharing a common weight value across connections [6].
Dynamic Shaping combines a local construction proposal with an explicitly transported interface, over an inventory whose source coefficients all remain fixed. Current response/partial measurements determine a candidate bridge; task-gradient alignment prioritizes candidates; feedback retains the execution/interface pair. We study this complete loop with fixed visual/action consumers and separately charged discovery work.
Derivative supervision and optimization. Sobolev training and Jacobian matching use derivative targets alongside values [7, 8]. Our quadratic profiles and transport fit use these established principles to describe available parts and align their local effects. PPO supplies continuous policy optimization [9]. The proposed contribution is the specified combination of profile acquisition, task-directed rebinding, interface transport and behavioral retention. It is not a claim of inventing the constituent calculus, gradient optimizer or frozen-feature learning paradigm.
Discussion and future work
The first-acquisition result makes a component runtime’s learning cycle externally observable: a task requirement and new experience lead to a retained execution without a successful reference implementation. The source parameters remain useful executable material throughout acquisition, while new interfaces determine how that material is driven and read. The transport identity makes one construction step mathematically explicit and separates its approximate profile prediction from the actual executed effect.
The present evidence concerns one simple control scenario, one source family and three initializations. It supplies no broad language-model improvement, smaller-versus-larger model comparison or unbounded-depth result. The 110 interface values are learned parameters, and both acquisition arms use substantial game experience. Fixed bindings already suffice for the same aggregate success here, with less selection work. A matched-information study of alternative proposal rules would isolate the incremental value of response/partial-guided construction.
The next substantive question is continuing acquisition: whether retained interfaces and construction knowledge reduce the cost of a second distinct behavior while preserving the first. That requires charging discovery, storage, execution, maintenance and failed reorganizations across the whole sequence. Further work can test richer construction grammars, source families, application contracts and deployment constraints. Sustainable deployment is a motivation for improving the return on existing computation; measured resource and energy savings require their own application studies.
Conclusion
Dynamic Shaping specifies how a runtime can acquire response/partial interfaces, propose component rebindings, transport their interfaces and retain working execution over fixed pretrained parts. Its transport step has an exact output/sensitivity identity. The supplied game-control study demonstrates first acquisition without a competent reference, with complete controls, exact replay and lifecycle accounting. This establishes a concrete method and experimental foundation for studying subsequent acquisition and reuse.
Executed scalar response and native partials
For component , the supplied compiled arrays define
are fixed source centering/scaling arrays; is the compiled symmetric normalization geometry. The source bank, including this normalization, is immutable. On the positive, unclamped branch,
The implementation clips the sigmoid exponential argument to for numerical stability. Its recorded gradient checks validate the exercised numerical regime. Native source-coordinate fidelity is inherited from the released materialization and reconstruction checks [11, 12]; the present experiment adds interface-gradient checks, immutability checks and replay.
Implementation correspondence and acquisition details
The pinned Checkpoint 8 artifact has five canonical implementation files in its code/ directory: construct.py, effects.py, substrate.py, environment.py and verify.py. In construct.py, the forward method of Construction implements Eqs. (1)–(2). The gradient and update routines implement continuous acquisition. The proposal routine implements Eqs. (5)–(7); the rebinding routine implements Eq. (8). The training entry point applies development acceptance and seals selected arrays. Terminal testing runs after that seal; verification performs no fitting.
For Eq. (7), the rollout supplies actions and advantage estimates. Advantages are standardized again on the 384 profiling states. With current post-update probabilities, define the row vector
This is the likelihood-gradient proxy used for proposals, rather than the clipped PPO gradient or an unbiased new-policy rollout estimate. The recorded rollout precedes the six continuous-optimization epochs. The score is used only to allocate candidate evaluations; the actual game feedback decides acceptance. Each round ranks slot/component proposals and evaluates three.
The quadratic profile has one constant, nine linear, nine diagonal-quadratic and 36 cross terms per component. Response labels are centered and scaled with standard deviation floored at ; partial labels use the same output scale. Response normal equations average over 256 states; derivative normal equations average over entries. Ridge applies to nonconstant coefficients. The same coefficients generate values and partials. Check-point response RMSE across the 24 joint-run profile rounds ranges approximately 0.060–0.181, and normalized-input partial RMSE 0.051–0.163. These are local approximation diagnostics, not task-success certificates or checks on independently drawn game episodes.
Development acceptance maximizes the pair (success rate, mean return), using candidate index to break ties, and requires improvement over the current pair. Across checkpoints, final snapshot selection instead maximizes success rate plus times mean return. These two rules are deliberately reported separately. All selections use the same development partition; there is no statistical guarantee that a development improvement generalizes.
The artifact’s results.json contains all six controller outcomes and per-run costs. The separate cost-ledger.json adds terminal and diagnostic work, and MANIFEST.json hashes the included files. The study distinguishes policy array bytes, source inventory, temporary calibration arrays, discovery archives and process RSS. Replaying or regenerating an acquisition is verification work, not counted as an extra independent controller seed.
References
- [1]G. F. Elsayed, I. Goodfellow and J. Sohl-Dickstein. Adversarial Reprogramming of Neural Networks. ICLR, 2019. https://arxiv.org/abs/1806.11146.
- [2]K. Lu, A. Grover, P. Abbeel and I. Mordatch. Pretrained Transformers as Universal Computation Engines. 2021. https://arxiv.org/abs/2103.05247.
- [3]A. Bektursun. Borrowed Geometry: Cross-Distribution Head-Importance Fingerprints of Frozen Pretrained Gemma 4 31B. 2026, version 2. https://arxiv.org/abs/2605.00333v2.
- [4]C. Fernando, D. Banarse, C. Blundell, Y. Zwols, D. Ha, A. A. Rusu, A. Pritzel and D. Wierstra. PathNet: Evolution Channels Gradient Descent in Super Neural Networks. 2017. https://arxiv.org/abs/1701.08734.
- [5]Y. Bansal, P. Nakkiran and B. Barak. Revisiting Model Stitching to Compare Neural Representations. NeurIPS, 2021. https://arxiv.org/abs/2106.07682.
- [6]A. Gaier and D. Ha. Weight Agnostic Neural Networks. NeurIPS, 2019. https://arxiv.org/abs/1906.04358.
- [7]W. M. Czarnecki, S. Osindero, M. Jaderberg, G. Swirszcz and R. Pascanu. Sobolev Training for Neural Networks. NeurIPS, 2017. https://arxiv.org/abs/1706.04859.
- [8]S. Srinivas and F. Fleuret. Knowledge Transfer with Jacobian Matching. ICML, 2018. https://arxiv.org/abs/1803.00443.
- [9]J. Schulman, F. Wolski, P. Dhariwal, A. Radford and O. Klimov. Proximal Policy Optimization Algorithms. 2017. https://arxiv.org/abs/1707.06347.
- [10]M. Kempka, M. Wydmuch, G. Runc, J. Toczek and W. Jaskowski. ViZDoom: A Doom-based AI Research Platform for Visual Reinforcement Learning. IEEE CIG, 2016. https://arxiv.org/abs/1605.02097.
- [11]N. Oh and P. Attie. Shaping Gap Benchmark V: Learned Component Execution Beyond the Transformer Graph. Public research artifact, 2026. https://github.com/calysteon/shaping-gap-benchmark/tree/04870c5/checkpoints/05-component-learning-cycle.
- [12]N. Oh and P. Attie. Shaping Gap Benchmark VII: Autonomous Construction and Reconstruction of Missing Capability. Public research artifact, 2026. https://github.com/calysteon/shaping-gap-benchmark/tree/ee53d4ea2bcc742ba5e7b29d7af431b0c0858bd6/checkpoints/07-autonomous-capability-construction.
- [13]N. Oh and P. Attie. Shaping Gap Benchmark, Checkpoint 8: First Acquisition of Missing Capability Without a Successful Reference. Code, protocols and complete evidence, 2026. https://github.com/calysteon/shaping-gap-benchmark/tree/73971c5a31f2acbfb7ea1e8131c456964e6e1826/checkpoints/08-contract-driven-capability-construction.

