# Poster 30298

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/30298

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hello everyone, thanks for being here. Today I'm going to present our new work, Implicit in Context Learning. So first of all, in Context Learning is great. If you prompt a model with zero-shot learning, it will probably generate the wrong answer. However, if you're providing several demonstration examples and preparing those demonstration examples before the query, then the model can generally yield much better performance.
However, in context learning is also expensive to some extent. For example, if you are going to use the same group of demonstration examples before the query, then you have to either repetitively forward the same demonstration examples for n times if you're using for n different queries, or you can use kvCache, which will cache 2 times m times d times l activations.
Here, M is the number of demonstration tokens and D is the hidden dimension and L is the number of layers of your model. So can we do something else? In this work, we propose implicit in-context learning. Instead of like doing in-context learning in an end-to-end fashion, the implicit in-context learning actually decomposes this process into two different steps.
In step one, the implicit in-context learning collect demonstration vectors for each example independently and then aggregate them in a permutation invariant method to form a unique context vector.
And in step two, it is at inference time. We linearly combine the resulted context vector with the output activations and then re-inject them into the register stream of the model. And by doing so, we actually reduce the caching memory and the inference speed of in -context learning to zero-shot level with minimum performance loss.
One natural question is, okay, since we're using linear combination to combine the context vectors with the output activations, so how do we estimate those linear coefficients? Here we propose a process called noisy self-calibration for this purpose. It is quite simple.
So first of all, we initialize a set of linear coefficients. Then we update those linear coefficients through minimizing the perplexity of the ground truth answer tokens using the same group of demonstration examples. That saying the implicit context learning does not require any external supervision or data. And to improve the robustness of the calibrated linear coefficients, we add some random noises during this process. And it's done.
So another question is, okay, since there's a training process, which is self-calibration, so why implicit in context learning is cheaper than in context learning at all? And our answers are twofold. So first of all, this self-calibration process is extremely lightweight, since we are only updating a dozen of linear coefficients. And the second, because those linear coefficients are like task IDs, and they need to be estimated only once per task and can generalize to...
to icing demonstration examples. Here, as can be seen from the left-hand side and also the right-hand side, the implicit learning achieves the few -shot performance with zero-shot inference cost.
And even though the in -placing constant learning was initially designed for a few-shot scenario, well, it actually has very good scouting properties. And as we increase the number of shots, the performance of the in-placing in-context learning increased correspondingly. And as shown in the table 14, if we are using the calibrated linear coefficients and there's unseen new demonstration example, the performance holds the same.
Thanks for listening. Please check our paper here and the code is also available online. Thanks for listening. Bye-bye.
