Abstract
Adapting large Pre-trained Language Models (PLMs) to downstream tasks efficiently remains a significant challenge in natural language processing. While prompt learning offers a parameter-efficient alternative to full fine-tuning, it often suffers from brittleness and a lack of context-awareness. This paper introduces CEKFNN (Conditional Extended Kalman Filter based Neural Network), a framework that models prompt learning as a state-estimation problem using an Extended Kalman Filter (EKF). By treating prompt tokens as dynamic latent variables conditioned on input embeddings, CEKFNN achieves performance comparable to or exceeding full fine-tuning across GLUE and SuperGLUE benchmarks while training significantly fewer parameters.
Introduction: The Challenge of Model Adaptation
Pre-trained Language Models (PLMs) such as BERT, GPT, and T5 have revolutionized the field, but their massive scale makes full fine-tuning—updating all parameters for every specific task—prohibitively expensive. Parameter-efficient methods like prompt learning have emerged as a solution, keeping the PLM frozen and using learned "prompt" tokens to guide the model's behavior.
Despite their efficiency, standard prompt learning methods are often "brittle," where minor prompt variations lead to significant performance swings. Moreover, most current methods use static prompts that do not account for the unique semantic nuances of individual input sentences. There is a clear need for a robust, context-aware mechanism for prompt generation that maintains the efficiency of frozen models.
Methodology: The CEKFNN Framework
The researchers propose CEKFNN, which conceptualizes prompt learning through the lens of control theory and Bayesian inference. The core innovation lies in treating prompt tokens not as static strings, but as dynamic hidden states.
The EKF Abstraction
In this framework, prompt tokens are treated as latent variables ($u^t$) and task labels as observed variables ($y^t$). The system is governed by two primary functions:
- Transition Function: This predicts the next prompt state based on the previous state and the current sentence's embedding, allowing prompts to be time-variant and contextually linked.
- Emission Function: The PLM itself acts as the emission function, taking the prompt and sentence embeddings to produce the final output label.
Training Procedure
Optimization follows a two-phase approach. Phase I trains the Prompt Models (PMs) to generate initial tokens. Phase II involves a mutual enhancement loop where PMs and the PLM (augmented with efficient LoRA adapters) are trained alternately. This ensures synchronization between the prompt generator and the language model while keeping the bulk of the PLM frozen.
Experimental Results
CEKFNN was evaluated across 15 tasks in the GLUE and SuperGLUE benchmarks using BERT, GPT-2, and T5 architectures, scaling up to the T5-3B model.
Key findings include:
- Performance Superiority: On the GLUE benchmark with BERT-base, CEKFNN outperformed P-Tuning significantly and even surpassed full fine-tuning on specific tasks like WNLI and CoLA.
- Scalability: The method remained effective when scaled to larger models like T5-3B, outperforming LoRA and P-Tuning on SuperGLUE tasks like BoolQ and RTE.
- Parameter Efficiency: CEKFNN achieved these results by training only ~12.4M parameters for BERT-base, a fraction of the 110M required for full fine-tuning, demonstrating a superior balance of performance and resource usage.
Conclusion
By viewing prompts as hidden states in a dynamical system, CEKFNN provides a principled way to "steer" PLMs with contextual fluidity. This approach bridges the performance gap between prompt learning and full fine-tuning while preserving memory efficiency. Future work may extend this state-space approach to other domains like computer vision or complex generative tasks where dynamic modeling is traditionally robust.
Summary updated