arXiv:2504.19395cs.CL2025-04EMNLP被引 4

用密码替换法测试大模型能否在上下文学习中真正‘学习’

ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Ciphers

  • 设计可逆密码替换任务,让模型需解码才能完成
  • 可逆任务下模型表现优于不可逆基线,差距稳定存在
  • 为评估大模型上下文学习中的真实‘学习’能力提供新方法

近期研究指出,上下文学习(ICL)存在两种模式:任务检索(复用预训练知识)与任务学习(推理时从示范中‘学习’)。但二者难以分离。本文提出 ICL CIPHERS,一种基于密码学中替换密码的任务重构方法。该方法将上下文输入中的部分词替换为无关词,使句子对人类难以理解,但保持一一对应(可逆)的隐含规律,任务本质仍明确。我们考察大模型在可逆与不可逆替换任务下的表现,发现其在可逆条件下显著更优,且该差异在四个数据集和六种模型上一致存在。进一步分析模型内部表征,发现其具备解码加密输入的能力。

原文摘要 · Abstract (English)

Recent works have suggested that In-Context Learning (ICL) operates in dual modes, i.e. task retrieval (remember learned patterns from pre-training) and task learning (inference-time ''learning'' from demonstrations). However, disentangling these the two modes remains a challenging goal. We introduce ICL CIPHERS, a class of task reformulations based on substitution ciphers borrowed from classic cryptography. In this approach, a subset of tokens in the in-context inputs are substituted with other (irrelevant) tokens, rendering English sentences less comprehensible to human eye. However, by design, there is a latent, fixed pattern to this substitution, making it reversible. This bijective (reversible) cipher ensures that the task remains a well-defined task in some abstract sense, despite the transformations. It is a curious question if LLMs can solve tasks reformulated by ICL CIPHERS with a BIJECTIVE mapping, which requires ''deciphering'' the latent cipher. We show that LLMs are better at solving tasks reformulated by ICL CIPHERS with BIJECTIVE mappings than the NON-BIJECTIVE (irreversible) baseline, providing a novel approach to quantify ''learning'' in ICL. While this gap is small, it is consistent across the board on four datasets and six models. Finally, we examine LLMs' internal representations and identify evidence in their ability to decode the ciphered inputs.

上下文学习大模型行为可逆性测试

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。