# Poster 30727

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

> 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.

Hi, I'm Wu Tianhe, and thank you for interesting our work. So let's start. First, we all know that the transformers are really expensive with quadratic time and linear space complexity. This is particularly relevant when processing speech because speech inputs are generally much longer than the corresponding text. To handle this problem, there is a large number of alternatives to draw attention.
like the low rank attention or link former, restricted or sparse attention, and the recent recurrent models or linear attention models like Mamba. But how can we make use of these new models? The pre-trained parameters of these models are often not available, especially on speech, and we can't do pre-training on each new model that appears every other day.
So we want to find some way that is fast and cheap. So what I want to do is to convert existing pre-trained transformers into the target model. We want to use only the downstream target data to avoid doing the pre-training again while we want to keep the performance of the standard transformer. So how can we do that?
Sure, we want to do knowledge transfer from the original transformer. The most direct way to do that is to do parameter transfer to only replace the attention layer with, for example, member layers and we keep the other parameters and then do fine-tuning.
But we can further transfer the behavior of the original transformer model to reproduce the hidden states of the transformer by what we call layer-wise distillation. More specifically, we combine three terms of loss during fine -tuning the original pocket-task cross -entropy loss, the KL divergence between the outputs from the teacher transformer and our student model,
And the layer-wise distillation loss, the L2 loss between the hidden states of the teacher model and the student model. But we still have some questions. First, which is the teacher model? Of course, we can use the final fine-tuned transformer as the teacher. We call it target guided.
But we know that the pre-trained model prior to any fine-tuning actually carries important knowledge that is relevant to the fine-tuning process, but will be eventually lost during the process. So we want to take the original model into account and reproduce the whole trajectory of the fine-tuning process of the original transformer. Following this idea, we implement what we call trajectory or waypoint guided distillation.
Second, the installation loss will add extra constraints to the fine-tuning. So the loss term on the target task can be just suboptimal. Therefore, another idea is at the halfway of the target-guided fine-tuning that goes from the original student straightly towards the target teacher model.
We remove this constraint when we remove the distillation last term at the midway and allow the model to be trained more freely. We call this hybrid distillation. This is different from what we mentioned above, the trajectory or waypoint guided distillation that tries to replicate the fine-tuning trajectory of the original transformer.
To examine our idea, we have three sets of experiments. Conversion from Roberta to Linfoamer on NLP tasks, conversion from Wave2Vec2 to bidirectional Mamba2 on speech tasks, and an extra set of experiments to convert from PC1B to Mamba on zero-shot language modeling tasks. The empirical results actually match our expectation.
The unguided conversion simply doesn't work, and our guided conversion methods will successfully match the performance of the standard transformer here. And there are more details in our paper including the results on language modeling and speech and also the visualization of the actual training trajectory. So here are the takeaways.
And thank you for listening.
