What learning algorithm is in-context learning? Investigations with linear models
Paper · 2022 · Ekin Akyürek, Dale Schuurmans, Jacob Andreas et al.
Summary
A prompt can give a transformer a small dataset and ask it to predict the label of an example it has never seen. The network can adapt its answer to the dataset while its trained parameters stay fixed. The authors ask what kind of learning takes place during that forward computation. They study linear regression, where each task has a hidden vector of coefficients and the examples reveal how those coefficients turn inputs into labels. Short prompts are especially informative. Several coefficient vectors can explain everything the transformer has seen, yet they can give different answers on a new input. The answer then reveals something about how the network chooses among plausible fits.
The paper approaches the question through constructions, prediction comparisons and tests of the network’s internal states. In the constructions, a decoder layer can copy selected values, multiply matrices, divide by the magnitude of a scalar, or form an affine combination. A fixed number of layers can use these operations to take a gradient step with hidden space proportional to the input dimension. A separate construction revises an exact ridge-regression estimate using space proportional to the square of that dimension. Further updates can be implemented by stacking groups of layers. These constructions specify parameters by hand and establish what the architecture can support.
The trained decoders learn from synthetic regression sequences. In the main noiseless experiment, their predictions closely follow ordinary least squares, including its minimum-norm choice when many sets of coefficients fit the context. With Gaussian noise added to the observed labels, the closest reference is ridge regression with the penalty prescribed by the Bayesian optimum for the task distribution. This fit depends on capacity. The shallowest decoder comes closest to a single gradient step, with a weak match in absolute terms. Decoders of intermediate depth resemble ridge, and deeper ones approach least squares. An additional sweep finds that a single attention head suffices for a relative least-squares comparison at every dimension tested, while the depth and width thresholds vary with dimension.
The authors also train auxiliary predictors to read the decoder’s hidden states. These probes recover a statistic that combines features and labels before they can reliably recover the least-squares coefficient vector. Nonlinear probes do better than linear ones, and a decoder trained on a fixed relationship provides a weaker control for recovering the statistic. The trained predictions also show departures from linearity on short contexts. Taken together, the results make standard estimation procedures a concrete explanation for much of the behavior, while the exact sequence of calculations inside the trained decoder remains open.
Deep dive: What learning algorithm is in-context learning? Investigations with linear models
The paper uses linear regression to test which learning algorithms transformers approximate when they predict from labeled examples in a prompt. · about 39 minutes to read
The problem and its context
What can change while the parameters stay fixed?
During ordinary supervised training, an example and its label can change a network’s parameters through the training loss. In-context learning gives the same kind of information a different role. A labeled example becomes part of the input that the network processes. Its label is already present when the network reaches the next query, so it can influence that prediction through the hidden activations. A different sequence can produce a different set of activations, and hence a different relationship between query inputs and outputs, with the same parameter settings.
The distinction matters because a network can be trained to predict well across many tasks, while each prediction depends on evidence about the particular task at hand. An explanation at the level of training would describe how prediction errors shape the fixed parameters. An explanation at the level of a prompt would describe what those parameters cause the network to do with its current examples. The authors’ hypothesis concerns the second process. They ask whether activations can hold a temporary predictor and whether processing further examples can revise it in a way that resembles an established learning procedure.
The paper traces interest in this phenomenon to systems trained specifically to make use of examples and to the discovery that demonstrations can guide predictions in systems trained on open-domain text. In a direct training setup, the learning objective can explicitly reward predictions made from short sequences of examples. Open-domain training made the phenomenon more surprising because useful adaptation appeared in a more general training setting. Both motivate an account of how example labels affect later predictions. The authors cite work on few-shot learning and reports on the behavior of large language models, including Language Models are Few-Shot Learners.
Earlier meta-learning research supplied a vocabulary for separating the two timescales. In the arrangement the authors describe, an outer optimization chooses settings that will help an inner procedure adapt across tasks. The starting parameters for adaptation or the size of its updates can be learned this way. The design specifies the inner procedure in advance, so training can improve its settings while retaining a recognizable account of what an adaptation step does. The paper cites this tradition through work such as Model-Agnostic Meta-Learning.
A sequence prediction objective can leave the inner learning procedure implicit. The designer specifies which inputs go into the sequence and which answers should be predicted. The network then has to acquire a way of using those inputs through training. The authors place their setup alongside work that trains directly for context-based adaptation, including MetaICL. Their question is whether an inner procedure can be identified after training, when the parameters define a forward computation and the objective has supplied no explicit intermediate steps.
Why use a task with many possible fits?
The paper distinguishes the kinds of functions a transformer can learn from the procedure by which it learns them. It cites previous studies of simple function classes and adopts training guidance from the work of Garg and colleagues. It also situates the study alongside research into the properties of training distributions that elicit in-context learning. An account based on implicit Bayesian inference, for instance, suggests viewing a demonstration as evidence about a hidden task. A controlled regression problem lets the authors turn that idea into a precise comparison of predictions. What Can Transformers Learn In-Context? and An Explanation of In-context Learning as Implicit Bayesian Inference.
Each linear regression task has a fixed coefficient for every input coordinate. To generate a label, the task multiplies each coordinate by its coefficient and adds those products. Across tasks, the coefficients change. Within a task, every labeled example constrains the same hidden vector. The learner has to use those constraints to answer queries that may combine the input coordinates in ways it has yet to observe.
In a clean task, the label of an observed input specifies the component of the weight vector along that input’s direction. More observations can reveal more directions. When the observed inputs fail to span the full feature space, the remaining directions are unconstrained. Adding a weight component orthogonal to all the observed inputs leaves their labels unchanged. A query with a component outside the observed span can expose that change immediately. The authors use this underdetermined situation because agreement on the examples can coexist with substantial disagreement about what comes next.
This setting provides concrete alternatives to test. A neighbor rule can make a prediction from the labels of inputs close to the query. A gradient method can form a tentative estimate by moving away from a starting point in the direction suggested by prediction errors. A regression solver can choose a fit by minimizing an objective, with or without a penalty on large coefficients. Each procedure can receive the same labeled context and make a forecast at the same query. Cases in which these forecasts diverge give the experiment leverage to identify the closest description of the transformer’s behavior.
There is also a question about the architecture. A general expressivity result says something about what a transformer can represent under the conditions of that result. The authors want to know what it takes to express a particular regression update, including the space for intermediate quantities and the depth needed to transform them. They discuss earlier constructions for linear self-attention in a meta-learning setting and relate their question to broader work on transformer expressivity. Linear Transformers Are Secretly Fast Weight Programmers and Are Transformers universal approximators of sequence-to-sequence functions?.
These questions call for different evidence. Hand-chosen parameters can show how a decoder could implement an update. Agreement over sampled contexts can identify which estimator describes its predictions after training. An internal readout can show where information relevant to that estimator is available. The authors use regression because its implementations, its competing forecasts and its intermediate quantities are all specific enough to examine independently.
The method, step by step
From a sampled relationship to a prediction sequence
The experiment begins by drawing a rule for a task. The data generator picks a coefficient vector, draws feature vectors and uses the same coefficients to label the inputs in that sequence. The predictor receives the features and the labels that have already appeared. Each new feature position poses a question about the rule shared by those observations. The network’s parameter settings are learned across sequences, so drawing a different rule for the next sequence gives the network a reason to pay attention to the examples in front of it.
f(x) = wᵀx
The function f maps the input column vector x to a scalar label. The column vector w contains the task’s coefficients. Both x and w have d coordinates, where d is the input dimension. The superscript ᵀ transposes the coefficient column into a row. Its matrix product with x sums the products of matching entries.
For the main experiment, the two types of vectors are drawn from zero-centered Gaussians with identity covariance. The rule is shared by the examples of a task because the coefficient draw is made for the whole sequence. Each feature draw then supplies another view of that rule. The identity covariance gives the generator the same variance in each coordinate and zero covariance between distinct coordinates. The noisy experiments change the label process and the prior variance for the coefficients.
x̃ᵢ = [0, xᵢ]
The index i identifies an example, xᵢ contains its feature values, and x̃ᵢ is its representation as an input position. The brackets concatenate entries. The initial 0 fills the scalar coordinate reserved for a label in this encoding.
ỹᵢ = [yᵢ, 0_d]
The representation ỹᵢ puts the observed scalar yᵢ in that first coordinate. The notation 0_d means a vector of d zeros, which fills the remaining slots. This gives feature positions and label positions the same width, d+1, before any additional embedding or padding.
The representations alternate in the order in which the observations arrive. At a feature position, the correct label is still to its right. The decoder uses causal attention, so its prediction there can depend on that feature vector and on completed pairs to the left. The authors train on the resulting prediction problems throughout the sequence. A task supplies forecasts made with very little evidence as well as forecasts made after a longer run of examples.
Learning and evaluating regression from a sequence
The steps in order.
The objective averages over tasks and input draws. The loss is applied to the answer for each query, and the losses are summed before taking that average. The task generator supplies the correct targets, so there is no need to supervise an intermediate estimate of the coefficients.
argmin_θ E[Σᵢ₌₁ⁿ ℒ(f(xᵢ), T_θ([x₁, f(x₁), …, xᵢ]))]
The operation argmin_θ selects the decoder parameters θ that minimize the expression. E denotes expectation over the draws of the task function f and of inputs x₁ through xₙ. The sum visits indices i from 1 through n, the number of input positions considered. T_θ is the decoder using parameters θ. The bracketed sequence consists of the completed input–label pairs, including those omitted by the ellipsis, and ends with the query xᵢ. The loss ℒ evaluates the forecast from that prefix against f(xᵢ).
ℒ(y, y′) = (y − y′)²
Here y is a scalar target, y′ is its forecast and ² squares their difference. An error contributes the same amount whichever direction it takes. Large deviations contribute disproportionately to the training loss. The use of squared error also specifies which Bayesian forecast the noisy experiment should use.
Inside the decoder layer
The decoder processes a sequence of vector states. A layer first exchanges information across positions through attention, then transforms each resulting state through a feed-forward calculation. A state can receive information from permitted earlier positions and its own position. Across successive layers, the outputs of one such transformation become the inputs to the next. The underlying architecture comes from Attention Is All You Need.
bⱼ,ᵢ = (Vⱼ H≤ᵢ) softmax((Kⱼ H≤ᵢ)ᵀ Qⱼ hᵢ)
The vector bⱼ,ᵢ is the output of head j for position i. The state hᵢ belongs to position i in the incoming layer, and H≤ᵢ is the matrix whose columns are the available states through that position. The matrices Qⱼ, Kⱼ and Vⱼ are the query, key and value projections of that head. The query Qⱼ hᵢ is scored against the keys by a matrix product using their transpose ᵀ. softmax turns the scores into non-negative weights summing to unity. Left multiplication by the matrix of values uses those weights to make a weighted sum. This is the head computation with states written as columns.
aᵢ = Wᶠ[b₁,ᵢ, …, bₘ,ᵢ]
The attention contribution aᵢ at position i is produced by Wᶠ, the output projection. The bracketed expression concatenates the head outputs at that position, and the ellipsis covers the intervening heads up to m, the head count.
hᵢ⁽ˡ⁺¹⁾ = W₁ σ(W₂ LN(aᵢ + hᵢ⁽ˡ⁾)) + aᵢ + hᵢ⁽ˡ⁾
The superscript l indexes the incoming layer and l+1 the outgoing layer. The sum of aᵢ and hᵢ⁽ˡ⁾ is the input to the feed-forward branch and also passes directly to the output through the residual connection. The branch normalizes that sum with LN, applies an input projection W₂, evaluates the activation σ, then projects back with W₁. The residual connection preserves information across layers by addition. A construction that writes a replacement value therefore has to cancel the old contribution at the destination.
LN(z) = (z − E[z]) / √Var[z]
The input z is a hidden vector. In this expression E[z] denotes the mean across its entries and Var[z] their variance. √ takes the square root, yielding the standard deviation. The subtraction and division use the same mean and standard deviation at every coordinate. Consequently, when some coordinates dominate the variance, they can control the factor by which the other coordinates are scaled. This relationship is central to the proof’s use of Layer Normalization.
σ(z) = (z/2)(1 + erf(z/√2))
In this formula z is a scalar, σ is the Gaussian error linear unit, or GeLU, and erf is the Gaussian error function. The layer applies the activation separately to individual entries. Its curvature near the origin gives the construction a way to approximate products. Its nearly linear behavior far into the positive range helps values pass through when the intended operation is affine.
Depth determines how many such transformations can be made in succession. Hidden size is the number of coordinates in each state and governs how much information can be kept there. The head count determines how many attention reads can be combined at a layer. The constructions assign work to all three architectural features, while the experiments vary them to find out which predictions training can produce.
Building arithmetic from attention and the feed-forward branch
The proofs first pad embedded inputs to reserve coordinates for computations. Position embeddings can then specify routing patterns. Query and key projections extract the positional information relevant to the layer, allowing a position to favor a particular previous location or a set of source locations. With a sufficiently large gap between the scores of intended and unintended sources, the attention weights concentrate on the intended sources. A useful application is to bring a feature vector to the location that holds its label. The arithmetic can then act on both parts of the observation locally.
The authors describe the recurring operation as read–arithmetic–write. Attention reads designated coordinates and projects the retrieved values. The feed-forward branch combines them with a projection of local coordinates. The result is projected again to the desired output size, and the network writes that result into its designated destinations. The proof handles the rest of the state by preserving its existing contents outside the write region.
hᵢ⁽ˡ⁺¹⁾[w] ← Wₒ(((Wₐ / |K(i)|) Σₖ∈K(i) hₖ⁽ˡ⁾[r]) ⋆ (W hᵢ⁽ˡ⁾[s]))
Here i is the destination position and l is the input layer index. K(i) gives the source positions chosen by the routing pattern, k ranges over those positions, and |K(i)| counts them for a nonempty read. The sum averages their selected states after multiplication by Wₐ and division by that count. The bracketed index lists r, s and w select retrieved, local and destination coordinates. Wₐ and W bring the two operands to compatible sizes. The operator ⋆ stands for addition or coordinatewise multiplication, Wₒ is the output projection, and ← assigns the result at the destination in the next layer. The index list w in this definition names storage locations.
A move operation keeps the retrieved contribution and can dispense with the local operand. An affine operation projects its operands, adds them and can add a constant bias. A dot product uses the multiplication form and then sums the products in the output projection. To multiply matrices, the construction assigns the various row-and-column dot products their own working coordinates and runs them in parallel. The paper’s parallelization argument requires compatible routing and storage regions that avoid writes to another calculation’s inputs or destinations.
The implementation has to account for the original hidden state entering through the residual connection. The paper designs the attention read to place projected values in a working region and uses a head reading the current position to cancel the residual contribution there. In the later branch it arranges a similar cancellation for values that the final output must replace. This bookkeeping lets the mathematical description speak of writing into coordinates, even though the layer implements the write through additions.
The feed-forward branch needs different settings when it adds and when it multiplies. To make it nearly linear, the construction sends the relevant arguments into the large positive range of GeLU by adding a bias. It removes the bias contribution at the output. For multiplication, the layer uses the opposite scale and evaluates GeLU near the origin.
√(π/2) (GeLU(a + b) − GeLU(a) − GeLU(b)) ≈ ab
The scalar operands are a and b, GeLU is the activation defined above, and π is the circle constant. The sign ≈ denotes approximation. For small operands, the linear contributions cancel in the difference of the activation evaluations. The surviving quadratic cross-term yields the product ab after the displayed rescaling. The implementation shrinks the operands before evaluating the activation and uses its output weights to restore the scale of the product. Higher-order terms limit the accuracy at finite scale.
Normalization can be made to pass values through approximately by adding large, balancing coordinates. These coordinates control the mean and make the variance predominantly a function of the selected scale. The following projection can undo that nearly fixed rescaling on the coordinates used for arithmetic. The division construction instead places a multiple of the divisor in the coordinates that dominate the variance. In that case the standard deviation depends on the divisor’s magnitude, so the normalized numerator coordinates can be rescaled to give the desired quotient. This gives division by an absolute value. The ridge update calls for a positive denominator, so the primitive has the required sign behavior in that application.
The result is a collection of four layer operations, called mov, mul, div and aff in the paper. Each has a construction for a single decoder layer. Read–arithmetic–write covers the copy, the affine case and the dot products used in multiplication. The division argument separately exploits normalization. Sharp attention selection, the GeLU arithmetic and the normalization tricks use approximations at controlled scales. The proofs use these to realize the operations to high accuracy, subject to the precision available.
One gradient step
The first regression construction starts from an estimate of the coefficients and takes a step based on an observed input and label. The estimate supplies a predicted label for this input. The difference between prediction and observation is the residual. Each input coordinate scales that residual in the derivative for its corresponding coefficient. With a squared coefficient penalty, the update includes a term that pulls the estimate towards the origin.
w′ = w − 2α(x(wᵀx − y) + λw)
The vector w is the current estimate and w′ is the estimate after the step. The example consists of the feature column x and scalar label y. The transpose in wᵀx produces their scalar prediction, so wᵀx − y is the residual. The scalar α is the learning rate, λ multiplies the squared coefficient penalty and the factor 2 comes from differentiating the squared terms. The product of x with the residual produces a vector in coefficient space.
The first useful read attaches the observed features to their label. An affine calculation can obtain the current prediction and its error there. Multiplication forms the vector of feature contributions to the gradient. Affine operations add the penalty contribution and apply the learning rate to obtain the updated vector. Another read puts the updated weights at the query position, where a dot product evaluates the new predictor. Only particular coordinates at particular positions have to contain the desired answer throughout this construction. The same operations can produce auxiliary values at other positions.
ŷ = w′ᵀxₙ
The predicted scalar is ŷ, xₙ is the query at index n, and w′ᵀ is the row form of the updated coefficient vector. The result is written into a designated part of the state at the query position.
The single-step construction has constant depth and hidden size O(d). Here O(d) describes growth at most proportional to the input dimension d, up to constant factors. The key intermediate quantities occupy vectors, so their storage grows with the feature dimension. The updated coefficients are available in the hidden state for another step. The appendix describes using O(n) layers for a pass involving n examples and reports hidden space O(n+d) for the accompanying reference implementation, with working coordinates reused. The accompanying code contains the primitives and reference implementations of gradient descent and ridge regression.
Revising the ridge solution
The other construction starts with the optimization problem for regression. The objective adds the squared errors on the observed examples. Ridge also charges for the squared size of the coefficient vector. In ordinary least squares, that charge has zero weight. The difference matters when a strong coefficient can reduce an observational error or when several possible fits agree on that error.
Σᵢ (wᵀxᵢ − yᵢ)² + λ‖w‖₂²
The index i ranges over the observations. The prediction uses trial coefficients w and input xᵢ, and the target is yᵢ. The sum Σᵢ accumulates their squared residuals. The notation ‖w‖₂² is the squared Euclidean norm, or sum of the squared coefficients. The scalar λ governs the penalty. Ordinary least squares uses λ = 0, and ridge uses λ > 0.
For the matrix expressions, use a design matrix with an observation per row. This convention makes its transpose collect each feature coordinate across the observations and gives the products in the regression formula their requisite dimensions.
w* = (XᵀX + λI)⁻¹ XᵀY
The coefficient vector w* minimizes the objective when the indicated inverse exists. X contains the feature rows and Y is the column of observed labels in the same order. ᵀ denotes transpose, I is the identity matrix in feature space, and ⁻¹ denotes matrix inversion. The matrix XᵀX accumulates feature products, and the vector XᵀY accumulates each feature vector weighted by its label. A positive λ makes the regularized matrix invertible. For underdetermined ordinary least squares, the reference in the paper takes the minimum-norm minimizer.
Computing a whole new inverse at each example would obscure the connection between sequential processing and fitting. Each additional observation changes the feature-product matrix by an outer product of its feature vector with itself, which has rank at most one. A matrix identity expresses the updated inverse in terms of the previous inverse and the new vector.
(A + uvᵀ)⁻¹ = A⁻¹ − (A⁻¹uvᵀA⁻¹)/(1 + vᵀA⁻¹u)
This is the Sherman–Morrison formula. A is the invertible matrix before the update, u and v are column vectors of matching dimension, and uvᵀ is the outer product being added. The denominator 1 + vᵀA⁻¹u is a scalar and must be non-zero. The regression update uses the new feature vector for both u and v. The prior matrix starts at λI and remains positive definite as outer products are added. Its inverse is positive definite as well, so the denominator for regression is positive.
w′ = (λI + xᵢxᵢᵀ)⁻¹ xᵢyᵢ
Here w′ is the fitted ridge vector after starting from the regularized empty system and incorporating the observation at index i. The symbols xᵢ and yᵢ denote its feature column and label, and λI is the initial matrix. The identity updates the initial inverse I/λ for the addition of xᵢxᵢᵀ. The vector xᵢyᵢ is the corresponding contribution on the label side. Applying the updated inverse gives weights that can be used in a dot product at the query.
The proof’s layer sequence forms the products that enter the correction to the inverse, computes its scalar denominator, and applies the division and subtraction. It then uses the updated matrix to form coefficients and sends them to the query. A continued computation can carry the inverse and accumulate further label-weighted feature contributions. The working space for the displayed step is O(d²), where d² reflects storage for quantities with a row and a column for each feature. Its depth is constant for that update. Repetition uses further groups of layers. The closed form specifies the result of the calculation, while the inverse update specifies how this construction can reach it sequentially.
Measuring agreement and reading internal states
To compare trained predictions with a regression rule, the authors give both the learned and reference procedures the same context and query. They measure squared prediction difference, abbreviated SPD. This makes the output of the reference the comparison target. The training loss uses the label supplied by the generator as its target, so the two measurements answer different questions.
SPD(A₁, A₂) = E_D,x′[(A₁(D)(x′) − A₂(D)(x′))²]
A₁ and A₂ are learning procedures. Each receives the context D and returns a predictor that can be evaluated at the query x′. E_D,x′ averages over generated contexts and sampled queries. The squared gap is zero when their predictions agree and grows as their outputs diverge.
The second measurement uses coefficients to summarize a learner’s responses. With a context held fixed, the authors ask for predictions at additional inputs and find a linear function that fits those predictions. This procedure can be used even if a predictor’s exact dependence on a query is nonlinear.
ŵ_A = argmin_w Σᵢ (ŷᵢ − wᵀx′ᵢ)²
The vector ŵ_A is the fitted coefficient vector for the procedure A. The symbol argmin_w selects the trial vector w minimizing the displayed sum. The index i ranges over additional queries x′ᵢ, and ŷᵢ is the forecast from A with the original context and that query. The norm of the resulting residual can reflect behavior that the chosen linear function fails to capture.
ILWD(A₁, A₂) = E_D E_S[‖ŵ_A₁ − ŵ_A₂‖₂²]
The abbreviation ILWD means implicit linear weight difference. It compares the fitted vectors ŵ_A₁ and ŵ_A₂ by their squared Euclidean distance ‖·‖₂². The expectations average over contexts D and sets S of additional queries. The authors use the known coefficients directly for reference predictors that have them. When a learner’s outputs have nonlinear components, ILWD reports the discrepancy of the linear fits.
The internal test uses probes, auxiliary predictors trained on the frozen network’s states. The target quantities are computed from the prefix independently of the probe. The authors use the feature–label moment vector and the minimum-norm least-squares coefficients. In the broader context of interpretability, the probe asks whether a particular statistic is accessible from a given representation. The paper draws on work on linear classifier probes.
α = softmax(sᵥ)
The vector sᵥ contains learned position scores for the probe’s target v, and α is the corresponding vector of normalized position weights. These weights are learned across probe examples. Once fitted for a target, prefix and layer, they are the same across the sequences given to that probe.
v̂ = FFᵥ(αᵀWᵥH⁽ˡ⁾)
The quantity v̂ is the estimate of the target vector v. This expression uses the paper’s notation for projecting and pooling H⁽ˡ⁾, the frozen states at layer l. The map Wᵥ supplies a learned linear projection, and αᵀ indicates weighted aggregation over positions. FFᵥ maps the pooled representation to the target, either through a linear output or through a multilayer perceptron with nonlinear activation. The authors train on squared error for each target, prefix and layer they examine. The error on held-out states measures recovery, and the position weights show where the probe finds the information useful for that recovery.
Experiments and results
Training and comparison settings
The principal experiments train on synthetic tasks generated from the Gaussian coefficients and features described above. Each training context contains 40 input–label pairs, and the run lasts 500,000 iterations. The authors use Adam, a cosine schedule for the learning rate and a warmup of 1/5 of the training iterations. The training architecture uses learned absolute position embeddings. These embeddings are acquired through the prediction objective, whereas the constructive proofs choose positional information to carry out specific reads.
The architecture search covers depths of 1, 2, 4, 8, 12 and 16 layers, and hidden sizes of 16, 32, 64, 256, 512 and 1024. The choices for the number of heads are 1, 2, 4 and 8. Validation loss selects a configuration with 16 layers, hidden size 512 and 4 heads for the main experiments. The central noiseless comparison uses feature dimension 8. The authors examine several prefix lengths, so a trained network faces queries both when the context leaves coefficients underdetermined and when there is more evidence.
The nearest-neighbor references base their answers on the top-3 closest earlier inputs. The uniform version averages the three observed labels. Its weighted counterpart favors nearer examples using inverse squared distance and normalizes the weights before combining the labels. Both methods make a local prediction from the context without having to estimate one coefficient vector for use at all queries.
The gradient references test both a batch step and a pass of stochastic gradient descent. The batch version pools the examples preceding the query and uses them in a single update from its initial vector. The stochastic version makes a succession of updates, processing the context with batch size 1. Comparisons include different learning rates. Ridge supplies reference predictors for specified penalties, and ordinary least squares supplies the zero-penalty reference. The alternatives thus include local prediction, limited iterative fitting and solutions of the regression objective.
With clean labels, least squares gives the closest predictions
In the noiseless dimension-8 task, the strongest agreement is with ordinary least squares. The paper reports squared disagreement below 0.01 for the close fit over nearly all context sizes, in its discussion of dimension-normalized SPD and ILWD. The comparisons concern closeness of predictions and implicit weights to a reference estimator. The other references fit considerably less closely, with especially weak results for nearest neighbors. The text reports the bound on agreement with least squares and describes the other fits comparatively.
Prefixes shorter than the feature dimension expose the role of the minimum-norm convention. In this region there are directions in which the coefficients can change without altering any of the observations in the prefix. The least-squares reference chooses no component in those directions, which gives the smallest possible norm among the fits. A query can still contain features in those directions, so an estimator that fills them in differently can depart from the least-squares forecast. The observed agreement means that the trained learner predicts as though it mostly shares that convention.
The task distribution gives a reason for such a preference. Before seeing a context, the generator favors no direction and draws its coefficients around zero. The known projections of the coefficient vector can be used in the forecast, while the conditional mean of its component in the unobserved span’s orthogonal complement is zero. On this account, the least-squares agreement reflects how the trained network resolves uncertainty across the distribution of tasks. The authors test that interpretation by varying the reliability of the observations and the variance of the coefficient draws.
With noisy labels, the matching penalty depends on the generator
The noisy experiments perturb the observed labels while retaining a linear relationship underneath. The perturbations have mean zero. The experiment varies their variance and the variance of the Gaussian prior on the coefficients. Greater label noise gives weaker evidence about an unknown coefficient vector at a given context length. Changing the prior variance alters the expected spread of the vector before those observations are available. These are separate sources of uncertainty, and the Bayesian comparison incorporates both.
εᵢ ∼ 𝒩(0, σ²)
The variable εᵢ is added to the label for example i. The symbol ∼ means it is sampled from the distribution to its right. The Gaussian 𝒩 has mean 0 and noise variance σ². The context labels therefore record the underlying function plus these observed perturbations.
For squared error, the optimal forecast at a given query and context is the mean of the label conditional on that information. To see the role of the mean, consider all the labels still possible under the task distribution after seeing the context. Expected squared error is minimized by centering the forecast at their average. The remaining uncertainty contributes to risk even if the forecast is chosen optimally. Averaging this conditional loss over contexts and queries preserves the optimality of the rule.
ŷ = E[y | x, D]
The forecast ŷ is the conditional expectation E of the queried label y, given the feature vector x and the observed dataset D. The vertical bar is read as “given.” Noise with mean zero contributes no offset to the conditional mean at the fresh query.
ŵ = (XᵀX + (σ²/τ²)I)⁻¹ XᵀY
The vector ŵ contains the Bayesian coefficients. The matrix X consists of the observed feature rows, Y contains their noisy labels and I is the feature-space identity. The superscripts ᵀ and ⁻¹ indicate transpose and inverse. σ² is the label noise variance and τ² is the prior variance per coefficient coordinate. Their quotient is the ridge penalty for this forecast. The conditional mean at the query comes from taking the dot product of ŵ with its input. At a fixed prior variance, stronger label noise calls for stronger shrinkage. At a fixed noise variance, a broader coefficient prior calls for weaker shrinkage.
The noisy comparison uses input dimension 8. Its metric, dimension-normalized mean squared prediction difference, or MSPD, averages SPD over the underdetermined context lengths. The authors compare the network with ridge predictions at different penalties. For every tested combination of prior and observation variances, the best-fitting ridge penalty is the one prescribed by the formula for minimum Bayes risk. In the limit of vanishing noise, this Bayesian forecast tends to the least-squares forecast, including the minimum-norm choice when the design remains underdetermined.
Agreement across variance settings makes the test more specific than a comparison at a single tuned penalty. The reference changes according to a rule fixed by the data generator and loss. If the decoder simply showed a general tendency to shrink coefficients, its closest penalty could remain the same or vary in a different way. The experiment shows that its predictions track the penalty chosen jointly by the prior and the noise in the settings examined.
Changing capacity changes the reference fit
The capacity experiments return to clean labels. When varying depth, the authors optimize the other architecture choices in the search. They do the corresponding optimization when varying width. The comparisons use SPD averaged over underdetermined prefixes. This emphasizes settings where several estimates are compatible with the context and the way the predictor settles on an answer can be observed.
The depth sweep has three regimes. At 1L, the paper’s notation for a single layer, the closest baseline is a single batch gradient step, and even that fit is weak in absolute terms. From 2L-4L, ridge gives the closest reference. The group denoted +8L in the paper follows ordinary least squares. A width sweep also changes the character of the fit, including in dimension 16. The reported ridge-like regime occurs at hidden widths of at least 16 for dimension 8 and at least 32 for dimension 16.
Hidden width at the reported ridge-like threshold in noiseless Gaussian regression
The lower-dimensional task reaches the ridge-like regime with fewer hidden coordinates per position.
The numbers
| System or setting | hidden coordinates per position |
|---|---|
| Trained decoder with input dimension 8 (this paper) | 16 |
| Trained decoder with input dimension 16 | 32 |
The chart reports the widths at which the authors identify ridge-like predictions in these comparisons. Width is the measured resource and SPD determines the type of fit. The chart’s values give the threshold settings, while the depth results describe a change in which estimator fits best. In the noisy experiments, ridge agreement follows a statistical penalty derived from the generator. Ridge agreement with clean labels in a capacity sweep can arise even when the Bayes-optimal benchmark for those labels is least squares.
The regression statistic becomes recoverable before the coefficients
The featured probe task uses input dimension 4. The position-weight vector covers a maximum sequence length of 80. The nonlinear readout uses a 2-layer multilayer perceptron with hidden size 512 and GeLU activations. The probe’s Adam learning rate, selected on validation data from 0.01, 0.001 and 0.0001, is 0.001. The learner stays frozen while the authors fit the probes. For each prefix, the targets are the statistic and coefficient vector appropriate to the observations in that prefix.
The feature–label moment becomes predictable by layer 7, while the least-squares coefficient vector becomes predictable around layer 12. Probing the input representation gives much weaker recovery, and the nonlinear readout outperforms the linear probe on both targets. The order of recovery is compatible with a regression computation in which the label-weighted feature sum is available before the final estimate that uses it. The measured layers indicate when the tested readout succeeds.
The position weights add a second observation. For short prefixes, recovery draws primarily on the state at the label that completes the prefix. Causal processing gives this position access to the last observed label along with the earlier evidence. Once the number of observations reaches the feature dimension in the probe task, the figure shows weight also spread across later label positions. The position pattern describes access to relevant information across the sequence, alongside the layer pattern that describes access at different depths.
What the ablations show
Resource changes reveal different levels of fit
The depth and width comparisons expose two questions that a single large decoder would leave entangled. One is which reference rule most closely follows a trained network’s predictions. The other is what architecture setting allows that reference to become a close match. The shallow network is a useful case because its best match is still weak. The ranking of the references gives it a gradient-like description relative to the other candidates, with considerable room for disagreement. At higher capacity, the ordinary least-squares agreement in the main comparison is close in absolute terms as well.
The reference procedures differ in how they can handle the directions only weakly constrained by the examples. A single gradient step moves the fit according to the current errors and the features that produced them. Ridge can use every example to form a solution while shrinking the coefficients. The minimum-norm least-squares reference on clean data preserves the fit along the directions supported by the observations and uses zero in the remaining directions. These differences become visible in the forecasts for short contexts. The results show that architectural resources affect which account of those forecasts is most accurate under the tested training procedure.
The ridge-like width thresholds also bear on the constructive argument. The hand-built step explicitly reserves coordinates for an inverse and its matrix intermediates. The authors take the observed fit at smaller hidden widths as a sign that training can find a more economical way to approximate a ridge-like forecast. A network could distribute information across several sequence positions or compute a different approximation. The experiment measures the quality of the forecasts at those widths. The construction provides a sufficient width for a specified sequence of operations, and the observed agreement leaves open how the trained learner organizes its working state.
The head-count result uses a relative comparison
The appendix extends the sweep to input dimensions 1, 2, 4, 8, 12, 16 and 20. It uses the architecture choices from the main search and the training learning rates 1e-4 and 2.5e-4. At each dimension, the authors vary one capacity setting and optimize the others in the search. The test asks whether the trained predictions have lower SPD to ordinary least squares than to ridge with a penalty of 0.1.
At every tested dimension, a single attention head suffices to meet that condition in a suitably tuned configuration. A decoder with one head in a layer can still make different reads in successive layers and apply a feed-forward transformation after each read. The observation sets a sufficiency result for the comparison with the specified ridge penalty. A predictor can pass the criterion while still differing from both reference predictions, so the reported requirement concerns the relative fit.
The minimum settings found for depth and hidden size show a step-like dependence on dimension. These thresholds come from discrete search choices and reflect the tuned setting of the other quantities. They indicate where the reference ranking changes within the sweep. The result gives no exact resource curve for an arbitrary dimension, and a different criterion for acceptable disagreement could move the thresholds. The main comparison and the sweep complement each other by establishing a close fit in a particular setting and locating a relative transition across a broader range of settings.
Changing the probe and changing the training task
The authors compare linear and nonlinear readouts of the same kinds of frozen states. The nonlinear probe recovers both targets more successfully. The hand-built networks assign numerical intermediates to specified coordinates, so a sufficiently direct read should recover them. The empirical states require a more flexible readout for the recovery reported here. That can reflect how the decoder encodes information and how much of the target calculation the probe performs itself. The comparison gives evidence about accessibility under the tested readouts.
The fixed-coefficient control changes the task seen during training. Its regression coefficient vector always has entries equal to one. A decoder can learn that relationship through its parameters and can predict without estimating a new vector for each sequence. The organization of the feature and label positions still resembles the variable-coefficient task. When it comes time to probe, the authors feed the control the same kind of varied Gaussian relationship used in the main task.
Recovery errors are higher for the control, with substantially poorer recovery of the feature–label moments. A probe that succeeded simply by exploiting the sequence format might also have done well with this control. The observed gap shows that training on tasks with changing relationships affects the accessibility of the statistics. Because the probe sees the same style of inputs at the input layer, the weakness of input-layer recovery also matters. The deeper states give the probe a more useful representation than the initial sequence encoding supplies.
The timing and position comparisons refine that result. The feature–label moment is available to the tested probe before the fitted weights, and the position weights favor states with access to the observations used in the target. For a short prefix, the completing label is an especially informative location because the most recent feature can now be combined with its outcome. These patterns agree with parts of the calculations in the proofs. A readout can establish the availability of the needed ingredients while leaving the trained decoder’s own route from those ingredients to its answer undetermined.
Fitting the coefficients leaves a question about linearity
ILWD compresses the predictions after a fixed prompt into a best-fitting coefficient vector. The authors therefore examine the quality of that fit using R², the coefficient of determination, on the dimension-8 problem. A linear fit could capture coefficients similar to those of ordinary least squares while leaving a residual in the predictions. By examining the fit itself, the authors can detect departures that a comparison of the coefficients would omit.
They find that predictions become gradually more linear across the underdetermined region and that the learned family of query responses has nonlinear behavior there. Here linearity concerns how the answer varies with the query after the context has been held fixed. The mapping from the context to a fitted coefficient vector can itself be complicated even when the query is evaluated by an inner product. The analysis probes the latter dependence and indicates why closeness to least-squares weights can coexist with residual differences from a linear predictor.
The arithmetic can use different activations
A separate analysis asks how the construction depends on GeLU. A smooth activation with a usable quadratic term can support the same cancellation in the small-input range. The appendix also examines tanh, whose series lacks a quadratic term at the origin. It uses shifted evaluations to approximate a derivative and obtain a quadratic contribution from the cubic term. The construction then needs more intermediate activation evaluations than the GeLU version.
For ReLU, the authors illustrate a piecewise-linear approximation to a square. The principle is to approximate the curved function using joined linear segments over the range of interest. These comparisons show alternate ways a feed-forward component can supply arithmetic. Their scope is the construction. The learned regression behavior and the reported probe results come from the training and architectural setup used for those experiments.
Limitations
Limits identified by the authors
The paper studies linear regression and treats richer function classes as an extension. Its conclusion proposes investigating whether early layers could compute nonlinear features before another part of the network fits a predictor. It also proposes taking the method to more substantial instances of in-context learning in language. The regression setting makes every task’s rule, observation process and reference estimate explicit. Applying the method to a new setting would require specifying what counts as a competing predictor and what intermediate quantities would distinguish plausible computations.
The authors separate expressibility from acquisition. Their theorems use deliberately specified weights to obtain an update. Training elsewhere in the paper uses a prediction objective and discovers its own parameters. Constant depth is a statement about one update in each construction. Processing more observations by the same iterative method adds groups of layers. These are upper bounds for the given implementations and leave room for other ways to achieve similar behavior with different use of hidden state.
The proofs use controlled approximations. The authors describe making the operations as precise as the available numerical precision allows. GeLU multiplication uses scaled operands, attention routing concentrates probability through large score gaps, and normalization-based division relies on the divisor dominating the constructed variance. The use of these mechanisms is part of the resource claim. Separately, the authors note that the dimensionality sweep shares other hyper-parameters, including initialization choices, across dimensions. The sweep measures the thresholds obtainable with that search and training procedure.
The authors present the probing evidence as preliminary. The readouts identify particular quantities at particular layers and sequence positions. The recovered values and their order provide partial constraints on an account of the trained calculation. A complete account would track the operations that produce those quantities and explain how their values enter the eventual prediction.
Limits visible in the design
The direct-training setup deliberately rewards using labeled numerical examples from a particular task family. This makes task generation and prediction loss easy to specify. It also limits the link to demonstration use after open-domain training. Surface forms of demonstrations, the range of relationships they can express and the training that exposed the learner to them are all outside the controlled regression comparison. The paper supplies a measured instance of context-dependent estimation under fixed parameters.
The Bayesian result depends on the distributions and the loss. Gaussian coefficients and Gaussian noise give the stated ridge forecast under squared error. The two variances provide a precise test because they prescribe which penalty to compare at each setting. A different prior or observation process could change the optimal rule, and a different loss could change which feature of the conditional distribution supplies the answer. The reported comparison establishes the match over the tested variance settings.
The behavioral metrics average over queries and contexts. Two procedures can look close on average while disagreeing more frequently on some part of that distribution. Different algorithms can also converge to similar estimators, especially in settings that favor the same forecast. SPD says how closely their outputs agree. ILWD describes agreement after fitting a linear response, with the separate R² analysis giving evidence that this response omits some behavior. These measurements narrow the range of plausible descriptions without pinpointing an instruction-by-instruction implementation.
Probe recovery is observational. A successful auxiliary prediction establishes that a readout can recover useful information from the decoder states. The decoder’s own dependence on that information would require a test that changes the relevant internal computation and measures the effect on its predictions. The probe’s learned positional preferences cannot establish that dependence. The fixed-coefficient control also sees varied coefficients during probing after training on a single relationship. The resulting recovery gap can reflect the consequences of that change in distribution as well as the difference in whether training rewarded adaptation to a new relationship.
There are some inconsistencies in the displayed construction details. The regression expressions use a matrix product appropriate for feature rows, even though the initial notation for stacking observations is ambiguous about their orientation. Using design rows gives consistent dimensions. Some appendix bookkeeping also differs from the sign of the penalty contribution in the main gradient update. The positive penalty contribution inside the subtracted gradient follows from the stated squared-norm objective. Those issues matter for reconstructing the layer parameters from the formulas. The estimator comparisons and probe measurements use the separately described empirical setup.
What came after
Optimization as an account of in-context prediction
Other citing papers took the algorithm question in several directions. One focuses directly on gradient descent as an explanation of how transformers learn in context. The regression study had given descent two roles: an update the architecture could be configured to perform and a baseline whose fit varied with capacity. Centering gradient descent makes it important to distinguish a particular limited-step predictor from gradient descent as a possible route to a final estimate. A forecast that resembles solved regression can still leave the route by which it was reached open. Transformers learn in-context by gradient descent.
The work on GPT poses the optimization question in terms of a meta-optimizer. It brings the proposed correspondence between internal computation and a gradient update to the language setting. In the regression experiment, the update has a concrete residual and a task-specific coefficient vector that can be compared with predictions or targeted by a probe. Moving the question to GPT makes the setting and the meaning of the candidate update part of the explanatory problem. Why Can GPT Learn In-Context?.
Learnability is another way to approach the same divide between construction and training. A decoder with chosen parameters can demonstrate that an algorithm is expressible. An account of learnability concerns how effective adaptation can be acquired through training across tasks. The regression paper provides an example of both kinds of inquiry, while the later work makes the acquisition question itself the subject. The Learnability of In-Context Learning.
Finding representations of the task or function
Work on task vectors puts the inferred task’s internal representation at the center of the explanation. Linear regression makes that question unusually concrete because the statistical estimate already has natural coordinates, one for each input feature. The task-vector perspective brings the question of what is stored in the activation state to settings where a target vector need not have that preassigned statistical interpretation. In-Context Learning Creates Task Vectors.
The study of function vectors likewise takes representations of functions as its subject in language systems. The connection to regression is the division of labor between the network’s persistent parameters and its changing state for the current input. In the regression experiment, a function can already be named by a set of coefficients, which provides a defined decoding target. Function-vector work takes up the related question of how a language system represents a function in a form associated with its internal activations. Function Vectors.
Work on in-context vectors through latent-space steering puts these representations to use as a means of controlling behavior. It extends the internal-state question toward deliberate changes to the state. The regression probes measure what can be recovered when the original prediction computation is frozen. A steering study asks how manipulating a representation can influence context-based predictions. In-context Vectors.
Testing what transfers across tasks and sequence settings
A study that separates task recognition from task learning addresses what it means for a prompt to teach a predictor something. The regression tasks sample new coefficients from a familiar population, so the learner can bring knowledge of the population to its estimate of a particular rule. The distinction between recognition and learning directs attention to how much a demonstration helps identify a task and how much it supplies information for a new predictor. What In-Context Learning “Learns” In-Context.
The work on length generalization uses sequence length as a test of what algorithms transformers learn. The regression experiments compare predictions across prefixes of their generated sequences, while the construction explains how an update can be repeated by stacking layers. Generalization in length raises the additional question of what happens when the learned computation faces lengths outside its training setting. This tests another consequence of describing a predictor as an algorithm over the examples it receives. What Algorithms Can Transformers Learn?.
The comparative work on Mamba widens the architectural question to another sequence processor. In the regression study, attention, the feed-forward branch and stored activations give the constructive explanation its specific form. Comparing architectures on in-context learning tasks makes it possible to ask how much the resulting behavior depends on the mechanism for carrying information from observed examples to a query. Can Mamba Learn How to Learn?.
Institutions
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Topics 1Research subjects and languages the work is about.Language models & pretraining · 4,145 works
Cite
Cite as Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma and Denny Zhou. 2022. What learning algorithm is in-context learning? Investigations with linear models. arXiv:2211.15661.
@misc{akyurek2022what,
title = {{What learning algorithm is in-context learning? Investigations with linear models}},
author = {Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma and Denny Zhou},
year = {2022},
doi = {10.48550/arxiv.2211.15661},
eprint = {2211.15661},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2211.15661}
}References
- Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. ArXiv preprint, abs/1610.01644, 2016. URL https://arxiv.org/abs/1610.01644. our card
- Marcin Andrychowicz, Misha Denil, Sergio Gomez Colmenarejo, Matthew W. Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. In Daniel D. Lee, Masashi Sugiyama, Ulrike von Luxburg, Isabelle Guyon, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pp. 3981–3989, 2016. URL https://proceedings.neurips.cc/paper/2016/hash/fb87582825f9d28a8d42c5e5e5e8b23d-Abstract.html. OpenAlex ↗ · Scholar ↗
- Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. ArXiv preprint, abs/1607.06450, 2016. URL https://arxiv.org/abs/1607.06450. OpenAlex ↗ · Scholar ↗
- Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL https://proceedings.neurips.cc/paper/2020/hash/1457c0d6bfcb4967418bfb8ac142f64a-Abstract.html. our card
- Nick Cammarata, Shan Carter, Gabriel Goh, Chris Olah, Michael Petrov, Ludwig Schubert, Chelsea Voss, Ben Egan, and Swee Kiat Lim. Thread: circuits. Distill, 50 (3):0 e24, 2020. OpenAlex ↗ · Scholar ↗
- Stephanie CY Chan, Adam Santoro, Andrew K Lampinen, Jane X Wang, Aaditya Singh, Pierre H Richemond, Jay McClelland, and Felix Hill. Data distributional properties drive emergent few-shot learning in transformers. ArXiv preprint, abs/2205.05055, 2022. URL https://arxiv.org/abs/2205.05055. OpenAlex ↗ · Scholar ↗
- Chi Chen, Maosong Sun, and Yang Liu. Mask-align: Self-supervised neural word alignment. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 4781–4791, Online, 2021. Association for Computational Linguistics. . URL https://aclanthology.org/2021.acl-long.369. OpenAlex ↗ · Scholar ↗
- Yanda Chen, Ruiqi Zhong, Sheng Zha, George Karypis, and He He. Meta-learning via language model in-context tuning. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 719–730, Dublin, Ireland, 2022. Association for Computational Linguistics. . URL https://aclanthology.org/2022.acl-long.53. OpenAlex ↗ · Scholar ↗
- Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. ArXiv preprint, abs/2204.02311, 2022. URL https://arxiv.org/abs/2204.02311. our card
- Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pp. 1126–1135. PMLR, 2017. URL http://proceedings.mlr.press/v70/finn17a.html. our card
- Shivam Garg, Dimitris Tsipras, Percy Liang, and Gregory Valiant. What can transformers learn in-context? a case study of simple function classes. ArXiv, abs/2208.01066, 2022. our card
- Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). ArXiv preprint, abs/1606.08415, 2016. URL https://arxiv.org/abs/1606.08415. OpenAlex ↗ · Scholar ↗
- Arthur E Hoerl and Robert W Kennard. Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 120 (1):0 55–67, 1970. OpenAlex ↗ · Scholar ↗
- Noah Hollmann, Samuel Müller, Katharina Eggensperger, and Frank Hutter. Tabpfn: A transformer that solves small tabular classification problems in a second, 2022. URL https://arxiv.org/abs/2207.01848. OpenAlex ↗ · Scholar ↗
- Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural networks, 20 (5):0 359–366, 1989. OpenAlex ↗ · Scholar ↗
- Louis Kirsch and Jürgen Schmidhuber. Meta learning backpropagation and improving it. Advances in Neural Information Processing Systems, 34:0 14122–14134, 2021. OpenAlex ↗ · Scholar ↗
- Michael Laskin, Luyu Wang, Junhyuk Oh, Emilio Parisotto, Stephen Spencer, Richie Steigerwald, DJ Strouse, Steven Hansen, Angelos Filos, Ethan Brooks, et al. In-context reinforcement learning with algorithm distillation. ArXiv preprint, abs/2210.14215, 2022. URL https://arxiv.org/abs/2210.14215. OpenAlex ↗ · Scholar ↗
- David Marr. Vision: A computational investigation into the human representation and processing of visual information. MIT press, 2010. OpenAlex ↗ · Scholar ↗
- Sewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. MetaICL: Learning to learn in context. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 2791–2809, Seattle, United States, 2022. Association for Computational Linguistics. . URL https://aclanthology.org/2022.naacl-main.201. our card
- Jesse Mu and Jacob Andreas. Compositional explanations of neurons. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL https://proceedings.neurips.cc/paper/2020/hash/c74956ffb38ba48ed6ce977af6727275-Abstract.html. OpenAlex ↗ · Scholar ↗
- Samuel Müller, Noah Hollmann, Sebastian Pineda Arango, Josif Grabocka, and Frank Hutter. Transformers can do bayesian inference. arXiv preprint arXiv:2112.10510, 2021. OpenAlex ↗ · Scholar ↗
- Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, T. J. Henighan, Benjamin Mann, Amanda Askell, Yushi Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, John Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom B. Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Christopher Olah. In-context learning and induction heads. 2022. our card
- Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight programmers. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 9355–9366. PMLR, 2021. URL http://proceedings.mlr.press/v139/schlag21a.html. our card
- Juergen Schmidhuber, Jieyu Zhao, and Marco A Wiering. Simple principles of metalearning. 1996. OpenAlex ↗ · Scholar ↗
- Jack Sherman and Winifred J Morrison. Adjustment of an inverse matrix corresponding to a change in one element of a given matrix. The Annals of Mathematical Statistics, 210 (1):0 124–127, 1950. OpenAlex ↗ · Scholar ↗
- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pp. 5998–6008, 2017. URL https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html. our card
- Colin Wei, Yining Chen, and Tengyu Ma. Statistically meaningful approximation: a case study on approximating turing machines with transformers. ArXiv preprint, abs/2107.13163, 2021. URL https://arxiv.org/abs/2107.13163. OpenAlex ↗ · Scholar ↗
- Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. ArXiv preprint, abs/2111.02080, 2021. URL https://arxiv.org/abs/2111.02080. our card
- Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. ArXiv, abs/2111.02080, 2022. our card
- Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi, and Sanjiv Kumar. Are transformers universal approximators of sequence-to-sequence functions? In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id=ByxRM0Ntvr. our card
- Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer. Opt: Open pre-trained transformer language models, 2022. our card
- Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. International Journal of Computer Vision, 1300 (9):0 2337–2348, 2022. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/akyurek-2022-learning-algorithm-context-learning-investigations/