arXiv:2611.24718cs.LGNov 2026

Manuscript Offprint

arXiv:2611.24718

Meta-LSQ: A Closed-Form Sobolev Inner Solver for Few-Shot Meta-Learning

Antonin Sulc

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

Abstract

Gradient-based meta-learners such as model-agnostic meta-learning (MAML) adapt to a new task with an inner loop of gradient descent that has to be differentiated through, and they meta-learn every network weight. Meta-LSQ instead fits each task with one regularised least-squares solve over a fixed random Fourier basis and meta-learns only three scalars, a bandwidth, a ridge and a derivative weight. Since the derivative of a sinusoid is again a sinusoid, the same solve can also take derivative observations, and the fitted model has exact closed-form derivatives of any order. On 10-shot sinusoid regression Meta-LSQ trains in 14s and ends with a 5.5× lower error than a first-order MAML baseline that trains 36× longer, and a Gaussian-process control suggests that most of this gain comes from sharing one kernel across tasks. In simulated beam tuning at DESY's ARES facility with model derivatives it is slightly more accurate than an ALPaCA-style model and well ahead of gradient descent. Over DESY's full range of target beams, again in simulation and from measurements alone, its best setting has a median error of 7.3 µm, against 14.4 for the published final beams of their reinforcement-learning agent, which has the lower median on their 300 trials of small targets. On real sensor-calibration data a learned prior mean puts it ahead of MAML on two of four targets, but an exact Gaussian process with the same change and an ALPaCA-style model stay more accurate on most targets, and it breaks down on non-smooth targets. On noiseless targets outside the span of the basis, in-sample criteria such as generalised cross-validation choose too small a ridge.

1 Introduction

In the classical pipeline a network is trained on each task separately, from a random start and by many steps of gradient descent, which needs far more than a handful of examples. A meta-learner is instead trained on many related tasks so that a new task can be fitted from a few examples. Model-Agnostic Meta-Learning (MAML) [1], the

most widely used recipe, still fits each task by gradient descent, but only for a few steps from a meta-learned start. An inner loop takes TT gradient steps on a task's support set, giving adapted weights θτ=θ0−η∑t<T∇θLτs(θt)\theta_\tau = \theta_0 - \eta \sum_{t<T} \nabla_\theta \mathcal{L}_\tau^s(\theta_t), and an outer loop tunes the initialisation θ0\theta_0 so that the query loss after adaptation is small. The outer gradient has to differentiate through the TT inner updates, kept on the graph, which needs double backpropagation. First-order variants [2] drop the second-order terms, and Jamal et al. [3] shorten the meta-gradient graph for long inner loops with a lazy teacher–student scheme. In all of these the meta-learned object is still the whole initialisation, so the outer search runs over as many dimensions as the network has weights, typically thousands.

If the inner loop is replaced by a convex solver, the iterative fit goes away and so does part of the second-order cost. ALPaCA [4] does closed-form Bayesian linear regression with a meta-learned prior on top of a learned encoder, and was evaluated on the same sinusoid benchmark we use; R2D2 [5] puts ridge regression on a convolutional backbone, and MetaOptNet [6] a convex SVM. The inner solve is one-shot and differentiable in all three, but the features still come from a deep network that is meta-learned along with it, so the number of meta-parameters does not go down.

Approach. We keep the closed-form solve but drop the learned feature extractor, so Meta-LSQ runs no gradient descent on a task at all. Each task is fitted by one regularised least-squares solve over a frozen random Fourier basis, the outer loop differentiates through that solve instead of through gradient steps, and only two or three scalars describing the basis are meta-learned.¹ Fixing the features costs expressivity, and the method is meant for smooth, low-dimensional families that the basis represents well (failures outside it are in Sec. 5.5).

The solve can also use derivative observations at little cost. The derivative of a sine feature is the same feature shifted by a quarter period (Fig. 1b), so a derivative constraint is linear in the same coefficients as a value constraint. Both go into one

¹The code and the stored results behind every number and figure are at https://github.com/sulcanonin/metalsq-public.

*Corresponding Author.

Proceedings of the 8th Northern Lights Deep Learning Conference (NLDL), PMLR 352, 2027. © 2027 Antonin Sulc. This is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).

Figure

outer loop over tasks: query error of uN→u_N \to gradient through the solve →\to Adam step on log⁡σ,log⁡μ,log⁡w\log \sigma, \log \mu, \log w

Figure 1. Meta-LSQ on one held-out sinusoid task. (a) The support set gives ten values and, at the same points, ten slopes. A value fixes a point of the curve and a slope fixes its direction there. Meta-LSQ fitted to the values alone (dashed) passes through every point but drifts from the truth where the points are sparse (shaded). (b) Each value is a row of HH with target yiy_i and each slope a row of Γ\Gamma with target gig_i, in the same unknowns β\beta; the two rows and targets of one point are outlined. A slope row is the value row shifted by π/2\pi/2 and scaled by WjW_j (20 of N=200N=200 features shown). (c) The fitted uNu_N and its closed-form derivative uN′u'_N over the true task and its derivative (pale). The values-only fit of (a) also has a closed-form derivative (dashed), but it is wrong where the points are sparse; the slope rows correct it. Only σ,μ\sigma, \mu and ww are meta-learned, by the outer loop shown at the bottom. (d) Test MSE against training time. Meta-LSQ-Sobolev after 0.5 s (dotted) is below MLP-MAML after 50 s (Table 2).

linear system, which we call Sobolev fitting. Fitting derivatives with an MLP (Sobolev training [7]) requires backpropagating through a backward pass, which roughly doubles graph depth and memory; in Meta-LSQ it adds MdMd rows to the linear system.

References (25)