凝视结构:以结构对齐引导上下文学习示例选择
STARE at the Structure: Steering ICL Exemplar Selection with Structural Alignment
AI总结:
本文针对语义解析等结构化预测任务中上下文学习示例选择忽视结构对齐的问题,提出一种两阶段策略:先用结构感知监督微调 BERT 检索器,再通过即插即用模块增强句法信息,在多个基准上稳定超越现有方法。
摘要:
上下文学习(In-Context Learning, ICL)已成为一种强大的范式,使大语言模型(LLMs)无需针对特定任务微调即可执行广泛任务。然而,ICL 的有效性在很大程度上取决于示例选择的质量。特别是在语义解析等结构化预测任务中,现有的 ICL 选择策略往往忽视结构对齐,导致性能欠佳且泛化能力差。为解决这一问题,我们提出了一种新颖的两阶段示例选择策略,在效率、泛化性和性能之间实现了良好的平衡。首先,我们使用结构感知监督对基于 BERT 的检索器进行微调,引导其选择既语义相关又结构对齐的示例。然后,我们通过一个即插即用模块增强该检索器,该模块放大隐藏表示中具有句法意义的信息。该插件与模型无关,开销极小,并且可以无缝集成到现有流程中。在涵盖三个语义解析任务的四个基准上的实验表明,在使用多个近期大语言模型作为推理时模型的情况下,我们的方法始终优于现有基线。
英文摘要:
In-Context Learning (ICL) has become a powerful paradigm that enables LLMs to perform a wide range of tasks without task-specific fine-tuning. However, the effectiveness of ICL heavily depends on the quality of exemplar selection. In particular, for structured prediction tasks such as semantic parsing, existing ICL selection strategies often overlook structural alignment, leading to suboptimal performance and poor generalization. To address this issue, we propose a novel two-stage exemplar selection strategy that achieves a strong balance between efficiency, generalizability, and performance. First, we fine-tune a BERT-based retriever using structure-aware supervision, guiding it to select exemplars that are both semantically relevant and structurally aligned. Then, we enhance the retriever with a plug-in module, which amplifies syntactically meaningful information in the hidden representations. This plug-in is model-agnostic, requires minimal overhead, and can be seamlessly integrated into existing pipelines. Experiments on four benchmarks spanning three semantic parsing tasks demonstrate that our method consistently outperforms existing baselines with multiple recent LLMs as inference-time models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。