Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 5 of 6 in this unit

Build AI Systems · SOURCE LESSON 31

Choose where a connected system learns.

Compare frozen, adapter-only, partial, and joint training while checking an existing consumer for regressions.

By the end: Trace gradients across differentiable components, compare training boundaries fairly, and test compatibility when replacing a checkpoint.

Start with the exampleJump to the experimentRead the explanation
Prerequisites and path options

Why learn this? Choose which components to retrain while protecting the other systems that depend on their outputs.

01 · TRY

Start with something concrete.

Two teammates can improve their shared result by changing how both work. But another teammate may still rely on the old agreement. Training connected models can create the same kind of coordination benefit and compatibility problem.

Try the interactive model
02 · PREDICT
Before you experiment

Joint training reduces the final task’s loss. What does that establish about an existing consumer of the encoder?

Joint training reduces the final task’s loss. What does that establish about an existing consumer of the encoder?
03 · EXPERIMENT

Change one thing. Watch what follows.

Loading this browser experiment…

04 · UNDERSTAND
READ & CONNECT

Understand what changed.

Back to the experiment

A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.

Same learning goal in both modes: Trace gradients across differentiable components, compare training boundaries fairly, and test compatibility when replacing a checkpoint.

The idea in everyday terms

When connected models make an error, you must decide which weights may change. Freezing everything preserves behavior but cannot repair a bad interface. Training only an adapter changes the connection. Training both parts can fit more freely but also disrupt other consumers.

What to watch in the experiment

Compare frozen, adapter-only, partial and joint updates from the same starting point. Inspect both the new task and the old consumer. Keep checkpoint identities and interface expectations visible when replacing a component.

What this does not establish

More trainable parameters do not automatically improve the overall system. These small linear layers isolate a coupling problem; they do not demonstrate compatibility between arbitrary pretrained models.

Open the full worked examples, calculations and limitations

This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.

Decide what is allowed to learn

Connecting models gives you a new choice: when the final output is wrong, which parameters should change? Start from a clear baseline and compare alternatives on the same task. More trainable parameters are not automatically a better design.

The lab uses a two-by-two encoder followed by a two-by-two adapter. These are small linear neural layers with hand-defined starting weights. There is no pretrained image model or hidden training service. The task is to reconstruct a position from the encoder’s representation, using actual gradient updates and separate monitoring inputs.

StrategyWhat changes hereWhat stays fixed
Frozen baselineNothingBoth matrices
Adapter onlyFour adapter weightsThe encoder
Partial tuningFour adapter weights and the encoder’s second rowThe encoder’s first row
Joint trainingAll eight weightsThe chosen data, loss, and monitoring consumer

All learning methods use the same eight varied training positions, rate 0.2, and number of update opportunities. The frozen baseline performs no updates. Updating eight parameters is more work than updating four, so this comparison controls data and steps, not total computation or wall-clock time. A larger study should report those costs separately.

Follow the gradient across a boundary

Let the encoder be E and the adapter A. The pipeline predicts A × E × input. The downstream position loss depends on both matrices. Backpropagation first computes the adapter gradient, then can propagate sensitivity through A into E.

Adapter-only training computes updates for A while holding E fixed. Partial tuning permits only selected entries of E to move. Joint training applies the chain rule throughout this differentiable pipeline. The animated trace displays the current numerical gradients and indicates which entries each strategy can update.

Optional: the encoder gradient

For input x, encoded vector z = Ex, prediction Az, and error d = Az − x, the adapter gradient is the outer product d zᵀ. Sensitivity at z is Aᵀd. The encoder gradient is (Aᵀd)xᵀ. Average both over the training batch and apply the chosen update mask. Both gradients are calculated from the same pre-update weights; the encoder must not accidentally use an already-updated adapter.

Learn the connection before changing a good specialist

With the complete encoder, both coordinates are available but rotated. Adapter-only training can learn the inverse. Joint training also solves the position task, but it can distribute the solution across both matrices. Neither matrix then has to retain its original interpretation.

The lab keeps an existing consumer that simply reads the first encoder feature. Before training it expects y for the complete encoder, or x for the encoder that discards y. This fixed reader is deliberately simple. Its separate monitoring error reveals whether a change broke the old input contract.

