1 00:00:01,000 --> 00:00:09,300 [Hal Turing] Alrighty! Thanks for tuning in! Hello AI world! I am your host, Hal Turing, and my co-host is Dr. Ada Shannon. 2 00:00:09,300 --> 00:00:35,150 [Hal Turing] Today's paper is "HyperTuning: Toward Adapting Large Language Models without Back-propagation," from ICML 2023. The first author is Jason Phang, with Yi Mao, Pengcheng He and Weizhu Chen. The affiliations are New York University, EleutherAI, and Microsoft Azure AI. The title makes a big promise: adapt a big model to a new task with no back-propagation. We're going to test that promise. 3 00:00:35,150 --> 00:00:53,500 [Dr. Ada Shannon] The stakes are simple. If you could hand a model sixteen examples of a new task and get a working specialized model back in one forward pass, you would skip the per-task training run. The paper does get something like that. But the cost doesn't vanish, it moves. Where it moves to is what we should track. 4 00:00:53,500 --> 00:00:59,575 [Hal Turing] Start with the problem. Why is adapting a model per task or per user expensive? 5 00:00:59,575 --> 00:01:19,600 [Dr. Ada Shannon] Full fine-tuning updates every weight, so you need gradients and optimizer state for the whole model, and you store a full copy per task. Parameter-efficient fine-tuning, or PEFT, shrinks that. You freeze the big model and train a tiny set of added parameters: adapters, prompt tuning, prefix tuning, LoRA. Storage and optimizer memory drop a lot. 6 00:01:19,600 --> 00:01:22,475 [Hal Turing] So what's left to complain about? 7 00:01:22,475 --> 00:01:38,425 [Dr. Ada Shannon] The training pass itself. The paper notes that even with PEFT, the gradient has to flow backward through the entire frozen model to reach those few parameters. You still pay for a full backward pass. That's the cost the authors say they want to avoid. 8 00:01:38,425 --> 00:01:41,350 [Hal Turing] And their move is a hypernetwork? 9 00:01:41,350 --> 00:02:02,550 [Dr. Ada Shannon] Yes, a network whose output is the weights of another network. David Ha, Andrew Dai and Quoc Le, then at Google Brain, proposed the idea in 2017. Here the hypermodel is called HyperT5. It's a T5 that reads up to sixteen input-output examples from a new task and emits a small set of parameters. A separate frozen T5, the downstream model, uses them. 10 00:02:02,550 --> 00:02:06,375 [Hal Turing] Give me the data flow with a concrete example. 11 00:02:06,375 --> 00:02:27,725 [Dr. Ada Shannon] Say the task is classifying movie reviews as positive or negative. You feed sixteen labeled reviews to the hypermodel's encoder only. It outputs, say, prefix parameters. Then for any new review, the downstream model sees just that review plus the generated parameters, and answers. It never sees the sixteen examples. You compute the parameters once and reuse them for every query. 12 00:02:27,725 --> 00:02:31,750 [Hal Turing] Two output types, prefix and LoRA. What are they? 13 00:02:31,750 --> 00:02:53,900 [Dr. Ada Shannon] Prefix tuning prepends learned key and value vectors inside every attention layer, so the model attends to extra virtual tokens that carry task information. LoRA, low-rank adaptation, leaves a weight matrix alone and adds the product of two thin matrices to it. In this paper that's applied to the query and value projections. So the hypermodel has to output either those key-value vectors or the entries of the thin matrices. 14 00:02:53,900 --> 00:03:02,400 [Hal Turing] Why would anyone expect a network to produce those from a handful of examples? That sounds like asking it to guess weights. 15 00:03:02,400 --> 00:03:22,475 [Dr. Ada Shannon] The authors argue from two premises. First, large models already learn in context from a few examples, so the examples contain enough signal to define the task. Second, adapting a model takes a small change, small enough that another model could plausibly generate it. Neither premise proves it works, but together they make the attempt reasonable. 16 00:03:22,475 --> 00:03:30,800 [Hal Turing] That brings up a distinction I want to keep straight. There's using the hypermodel on a new task, and there's training the hypermodel. 17 00:03:30,800 --> 00:03:48,000 [Dr. Ada Shannon] That distinction structures the whole episode. At use time, adaptation is one forward pass of the hypermodel. The parameters get reused across queries and you don't have to keep the examples around. Training the hypermodel is a separate matter, and we'll come back to what it costs. 18 00:03:48,000 --> 00:03:53,175 [Hal Turing] Is anyone else doing this kind of thing? I assume it didn't come from nowhere. 19 00:03:53,175 --> 00:04:29,675 [Dr. Ada Shannon] There's a line of shared-hypernetwork work for multi-task adapters. Karimi Mahabadi and colleagues, and He and colleagues, generate adapter or prompt parameters conditioned on the task. Deb, Zheng and Awadallah, in 2022, trained a hypernetwork with MAML-style meta-learning on Super-NaturalInstructions, a benchmark of more than a thousand task descriptions. And HINT, from Hamish Ivison and colleagues at the Allen Institute in 2022, turns instructions into prefixes or adapters. We'll hold the detailed comparison for later, because it matters most when we judge the paper's design choices. 20 00:04:29,675 --> 00:04:40,324 [Hal Turing] One more piece of background. The paper trains on many tasks so it generalizes to unseen ones. That's the same idea as T0 and FLAN, right? 21 00:04:40,324 --> 00:05:00,199 [Dr. Ada Shannon] Same spirit, one level up. T0, from Sanh and colleagues, and FLAN, from Wei and colleagues at Google, fine-tune one model on a mixture of many prompted tasks, and it then handles tasks it never saw. Here the trained object is a model that outputs weights. Each training example is effectively a whole task. We'll cover the exact recipe next. 22 00:05:00,199 --> 00:05:02,949 [Hal Turing] So what should listeners watch for? 23 00:05:02,949 --> 00:05:23,699 [Dr. Ada Shannon] Three claims. HyperT5 roughly matches a fully fine-tuned T5 on held-out tasks. It beats ordinary PEFT baselines that use a single shared parameter set. And its output works as a starting point for normal PEFT. Two skeptical questions go with those. Where did the cost go? And is the headline margin real, or just noise in a single run? 24 00:05:23,699 --> 00:05:33,449 [Hal Turing] Fine, and I'll hold the paper to the first question. The title says without back-propagation, and I want to see which network that actually applies to. 25 00:05:33,449 --> 00:05:55,625 [Dr. Ada Shannon] It applies to the downstream network and not to the hypermodel. Start with the architecture. The hypermodel is a T5 initialized from LM-adapted T5. Its encoder reads the few-shot examples. Its decoder doesn't generate text. It gets a fixed set of learned token embeddings, with causal masking removed, and its output vectors go through MLP heads that emit the prefix or LoRA parameters for the frozen downstream T5. 26 00:05:55,625 --> 00:06:02,649 [Hal Turing] So how big is this hypermodel? If it's another T5 sitting next to the first one, that matters. 27 00:06:02,649 --> 00:06:20,349 [Dr. Ada Shannon] It does matter. The hypermodel is 855 million parameters for the Large setup and 3.2 billion for XL. Of those, 105 million and 420 million are the new output heads. So at XL the generator is about the size of the model it steers. 28 00:06:20,349 --> 00:06:26,274 [Hal Turing] Now the training. How do you teach it to emit good weights without a target set of weights? 29 00:06:26,274 --> 00:06:57,649 [Dr. Ada Shannon] The loss sits on the downstream model's answer. Generate parameters from the examples, run the frozen T5 on a target input, compare its output to the label, and send the gradient back through the frozen model into the hypermodel. That is back-propagation through both networks. So the title's promise applies to adapting to a new task. It does not apply to building the hypermodel. The authors considered another route, which is running PEFT on many tasks and training the hypermodel to copy the results. They rejected it as too costly. 30 00:06:57,649 --> 00:07:00,099 [Hal Turing] What does the training look like? 31 00:07:00,099 --> 00:07:27,074 [Dr. Ada Shannon] Two stages. Stage one is hyperpretraining, with an objective they call CACLM. Take a 512-token passage from C4, the web-text corpus, and cut it into four segments, A through D. The frozen downstream model sees only B, which is just 32 tokens, and must predict C. The hypermodel sees A and D and has to compress them into parameters that help with C. B is short on purpose, so the downstream model can't cope without the hypermodel. It runs 100K steps, separately for prefix and LoRA. 32 00:07:27,074 --> 00:07:30,849 [Hal Turing] And is that stage needed, or is it ceremony? 33 00:07:30,849 --> 00:07:43,674 [Dr. Ada Shannon] It's needed. Without it, both hypermodels score about where the plain PEFT baselines do. But LoRA declines a little after about 50K steps, so the 100K choice looks untuned. 34 00:07:43,674 --> 00:07:45,699 [Hal Turing] Then stage two. 35 00:07:45,699 --> 00:08:27,024 [Dr. Ada Shannon] Multi-task fine-tuning in the MetaICL style. That's 10K steps at batch size 256, with up to 16 examples going to the hypermodel, which reads up to 1024 tokens, and only the target input going to the downstream model, which reads 384. There are three datasets. P3 is the collection behind T0. Its tasks are scored by multiple-choice accuracy, its prompts are written for zero-shot use, and the authors dropped prompts with long inputs. MetaICL's task inputs often give no hint of what the task is, so a model with no examples is handicapped. Super-NaturalInstructions gives a task definition plus up to two positive examples and scores ROUGE-L, a measure of text overlap. 36 00:08:27,024 --> 00:08:31,999 [Hal Turing] Is the T5-MTF baseline the T0 recipe? 37 00:08:31,999 --> 00:08:52,174 [Dr. Ada Shannon] Roughly. The authors re-trained it with their own settings, including a different optimizer and batch size. The XL T0 scores 51.3 on the P3 held-out tasks, while their own retrain gets 59.1. So the baseline is stronger than T0, but it's also their own implementation. Keep that in mind for the next result. 38 00:08:52,174 --> 00:08:55,024 [Hal Turing] Give me the P3 headline. 39 00:08:55,024 --> 00:09:15,625 [Dr. Ada Shannon] Accuracy, higher is better. At XL the prefix hypermodel scores 59.6 and the fully fine-tuned T5 scores 59.1. That's about half an answer more per hundred questions. At Large it flips: 54.6 against 54.8. Against a single shared multi-task LoRA set, the LoRA hypermodel is about nine points ahead at XL. 40 00:09:15,625 --> 00:09:19,750 [Hal Turing] Half a point on eight tasks doesn't sound like a win. 41 00:09:19,750 --> 00:09:37,600 [Dr. Ada Shannon] It isn't one. Two tasks, CB and HellaSwag, carry the gain. Three others go the other way. The paper reports no seeds or confidence intervals on these tables, so we can't say whether 0.5 is real. I'd read it as roughly tied, and I'll leave the bigger skepticism for later. 42 00:09:37,600 --> 00:09:41,075 [Hal Turing] Does the tie survive the other datasets? 43 00:09:41,075 --> 00:10:07,725 [Dr. Ada Shannon] No. On Super-NaturalInstructions the hypermodel loses clearly. With a definition plus two examples at XL, it's 5.7 ROUGE-L points below the fully fine-tuned T5, and the deficit is bigger than the 4.1 at Large. So the gap widens with scale in this experiment, which is the wrong direction. On MetaICL it beats plain T5-MTF by a lot, but it loses to the few-shot baseline on two of three splits. And the plain baseline is weak there only because it gets no examples. 44 00:10:07,725 --> 00:10:11,450 [Hal Turing] So the baseline you choose changes the verdict. 45 00:10:11,450 --> 00:10:24,975 [Dr. Ada Shannon] Yes. The strongest comparison is T5-MTF-Few-shot, a fully fine-tuned T5 that sees the examples and target together with full attention. The hypermodel doesn't beat it on P3. 46 00:10:24,975 --> 00:10:32,125 [Hal Turing] But the hypermodel has an inference argument, right? That baseline re-reads the examples every time. 47 00:10:32,125 --> 00:10:50,700 [Dr. Ada Shannon] That's the paper's argument. The hypermodel encodes the examples once, and the parameters are reused for every query. The few-shot baseline needs a new forward pass over examples plus input each time. The reasoning is sound. But no latency or memory measurement is reported, so it stays an argument. 48 00:10:50,700 --> 00:10:55,100 [Hal Turing] One more pattern. Prefix beats LoRA almost everywhere. 49 00:10:55,100 --> 00:11:07,975 [Dr. Ada Shannon] The authors speculate that prefixes are hidden-state-like, so they're easier for a network to generate. LoRA weights have to be produced as matrix entries. It's a plausible guess and they don't test it. 50 00:11:07,975 --> 00:11:14,950 [Hal Turing] Let's take the first skeptical question. Where did the cost go? The title says without back-propagation. 51 00:11:14,950 --> 00:11:36,650 [Dr. Ada Shannon] At the point of use, the claim holds. A new task costs one forward pass of the hypermodel, nothing is back-propagated, and the parameters are reused for every query. But the hypermodel was built by back-propagating through both networks, for 100K hyperpretraining steps plus 10K multi-task steps at batch size 256. The paper reports no FLOPs, no GPU-hours and no memory for that run. 52 00:11:36,650 --> 00:11:41,250 [Hal Turing] So the efficiency claim is plausible, but not demonstrated. 53 00:11:41,250 --> 00:12:13,575 [Dr. Ada Shannon] Right. A real argument needs a break-even point: the number of tasks or users where the one-time training bill beats running LoRA per task. That takes three numbers. The meta-training cost, the per-task LoRA cost on the same sixteen examples, and the extra inference cost of keeping an 855-million or 3.2-billion-parameter hypermodel around. The paper has none of them. And its PEFT baselines are single shared parameter sets, not LoRA tuned per task on those sixteen examples. So the comparison that matters is missing. 54 00:12:13,575 --> 00:12:19,975 [Hal Turing] Then the headline margin. Fifty-nine point six against fifty-nine point one at XL. 55 00:12:19,975 --> 00:12:39,925 [Dr. Ada Shannon] That's half a point on an eight-task average, with no seeds and no confidence intervals. It comes from two gains against three losses, and at Large the sign flips. The baseline is also the authors' own re-trained T5-MTF, which scores far above published T0-XL. Matched is fair. Exceeded is not supported. 56 00:12:39,925 --> 00:12:41,725 [Hal Turing] What would settle it? 57 00:12:41,725 --> 00:13:02,400 [Dr. Ada Shannon] Several seeds on both sides, intervals, and the per-task spread. And the picture depends on the baseline and dataset. Against the few-shot model the hypermodel mostly trails, and on Super-NaturalInstructions it trails the fully fine-tuned model. Its pitch is that it encodes the examples once, but without a latency or memory number I can't tell you how many queries per task it takes to win. 58 00:13:02,400 --> 00:13:10,450 [Hal Turing] Is there a check that the hypermodel actually reads the examples, rather than recognizing a familiar task family? 59 00:13:10,450 --> 00:13:26,050 [Dr. Ada Shannon] Nothing in the evidence we have covers that. The test would be shuffling the labels or swapping in examples from a different task, and seeing whether the generated parameters change. If they barely move, the examples matter less than the story suggests. 60 00:13:26,050 --> 00:13:32,600 [Hal Turing] Which brings us to the result you said was sturdiest. Using the output as an initializer. 61 00:13:32,600 --> 00:14:01,399 [Dr. Ada Shannon] It is the most practical result. At T5-Large, hypermodel initialization beats random and shared initialization, and the training curve starts higher. Against random it's worth about six and a half points for prefix and about two for LoRA. Against shared initialization it's about a point. That's averaged over three seeds with no spread reported, and the best learning rate was chosen per method. It also still back-propagates, so it supports a weaker claim than the title. And with no step counts to reach a target accuracy, we can't say how much compute it saves. 62 00:14:01,399 --> 00:14:04,674 [Hal Turing] Does related work sharpen any of this? 63 00:14:04,674 --> 00:14:39,824 [Dr. Ada Shannon] Three papers. HINT also generates prefixes or adapters from instructions, but it fully tunes the downstream model and uses fusion-in-decoder. A head-to-head would show whether freezing the downstream model is what holds HyperT5 back. The Deb paper trained a hypernetwork with MAML on Super-NaturalInstructions. The multi-task recipe here approximates that without an inner loop, yet there's no direct comparison. And MetaICL, by Sewon Min, Mike Lewis, Luke Zettlemoyer and Hannaneh Hajishirzi in 2022, supplied the training setup and the few-shot baseline. That baseline stays the strong reference. 64 00:14:39,824 --> 00:14:42,949 [Hal Turing] What do the authors say about the limits? 65 00:14:42,949 --> 00:15:11,274 [Dr. Ada Shannon] The input is limited to a few examples. Adaptation is bounded by what the hypermodel saw in training, so new domains or low-resource languages would be underserved. They did minimal hyperparameter tuning, and it's a proof of concept on T5 only, at 770 million and 3 billion downstream parameters. The title says large language models, which is a stretch at that scale. Their suggested route beyond few-shot is hypermodels that take larger training sets or predict gradients. 66 00:15:11,274 --> 00:15:14,549 [Hal Turing] So the next experiments are obvious. 67 00:15:14,549 --> 00:15:26,250 [Dr. Ada Shannon] Cost accounting with a break-even. Seeds. Per-task LoRA on the same sixteen examples. A HINT comparison. The shuffled-example ablation. Then larger, newer models. 68 00:15:26,250 --> 00:15:53,875 [Hal Turing] So what did we learn? A hypermodel can generate usable prefix or LoRA parameters for unseen tasks from a few examples. It roughly matches a fully fine-tuned T5 on some benchmarks, and it works well as a warm start. The boundary is that the cost moved into a one-time meta-training run the paper never measures. And the advantage shrinks or reverses on instruction-heavy Super-NaturalInstructions tasks. That's our time. Thanks for listening, and goodbye.