In-context learning enables language models (LM) to adapt to downstream data or tasks by incorporating few samples as demonstrations within the prompts. It offers strong performance without the expense of fine-tuning. However, the performance of in-context learning can be unstable depending on the quality, format, or order of demonstrations, which in turn exacerbates the difficulty of optimization. Prior work, such as Knn Prompting, index samples based on the similarities of logits at the output-side, in addition to the regular retrieval operation at the input-side. They improve in-context learning by leveraging the core ability of next-token prediction, rather than relying solely on the emergent capacity to make analogies. Despite this, the hard-to-optimize issue of in-context learning still exists. In our view, it stems from the process of selecting demonstrations. To address this, we propose complementing in-context learning with an additional clustering operation. We propose a novel approach "vocabulary-defined semantics". Grounded in LM vocabulary, which is the label space of model outputs, the proposed approach computes semantically equivalent latent representations for output labels. Then, taking the representations as centroids, a clustering operation is performed to align the semantic properties between the language model and the downstream data/tasks. Based on extensive experiments across diverse textual understanding datasets and multiple models, our approach outperforms the state-of-the-art in terms of effectiveness and efficiency. On average, it achieves $3\%-49\%$ improvements while requiring only half of the computation time.
Efficient Latent Semantic Clustering for Scaling Test-Time Computation of LLMs
Department of Computer Science and Engineering, POSTECH, South Korea(计算机科学与工程系,POSTECH,韩国);Graduate School of Artificial Intelligence, POSTECH, South Korea(人工智能研究生院,POSTECH,韩国)
Latent Human Traits in the Language of Social Media: An Open-Vocabulary Approach
Department of Computer Science, Stony Brook University(石溪大学计算机科学系);Melbourne Graduate School of Education, The University of Melbourne(墨尔本大学墨尔本教育研究生院);Judge Business School, University of Cambridge(剑桥大学贾吉商学院);Graduate School of Business, Stanford University(斯坦福大学商学院);Columbia Business School, Columbia University(哥伦比亚大学哥伦比亚商学院);Computer and Information Science, University of Pennsylvania(宾夕法尼亚大学计算机与信息科学系)
Improving Distantly-supervised Entity Typing with Compact Latent Space Clustering
Zhejiang University(浙江大学);University of Illinois at Urbana Champaign(伊利诺伊大学厄巴纳-香槟分校);iFLYTEK Research(科大讯飞研究院);University of Southern California(南加州大学)