From Implicit Heuristics to Explicit Optimization: A Unified Framework for In-Context Relation Extraction
摘要
In-context learning (ICL) for relation extraction is often undermined by its reliance on implicit heuristics. This weakness is critical in two stages: (1) example selection, where semantic similarity serves as a poor proxy for utility; (2) model reasoning, which depends on unguided attention mechanisms. This reliance on non-optimizable strategies leads to unreliable performance and hinders interpretability. This paper advocates for a fundamental shift from implicit heuristics to explicit optimization and guidance. We introduce CLARE (Contribution-driven Learning and Adaptive REasoning), a unified framework that introduces core innovations to both the example selection and model reasoning stages. For example selection, we propose Predictive Contribution Estimation (PCE), a novel method that trains a retriever to directly optimize for an example’s utility by quantifying its impact on the model’s prediction confidence. For model reasoning, we introduce Adaptive Inference Modulation (AIM), which transforms the unguided inference process into a steerable one by dynamically modulating the model’s internal attention scores. This ensures that the most valuable demonstration information is precisely leveraged. Experiments on four challenging datasets validate that CLARE significantly outperforms mainstream ICL baselines by leveraging explicit contribution estimation and guided inference.