MarginSel : Max-Margin Demonstration Selection for LLMs

📅 2025-06-07
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Large language models (LLMs) exhibit performance instability in in-context learning (ICL) due to suboptimal selection of demonstration examples. Method: This paper proposes a two-stage, test-sample-adaptive approach that selects high-difficulty exemplars. It introduces the maximum-margin principle—inspired by SVMs’ decision-boundary optimization—to enhance generalization. The method quantifies example difficulty via prediction confidence and class boundary proximity, employs instance-level dynamic ranking and pruning, and applies a margin-driven filtering mechanism. Contribution/Results: Evaluated across multiple classification benchmarks, the method achieves absolute F1-score improvements of 2–7% over strong baselines—including random and heuristic selection strategies. It offers both theoretical interpretability (grounded in margin theory) and empirical robustness, establishing a novel paradigm for principled ICL exemplar selection.

Technology Category

Application Category

📝 Abstract
Large Language Models (LLMs) excel at few-shot learning via in-context learning (ICL). However, the effectiveness of ICL is often sensitive to the selection and ordering of demonstration examples. To address this, we present MarginSel: Max-Margin Demonstration Selection for LLMs, a two-step method that selects hard demonstration examples for the ICL prompt, adapting to each test instance. Our approach achieves 2-7% absolute improvement in F1-score across classification tasks, compared to a random selection of examples. We also provide theoretical insights and empirical evidence showing that MarginSel induces max-margin behavior in LLMs by effectively increasing the margin for hard examples, analogous to support vectors, thereby shifting the decision boundary in a beneficial direction.
Problem

Research questions and friction points this paper is trying to address.

Improves few-shot learning via better demonstration selection
Adapts demonstration examples to each test instance
Enhances model performance by increasing decision margins
Innovation

Methods, ideas, or system contributions that make the work stand out.

Max-Margin Demonstration Selection method
Adapts to each test instance
Improves F1-score by 2-7%
🔎 Similar Papers
No similar papers found.