Joint training on the complete example can drive the new task’s error nearly to zero while increasing that existing consumer’s error. Looking only at the final position loss hides the regression. Partial tuning protects the first encoder row by design, so that particular consumer is protected here; larger networks need behavioral tests rather than assuming one frozen layer protects every old capability.

An adapter cannot invert discarded information

With the missing-y encoder, every position [x, y] becomes [x, 0]. Frozen and adapter-only methods cannot distinguish different y values with the same x. Their position loss cannot reach zero on this varied dataset.

Partial and joint tuning can restore a y-sensitive feature because the original input still contains y and those strategies may change the relevant encoder row. This is not an adapter recreating information from nothing. The learning boundary has moved upstream to a component that can still access the missing variable.

The source’s image-to-control example is analogous: an encoder trained for semantic retrieval might discard exact object position. Connecting a larger projection cannot reliably reconstruct coordinates that never reach it. You may need a different encoder output, a preserved spatial feature map, another observation, or task-specific fine-tuning.

A new checkpoint is a new interface candidate

An embedding’s width is only its shape. A new encoder checkpoint can keep the same width while rotating, scaling, or otherwise changing its learned geometry. The existing adapter may silently misinterpret the new outputs.

The lab’s synthetic replacement negates both features while preserving width. It applies this change to temporary copies, keeping the adapter fixed. Compare the resulting errors with the original pipeline. This is a controlled compatibility test, not a claim that real checkpoint changes are simple sign flips.

Version encoders, adapters, schemas, and relevant preprocessing together. Keep a reference set of meaningful behaviors and regression thresholds. Run compatibility checks before accepting a component replacement, and retain a working version for rollback. Passing type checks alone does not establish behavioral compatibility.

Some useful boundaries are not differentiable

Exact rule engines, discrete database queries, compilers, and external tools are not ordinary differentiable layers. A numerical loss does not automatically produce a useful gradient through them. A system may train predictors around such tools, imitate successful traces, use reinforcement learning, or keep those boundaries programmed. Each choice introduces assumptions and evaluation requirements.

End-to-end training is therefore an option for suitable components, not a prerequisite for building a capable modular system. Independent specialists, frozen interfaces, selected fine-tuning, and joint training can coexist.

Design a fair vision-to-control study

The source exercise compares an unchanged specialist, a learned adapter, and partial fine-tuning on one downstream task. Define the target and data split first. Start each method from the same specialist checkpoint, give each the same training examples, and choose settings using validation rather than final tests. Include the unchanged baseline and, if useful, a joint-training arm.

Report new-task error, retained specialist behavior, compatibility after replacement, trainable parameters, training resources, and inference cost. Use multiple seeds and withheld scene variations such as new positions or backgrounds. Predefine acceptable regressions and inspect failures, including cases where extra tuning provides little benefit. Equal steps alone do not make costs equal; neither does a lower new-task loss prove the whole system improved.

Start with useful independent components. Train the connections that demonstrably need improvement, and expand the training boundary only when the evidence justifies the added coupling.

05 · APPLY
Check your understanding

Which comparison gives useful evidence for partial fine-tuning versus adapter-only training?

Which comparison gives useful evidence for partial fine-tuning versus adapter-only training?
06 · CONTINUE

Take this idea with you.

Train connections when enough information already crosses the boundary. Expand training upstream when needed, and measure both downstream gains and compatibility regressions.

My Learning
Explore related topics and the topic map

How this topic connects

Explore this topic on the interactive map

Use these connections to review a foundation or choose where to go next. You can open any topic without completing the others.

What it builds on

  • Learned representation adapters

    Diagnose why two models fail to communicate even when each works on its own.

  • Backpropagation

    Trace a wrong update to its source so you can debug learning code and distinguish calculating gradients from changing weights.

  • Forgetting and replay

    Protect an existing skill while teaching a model a new one, using explicit checks for regressions.

You are hereChoose where a connected system learns

Compare frozen, adapter-only, partial, and joint training while checking an existing consumer for regressions.

What it enables

  • Evidence assistant project Apply in a project

    Apply component-level and whole-system checks to an assistant pipeline so a local improvement does not hide a downstream failure.