Peyman Hosseini
Author directory2026
CG-TTRL: Context-Guided Test-Time Reinforcement Learning for On-Device Large Language Models
Peyman Hosseini | Ondrej Bohdal | Taha Ceritli | Ignacio Castro | Matthew Purver | Mete Ozay | Umberto Michieli
Transactions of the Association for Computational Linguistics, Volume 14
Peyman Hosseini | Ondrej Bohdal | Taha Ceritli | Ignacio Castro | Matthew Purver | Mete Ozay | Umberto Michieli
Transactions of the Association for Computational Linguistics, Volume 14
Test-Time Reinforcement Learning (TTRL) has shown promise in adapting foundation models for complex tasks at test time, resulting in large performance improvements. TTRL leverages an elegant two-phase sampling strategy: first, multi-sampling derives a pseudo-label via majority voting, while subsequent downsampling and reward-based fine-tuning encourages the model to explore and learn diverse valid solutions, with the pseudo-label modulating the reward signal. Meanwhile, In-Context Learning has been widely explored at inference time to enhance model performance without weight updates. However, TTRL’s two-phase sampling strategy under-utilizes contextual guidance, which can potentially improve pseudo-label accuracy in the initial exploitation phase while regulating exploration in the second. To address this, we propose Context-Guided TTRL (CG-TTRL), integrating context dynamically into both sampling phases and propose a method for efficient context selection for on-device applications. Our evaluations on mathematical and scientific QA benchmarks show CG-TTRL outperforms TTRL (e.g. additional 7% relative accuracy improvement over TTRL), while boosting efficiency by obtaining strong performance after only a few steps of Test-Time Training (e.g. 8% relative improvement rather than 1% over TTRL after 3 steps).
2025
Efficient Solutions For An Intriguing Failure of LLMs: Long Context Window Does Not Mean LLMs Can Analyze Long Sequences Flawlessly
Peyman Hosseini | Ignacio Castro | Iacopo Ghinassi | Matthew Purver
Proceedings of the 31st International Conference on Computational Linguistics
Peyman Hosseini | Ignacio Castro | Iacopo Ghinassi | Matthew Purver
Proceedings of the 31st International Conference on Computational Linguistics
Large Language Models (LLMs) have demonstrated remarkable capabilities in comprehending and analyzing lengthy sequential inputs, owing to their extensive context windows that allow processing millions of tokens in a single forward pass. However, this paper uncovers a surprising limitation: LLMs fall short when handling long input sequences. We investigate this issue using three datasets and two tasks (sentiment analysis and news categorization) across various LLMs, including Claude 3, Gemini Pro, GPT 3.5 Turbo, Llama 3 Instruct, and Mistral Instruct models. To address this limitation, we propose and evaluate ad-hoc solutions that substantially enhance LLMs’ performance on long input sequences by up to 50%, while reducing API cost and latency by up to 93% and 50%, respectively.
2023
Lon-eå at SemEval-2023 Task 11: A Comparison of Activation Functions for Soft and Hard Label Prediction
Peyman Hosseini | Mehran Hosseini | Sana Al-azzawi | Marcus Liwicki | Ignacio Castro | Matthew Purver
Proceedings of the 17th International Workshop on Semantic Evaluation (SemEval-2023)
Peyman Hosseini | Mehran Hosseini | Sana Al-azzawi | Marcus Liwicki | Ignacio Castro | Matthew Purver
Proceedings of the 17th International Workshop on Semantic Evaluation (SemEval-2023)
We study the influence of different activation functions in the output layer of pre-trained transformer models for soft and hard label prediction in the learning with disagreement task. In this task, the goal is to quantify the amount of disagreement via predicting soft labels. To predict the soft labels, we use BERT-based preprocessors and encoders and vary the activation function used in the output layer, while keeping other parameters constant. The soft labels are then used for the hard label prediction. The activation functions considered are sigmoid as well as a step-function that is added to the model post-training and a sinusoidal activation function, which is introduced for the first time in this paper.