Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/693c0f4f-255c-8008-92e9-0cd44c6d6226
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: Yeah, using Delta Activations as an auxiliary task actually makes a lot of sense. === Yeah, using Delta Activations as an auxiliary task actually makes a lot of sense. And you’re right: “generate full LoRA and do direct loss on weights” is an ugly, high-dimensional target. Let me structure this as: # What’s hard about “generate LoRA and MSE on weights” # How Delta Activations can be used as an auxiliary signal # Concrete training designs # Where this helps vs where it doesn’t ==== In DnD-style LoRA generation, the core thing is: ==== : Problems: * Huge dimension: LoRA is millions of parameters. Even with tokenization, it’s a massive regression target. * Multi-modality: many different LoRAs can reach similar task performance. Forcing MSE to one specific reference LoRA is over-constraining (penalizing functionally equivalent alternatives). * Alignment mismatch: what we care about is behavior (how the model answers prompts), not exact equality of weights. So your intuition is right: “generate LoRA and just do MSE on adapter” is conceptually crude. Delta Activations δ\deltaδ give you something much smaller and more behavioral. ==== Delta Activations give, for each trained LoRA/model: ==== * A single vector δ∈Rd\delta \in \mathbb{R}^dδ∈Rd (e.g., 4k dim) * Computed as average difference in hidden states on a small probe set between base and finetuned. * That vector summarizes “how this LoRA changes the model’s behavior on generic probes.” So for each training example (a task / dataset) you have: * Condition input: prompts / dataset features / descriptions * Target 1: LoRA weights ΔW\Delta WΔW * Target 2: Delta activation δ\deltaδ You can absolutely make “predict δ\deltaδ” an auxiliary task: * Because δ\deltaδ is low-dimensional and behavior-based, * It can regularize the representation / conditioning side of the generator in a much nicer way than raw weight MSE. Key idea: : ==== Let’s sketch a few variants. ==== ===== Data for each training LoRA ttt: ===== * Prompts batch PtP_tPt (like DnD) * True LoRA weights ΔWt\Delta W_tΔWt * True Delta Activation δt\delta_tδt Model: # Condition encoder: et=E(Pt)e_t = E(P_t)et=E(Pt) (e.g., text encoder + pooling) # LoRA generator: ΔW^t=Gθ(et)\hat{\Delta W}_t = G_\theta(e_t)ΔW^t=Gθ(et) # Delta head: Option 1 (cheaper): a small learned approximator δ^t=Hϕ(ΔW^t)\hat\delta_t = H_\phi(\hat{\Delta W}_t)δ^t=Hϕ(ΔW^t) Option 2 (more faithful): actually run base+LoRA on a fixed probe set to compute δ^t\hat\delta_tδ^t. Loss: L=λweights∥ΔW^t−ΔWt∥2⏟classical DnD-style loss+λδ∥δ^t−δt∥2⏟auxiliary behavioral loss\mathcal{L} = \lambda_\text{weights} \underbrace{\|\hat{\Delta W}_t - \Delta W_t\|^2}_{\text{classical DnD-style loss}} + \lambda_\delta \underbrace{\|\hat\delta_t - \delta_t\|^2}_{\text{auxiliary behavioral loss}}L=λweightsclassical DnD-style loss∥ΔW^t−ΔWt∥2+λδauxiliary behavioral loss∥δ^t−δt∥2 What does the δ-loss do? * It pushes the generated LoRA to not only be close in parameter space, but also to induce the correct global behavior on probe prompts. * It gives an extra gradient signal that’s much lower-dim and semantically aligned, which can stabilize training especially when weight loss is noisy / multi-modal. Weak points: * If you compute δ^t\hat\delta_tδ^t via true forward passes on probes, this adds heavy cost per step. * If you approximate HϕH_\phiHϕ (LoRA → δ), you’ve added another network that might be lossy; but maybe that’s okay because δ itself is coarse. ===== To avoid directly regressing millions of weights from prompts, you can insert δ as a bottleneck: ===== Stage 1: learn a task encoder using δ * Train EψE_\psiEψ s.t. Eψ(Pt)≈δtE_\psi(P_t) \approx \delta_tEψ(Pt)≈δt. * That’s a simple regression in low dimension; way easier than full LoRA. This makes δ the “task embedding space” learned from actual finetuned behaviors. Stage 2: learn δ → LoRA map Now train a separate generator GθG_\thetaGθ to map δ to LoRA: ΔW^t=Gθ(δt)\hat{\Delta W}_t = G_\theta(\delta_t)ΔW^t=Gθ(δt) with weight-level loss: Lstage2=∥ΔW^t−ΔWt∥2\mathcal{L}_\text{stage2} = \|\hat{\Delta W}_t - \Delta W_t\|^2Lstage2=∥ΔW^t−ΔWt∥2 At inference: * New dataset ➜ prompts PnewP_{\text{new}}Pnew * Stage 1: δ^new=Eψ(Pnew)\hat\delta_{\text{new}} = E_\psi(P_{\text{new}})δ^new=Eψ(Pnew) * Stage 2: ΔW^new=Gθ(δ^new)\hat{\Delta W}_{\text{new}} = G_\theta(\hat\delta_{\text{new}})ΔW^new=Gθ(δ^new) Now δ is both: * A learned task representation (Stage 1), supervised by behavioral deltas; * The bottleneck that the LoRA generator uses (Stage 2). Pros: * You’ve decomposed a very hard mapping “prompts → millions of weights” into: - “prompts → 4k-dim δ” (reasonable), and - “δ → weights” (pure parameter-space mapping). * You can even pretrain Stage 2 using any LoRA–δ pairs you have, independent of prompts. Weaknesses: * δ is intentionally lossy. Many LoRAs can share similar δ, especially if probes are generic. So δ alone might not contain enough info to reconstruct exact LoRA. * You’re back to weight-level MSE in Stage 2; though G has an easier job because δ already encodes “what kind of task” it is. You can combine both worlds: in Stage 2, also add a δ-consistency loss: ∥Delta(ΔW^t)−δt∥2\|\text{Delta}(\hat{\Delta W}_t) - \delta_t\|^2∥Delta(ΔW^t)−δt∥2 so that even if weights aren’t exactly matching, their induced δ is. ===== A more behaviorally principled variant: ===== # Prompts PtP_tPt → embedding ete_tet # Generator G(et)=ΔW^tG(e_t) = \hat{\Delta W}_tG(et)=ΔW^t # Use two behavioral losses instead of relying heavily on raw weight MSE: - Delta loss: ∥Delta(ΔW^t)−δt∥2\|\text{Delta}(\hat{\Delta W}_t) - \delta_t\|^2∥Delta(ΔW^t)−δt∥2 (behavior on a fixed probe set) - Output distillation loss: On a small set of task-specific prompts QtQ_tQt, minimize, e.g., KL(pbase+ΔW^t(⋅∣q) ∥ pbase+ΔWt(⋅∣q))\text{KL}\big(p_{\text{base}+\hat{\Delta W}_t}(\cdot|q) \,\|\, p_{\text{base}+\Delta W_t}(\cdot|q)\big)KL(pbase+ΔW^t(⋅∣q)∥pbase+ΔWt(⋅∣q)) so that generated LoRA matches the real LoRA’s outputs. Now weight-level supervision becomes optional or just a small regularizer. Most of the signal is: * “your LoRA should behave like this known one on probes and on some task prompts”. This is much closer to what we actually want (function match), and δ is a cheap, global summarization of that behavior. Weaknesses: * Needs two model evaluations (base+true-LoRA and base+gen-LoRA) during training. Expensive but maybe ok if you restrict to small probe sets. * Still doesn’t solve the identifiability problem perfectly: lots of LoRAs can match the same δ and distillation on small Q_t but differ elsewhere. But that might be fine in practice. ==== ### ==== # Better supervision for the condition encoder - Training “prompts → δ” is a cheap, well-shaped regression problem. - δ is aligned with semantic behavior of the LoRA; so the encoder learns a meaningful task embedding, instead of overfitting to weird idiosyncrasies of weight tensors. # Regularization / robustness - A generator that matches δ (behavior on generic probes) and not just weights is less likely to cheat by pinning random parameters that happen to match the target LoRA numerically. # Easier debugging / interpretability - You can inspect δ predictions directly and see: - “Does the model think this task is close to math+code?” - “Do δ’s cluster as we expect?” That gives you a handle that raw weight MSE doesn’t. ===== 1. δ is lossy - Same complaint as before: δ depends on a small probe set; two quite different LoRAs might share near-identical δ. - As a pure training target, δ under-constrains the generator. You still need weight-level loss or output-level distillation somewhere. ===== # Cost of computing δ during training - If you rely on the true Delta-operator (base+LoRA forward passes on probes) for every gradient step, this is heavy. - You’ll probably approximate it with a small network H(ΔW)H(\Delta W)H(ΔW), but then you’re stacking approximations. # No direct effect on “no-training adaptation” - The hard part DnD solves is: from only prompts of a NEW dataset, output a useful LoRA with zero finetuning. - δ auxiliary loss helps learn a better mapping during training, but at test time, you still need the prompts → LoRA generator. You’re not replacing dataset-conditioning—just helping it. ==== : ==== I’d say: * Yes, that’s a genuinely good idea as an architectural / training improvement: - δ is a natural, low-dim behavioral target. - Auxiliary “predict δ” or “match δ” losses can stabilize training and push the generator toward behaviorally relevant solutions instead of pure weight matching. * But: - δ cannot be the only supervision if you want precise adapters. It’s too low-bandwidth and probe-dependent. - You still need some combination of: - weight-level MSE (even if downweighted), - and/or distillation on outputs for a subset of prompts. If you want to turn this into a concrete research idea, an experiment that’s not insane in scale could be: # Take a smaller LLM + a collection of LoRAs on multiple tasks. # Compute δ for each LoRA using fixed probes. # Train three LoRA generators (prompt-conditioned) with: - (a) weight-only MSE (DnD-style baseline), - (b) weight MSE + δ auxiliary loss, - (c) δ + output distillation but no weight MSE. # Evaluate on: - In-domain tasks (reproducing known LoRAs), - Cross-task generalization (unseen tasks or unseen mixtures), - Robustness when reference LoRAs are noisy or partially corrupted. My prediction: * (b) will outperform (a) in stability and maybe generalization, * (c) will be competitive on easy tasks but may underperform on hard ones → this will expose exactly how much information δ carries. If you’d like, we can sketch that experimental setup more concretely (num tasks, probe design, what exact losses to use), or even think about borrowing the compositional-theory angle: δ as slot-space, generator as fff, and asking when “δ-compositionality” implies good LoRA compositionality.
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)