Test-Time Learning for Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hu, Jinwu, Zhang, Zhitian, Chen, Guohao, Wen, Xutao, Shuai, Chao, Luo, Wei, Xiao, Bin, Li, Yuanqing, Tan, Mingkui
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909624130600960
author Hu, Jinwu
Zhang, Zhitian
Chen, Guohao
Wen, Xutao
Shuai, Chao
Luo, Wei
Xiao, Bin
Li, Yuanqing
Tan, Mingkui
author_facet Hu, Jinwu
Zhang, Zhitian
Chen, Guohao
Wen, Xutao
Shuai, Chao
Luo, Wei
Xiao, Bin
Li, Yuanqing
Tan, Mingkui
contents While Large Language Models (LLMs) have exhibited remarkable emergent capabilities through extensive pre-training, they still face critical limitations in generalizing to specialized domains and handling diverse linguistic variations, known as distribution shifts. In this paper, we propose a Test-Time Learning (TTL) paradigm for LLMs, namely TLM, which dynamically adapts LLMs to target domains using only unlabeled test data during testing. Specifically, we first provide empirical evidence and theoretical insights to reveal that more accurate predictions from LLMs can be achieved by minimizing the input perplexity of the unlabeled test data. Based on this insight, we formulate the Test-Time Learning process of LLMs as input perplexity minimization, enabling self-supervised enhancement of LLM performance. Furthermore, we observe that high-perplexity samples tend to be more informative for model optimization. Accordingly, we introduce a Sample Efficient Learning Strategy that actively selects and emphasizes these high-perplexity samples for test-time updates. Lastly, to mitigate catastrophic forgetting and ensure adaptation stability, we adopt Low-Rank Adaptation (LoRA) instead of full-parameter optimization, which allows lightweight model updates while preserving more original knowledge from the model. We introduce the AdaptEval benchmark for TTL and demonstrate through experiments that TLM improves performance by at least 20% compared to original LLMs on domain knowledge adaptation.
format Preprint
id arxiv_https___arxiv_org_abs_2505_20633
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Test-Time Learning for Large Language Models
Hu, Jinwu
Zhang, Zhitian
Chen, Guohao
Wen, Xutao
Shuai, Chao
Luo, Wei
Xiao, Bin
Li, Yuanqing
Tan, Mingkui
Computation and Language
Artificial Intelligence
Machine Learning
While Large Language Models (LLMs) have exhibited remarkable emergent capabilities through extensive pre-training, they still face critical limitations in generalizing to specialized domains and handling diverse linguistic variations, known as distribution shifts. In this paper, we propose a Test-Time Learning (TTL) paradigm for LLMs, namely TLM, which dynamically adapts LLMs to target domains using only unlabeled test data during testing. Specifically, we first provide empirical evidence and theoretical insights to reveal that more accurate predictions from LLMs can be achieved by minimizing the input perplexity of the unlabeled test data. Based on this insight, we formulate the Test-Time Learning process of LLMs as input perplexity minimization, enabling self-supervised enhancement of LLM performance. Furthermore, we observe that high-perplexity samples tend to be more informative for model optimization. Accordingly, we introduce a Sample Efficient Learning Strategy that actively selects and emphasizes these high-perplexity samples for test-time updates. Lastly, to mitigate catastrophic forgetting and ensure adaptation stability, we adopt Low-Rank Adaptation (LoRA) instead of full-parameter optimization, which allows lightweight model updates while preserving more original knowledge from the model. We introduce the AdaptEval benchmark for TTL and demonstrate through experiments that TLM improves performance by at least 20% compared to original LLMs on domain knowledge adaptation.
title Test-Time Learning for Large Language Models
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2505.20633