Table of Contents
Fetching ...

Recurrent Alignment with Hard Attention for Hierarchical Text Rating

Chenxi Lin, Jiayu Ren, Guoxiu He, Zhuoren Jiang, Haiyan Yu, Xiaomin Zhu

TL;DR

A novel framework for hierarchical text rating utilizing LLMs, which incorporates Recurrent Alignment with Hard Attention (RAHA), Inspired by the gradual stabilization of the Markov Chain, which outperforms existing state-of-the-art methods on three hierarchical text rating datasets.

Abstract

While large language models (LLMs) excel at understanding and generating plain text, they are not tailored to handle hierarchical text structures or directly predict task-specific properties such as text rating. In fact, selectively and repeatedly grasping the hierarchical structure of large-scale text is pivotal for deciphering its essence. To this end, we propose a novel framework for hierarchical text rating utilizing LLMs, which incorporates Recurrent Alignment with Hard Attention (RAHA). Particularly, hard attention mechanism prompts a frozen LLM to selectively focus on pertinent leaf texts associated with the root text and generate symbolic representations of their relationships. Inspired by the gradual stabilization of the Markov Chain, recurrent alignment strategy involves feeding predicted ratings iteratively back into the prompts of another trainable LLM, aligning it to progressively approximate the desired target. Experimental results demonstrate that RAHA outperforms existing state-of-the-art methods on three hierarchical text rating datasets. Theoretical and empirical analysis confirms RAHA's ability to gradually converge towards the underlying target through multiple inferences. Additional experiments on plain text rating datasets verify the effectiveness of this Markov-like alignment. Our data and code can be available in https://github.com/ECNU-Text-Computing/Markov-LLM.

Recurrent Alignment with Hard Attention for Hierarchical Text Rating

TL;DR

A novel framework for hierarchical text rating utilizing LLMs, which incorporates Recurrent Alignment with Hard Attention (RAHA), Inspired by the gradual stabilization of the Markov Chain, which outperforms existing state-of-the-art methods on three hierarchical text rating datasets.

Abstract

While large language models (LLMs) excel at understanding and generating plain text, they are not tailored to handle hierarchical text structures or directly predict task-specific properties such as text rating. In fact, selectively and repeatedly grasping the hierarchical structure of large-scale text is pivotal for deciphering its essence. To this end, we propose a novel framework for hierarchical text rating utilizing LLMs, which incorporates Recurrent Alignment with Hard Attention (RAHA). Particularly, hard attention mechanism prompts a frozen LLM to selectively focus on pertinent leaf texts associated with the root text and generate symbolic representations of their relationships. Inspired by the gradual stabilization of the Markov Chain, recurrent alignment strategy involves feeding predicted ratings iteratively back into the prompts of another trainable LLM, aligning it to progressively approximate the desired target. Experimental results demonstrate that RAHA outperforms existing state-of-the-art methods on three hierarchical text rating datasets. Theoretical and empirical analysis confirms RAHA's ability to gradually converge towards the underlying target through multiple inferences. Additional experiments on plain text rating datasets verify the effectiveness of this Markov-like alignment. Our data and code can be available in https://github.com/ECNU-Text-Computing/Markov-LLM.
Paper Structure (26 sections, 10 equations, 4 figures, 7 tables, 1 algorithm)

This paper contains 26 sections, 10 equations, 4 figures, 7 tables, 1 algorithm.

Figures (4)

  • Figure 1: A comparison between a typical LLM and our RAHA in processing hierarchical text rating task. While a typical LLM treats the input as plain text, our RAHA captures hierarchical structures and can straightforwardly provide task-specific rating score.
  • Figure 2: The overview of RAHA architecture. A frozen LLM determines connections and generates updates with hard attention scores to filter noise. RAHA incorporates an adapter and fully connected layer within a trainable LLM to predict text rating scores after aggregating updates. During training and testing, the predicted score is fed back into the trainable LLM prompt, refining predictions over multiple iterations.
  • Figure 3: Comparison of predictions over multiple iterations during recurrent alignment across three datasets. Figures (a), (c), and (e) show outcomes with the initial prompt set to None. Figures (b), (d), and (f) show results with the initial prompt randomly chosen from -1 to 1.
  • Figure 4: A detailed analysis based on the Kullback-Leibler (KL) divergence over testing iterations across three datasets. It highlights the narrowing gap between the representation of the fine-tuned LLM and the target representation during the recurrent alignment process.