[Paper Review] Conditional Adapters: Parameter-efficient Transfer Learning with Fast Inference
This paper introduces Conditional Adapters (CoDA), a parameter-efficient transfer learning method that accelerates inference by selectively activating only important input tokens through a soft top-k routing mechanism. CoDA achieves 2x to 8x faster inference than standard adapters with minimal to no accuracy drop across NLP, vision, and speech tasks, enabling efficient deployment of large pretrained models without retraining.
We propose Conditional Adapter (CoDA), a parameter-efficient transfer learning method that also improves inference efficiency. CoDA generalizes beyond standard adapter approaches to enable a new way of balancing speed and accuracy using conditional computation. Starting with an existing dense pretrained model, CoDA adds sparse activation together with a small number of new parameters and a light-weight training phase. Our experiments demonstrate that the CoDA approach provides an unexpectedly efficient way to transfer knowledge. Across a variety of language, vision, and speech tasks, CoDA achieves a 2x to 8x inference speed-up compared to the state-of-the-art Adapter approaches with moderate to no accuracy loss and the same parameter efficiency.
Motivation & Objective
- To address the inefficiency of standard parameter-efficient methods like adapters, which maintain full inference speed despite reduced parameter updates.
- To enable both parameter efficiency and inference efficiency in transfer learning for large pretrained models.
- To develop a routing mechanism that dynamically selects only the most relevant input tokens for heavy computation, reducing inference cost.
- To demonstrate that conditional computation via soft top-k routing can maintain model accuracy while significantly improving speed.
- To show that existing dense models can be efficiently converted into CoDA models with minimal or no router pretraining.
Proposed method
- CoDA extends standard adapters by introducing a learnable router that applies a soft top-k operation to select a sparse subset of input tokens for full Transformer computation.
- The router uses entropy-regularized optimization, enabling differentiable and fast iterative computation of token selection decisions.
- Only the selected tokens are processed by the full pretrained Transformer blocks, while the rest are passed through lightweight adapter layers, reducing computation.
- The method preserves the pretrained model weights and only fine-tunes a small number of new parameters, ensuring parameter efficiency.
- The soft top-k operation generalizes hard top-k and allows end-to-end training of the routing policy for optimal task performance.
- CoDA can be combined with other parameter-efficient methods like LoRA to further accelerate inference.
Experimental results
Research questions
- RQ1Can conditional computation be used to achieve both parameter efficiency and inference efficiency in transfer learning?
- RQ2How effective is a soft top-k routing mechanism in selecting meaningful input tokens for sparse computation without sacrificing accuracy?
- RQ3To what extent can existing dense pretrained models be converted into CoDA models with minimal or no additional training?
- RQ4How does CoDA compare to standard adapters in terms of speed-accuracy trade-offs across diverse modalities?
- RQ5Can CoDA maintain performance on tasks with high input sparsity, such as document and image-based question answering?
Key findings
- CoDA achieves up to 8x faster inference than standard adapters on OCR-VQA with only a 0.1% drop in exact match accuracy.
- On Librispeech, CoDA maintains word error rates of 1.4–2.8 with 2.2x to 19.4x speedup across model sizes, matching fully fine-tuned baselines.
- On vision tasks, CoDA achieves 13.5x speedup with only a 1-point drop in EM on OCR-VQA when reducing routed tokens to 1/16th of the sequence length.
- Visualizations confirm that the router learns to select meaningful, representative image patches while avoiding low-information regions like whitespace.
- CoDA achieves comparable performance to fully fine-tuned models (e.g., w2v-BERT, BEST-RQ) while being significantly faster and more parameter-efficient.
- The method requires little to no router pretraining, enabling rapid conversion of existing dense models into efficient CoDA models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.