Large language models have shown their ability to become effective few-shot learners with prompting, revoluting the paradigm of learning with data scarcity. However, this approach largely depends on the quality of prompt initialization, and always exhibits large variability among different runs. Such property makes prompt tuning highly unreliable and vulnerable to poorly constructed prompts, which limits its extension to more real-world applications. To tackle this issue, we propose to treat the hard prompt and soft prompt as separate inputs to mitigate noise brought by the prompt initialization. Furthermore, we optimize soft prompts with contrastive learning for utilizing class-aware information in the training process to maintain model performance. Experimental results demonstrate that \sysname outperforms state-of-the-art methods by 7.20% in accuracy and reduces the standard deviation by 2.02 on average. Furthermore, extensive experiments underscore its robustness and stability across 7 datasets covering various tasks.
翻译:大型语言模型已展现出通过提示成为高效少样本学习器的能力,这彻底改变了数据稀缺场景下的学习范式。然而,该方法高度依赖提示初始化的质量,且不同运行间常呈现出显著变异性。这种特性使得提示调优高度不可靠且易受劣质提示构建的影响,从而限制了其在真实世界应用中的推广。为解决该问题,我们提出将硬提示和软提示视为独立输入处理,以缓解提示初始化带来的噪声。此外,我们采用对比学习优化软提示,在训练过程中利用类别感知信息以维持模型性能。实验结果表明,本方法在准确率上平均领先现有最优方法7.20%,并将标准差平均降低2.02。进一步,在覆盖多种任务的7个数据集上的大量实验凸显了其鲁棒性和稳定性。