Aprendizado em Contexto com Consciência de Ambiguidade em Modelos de Linguagem de Grande Escala
Ambiguity-Aware In-Context Learning with Large Language Models
September 14, 2023
Autores: Lingyu Gao, Aditi Chaudhary, Krishna Srinivasan, Kazuma Hashimoto, Karthik Raman, Michael Bendersky
cs.AI
Resumo
O aprendizado em contexto (ICL, do inglês in-context learning), ou seja, mostrar aos LLMs (Large Language Models) apenas algumas demonstrações específicas da tarefa, tem levado a ganhos subsequentes sem a necessidade de ajuste fino específico para a tarefa. No entanto, os LLMs são sensíveis à escolha dos prompts e, portanto, uma questão crucial de pesquisa é como selecionar boas demonstrações para o ICL. Uma estratégia eficaz é aproveitar a similaridade semântica entre as demonstrações do ICL e as entradas de teste usando um recuperador de texto, o que, no entanto, é subótimo, pois não considera o conhecimento prévio do LLM sobre essa tarefa. A partir de trabalhos anteriores (Min et al., 2022), já sabemos que os rótulos associados às demonstrações enviesam as previsões do modelo. Isso nos leva à nossa hipótese de que considerar o conhecimento existente do LLM sobre a tarefa, especialmente em relação ao espaço de rótulos de saída, pode ajudar em uma estratégia melhor de seleção de demonstrações. Por meio de experimentação extensa em três tarefas de classificação de texto, descobrimos que é benéfico não apenas escolher demonstrações de ICL semanticamente semelhantes, mas também selecionar aquelas que ajudam a resolver a ambiguidade inerente dos rótulos em torno do exemplo de teste. Curiosamente, descobrimos que incluir demonstrações que o LLM classificou erroneamente anteriormente e que também estão na fronteira de decisão do exemplo de teste traz o maior ganho de desempenho.
English
In-context learning (ICL) i.e. showing LLMs only a few task-specific
demonstrations has led to downstream gains with no task-specific fine-tuning
required. However, LLMs are sensitive to the choice of prompts, and therefore a
crucial research question is how to select good demonstrations for ICL. One
effective strategy is leveraging semantic similarity between the ICL
demonstrations and test inputs by using a text retriever, which however is
sub-optimal as that does not consider the LLM's existing knowledge about that
task. From prior work (Min et al., 2022), we already know that labels paired
with the demonstrations bias the model predictions. This leads us to our
hypothesis whether considering LLM's existing knowledge about the task,
especially with respect to the output label space can help in a better
demonstration selection strategy. Through extensive experimentation on three
text classification tasks, we find that it is beneficial to not only choose
semantically similar ICL demonstrations but also to choose those demonstrations
that help resolve the inherent label ambiguity surrounding the test example.
Interestingly, we find that including demonstrations that the LLM previously
mis-classified and also fall on the test example's decision boundary, brings
the most performance gain.