Decoding Matters: Addressing Amplification Bias and Homogeneity Issue in Recommendations for Large Language Models (2024)

Abstract: Adapting Large Language Models (LLMs) for recommendation requires careful consideration of the decoding process, given the inherent differences between generating items and natural language. Existing approaches often directly apply LLMs’ original decoding methods. However, we find these methods encounter significant challenges: 1) amplification bias—where standard length normalization inflates scores for items containing tokens with generation probabilities close to 1 (termed ghost tokens), and 2) homogeneity issue—generating multiple similar or repetitive items for a user. To tackle these challenges, we introduce a new decoding approach named Debiasing-Diversifying Decoding ( D^3 ). D^3 disables length normalization for ghost tokens to alleviate amplification bias, and it incorporates a text-free assistant model to encourage tokens less frequently generated by LLMs for counteracting recommendation homogeneity. Extensive experiments on real-world datasets demonstrate the method’s effectiveness in enhancing accuracy and diversity.

## introduction researchers have endeavored to adapt large language models (llms) for recommender systems, seeking to harness the remarkable abilities of llms to improve recommendation performance @xcite @xcite . numerous adaptation solutions have been proposed, with some showcasing notable success. among these, using llms to perform recommendations in a generative manner is particularly promising @xcite @xcite . this approach involves teaching llms to directly generate suitable item * work is done during internship at huawei inc. to generate an item, llms must produce a sequence of tokens representing the item, necessitating multi-step decoding during generation. existing approaches typically adopt original decoding strategies of the utilized language models, such as beam search @xcite @xcite . however, there are distinct disparities between generating recommended items and natural language @xcite . for instance, in terms of the generation space, items only correspond to a specific, nonuniformly sampled subset of the entire language space; in terms of generation results, a set of items should be recommended, as opposed to only ond appriopriate language output required in typical nlp tasks. these distinctions potentially introduce new challenges for directly applying the heuristic decoding strategies. this work delves into studying the decoding process of llms for generating recommendations. we identified two potential critical issues for applying the original decoding strategies of llms: • amplification bias: due to the non-uniform distribution of items in the language space, some items may contain tokens with generation probabilities close to 1 under certain conditions (referred to as ghost tokens). existing decoding methods tend to enhance the scores for these items. typically, these methods utilize length normalization to counteract the length bias during generation @xcite -longer sequences tend to have lower probabilities than shorter sequences merely due to the multiplication of probabilities for each token. however, when ghost tokens appear, multiplying their generation probabilities (near 1) doesn't significantly decrease the final score, but length normalization is still applied, resulting in score amplification. both amplification bias and homogeneity issues would undeniably exert substantial influences on recommendation quality, impacting factors such as accuracy and diversity. addressing these issues is crucial. however, this endeavor is undoubtedly non-trivial. as discussed, the emergence of amplification bias is intricately linked with the process of addressing the length bias of llms' generation. therefore, it's crucial to navigate addressing amplification bias without reintroducing the length bias. meanwhile, to address the homogeneity issue, we must enhance the generation probability of tokens in llm that receive less attention. however, there is a lack of clear guidance on how to balance the original predictions with enhancing less attention tokens and which tokens to select. to this end, we introduce a novel strategy called debiasing-diversifying decoding (d 3 ). to mitigate amplification bias while still addressing length bias, d 3 considers selectively applying length normalization to tokens while excluding it for ghost tokens. when implementing, we find that excluding ghost tokens results in relatively uniform item lengths, making the remaining length normalization unnecessary. consequently, d 3 removes all length normalization during decoding, facilitating its implementation. to tackle the homogeneity issue, d 3 incorporates scores from a text-free assistant model at each decoding step to guide token generation. this helps avoid generating similar and repetitive items, as the text-free model is not influenced by repetitive text and can provide meaningful non-repeated/non-similar token suggestions based on its recommendation capabilities. in total, our contribution is as follows: in this section, we will briefly introduce the development and status of the related fields of this article, mainly including llms for recommender systems and decoding strategies for language models. ## preliminary in this section, we will introduce the background knowledge of the decoding process of current llmbased recommender (recllm) methods. considering the decoding process, the model takes an instruction input and a sequence of user historical interactions to generate a suitable token sequence representing a recommended item. our input, of length n, is denoted as @xmath0, where each x i is a token from the model's vocabulary v . during decoding, an item is represented by generating a sequence of tokens having length m, denoted as @xmath1. at decoding time, tokens are generated iteratively, one at a time, conditioned on the previous context and expect to select the output with the highest probability: beam search. due to the limitations of greedy decoding methods, which can only generate a single item and often fail to find the optimal sequence of items @xcite , researchers currently using llms for recommendation typically employ beam search methods to generate multiple items simultaneously @xcite . in detail, the formula for calculating the score for a hypothesis h at step t in beam search is: the beam search keeps track of the top b hypotheses at each step based on their scores, where b is the beam width. it then expands each of these hypotheses by considering the k most likely tokens. the new hypotheses are scored according to the above formula, and the top b hypotheses are retained for the next step. this process continues until an end-of-sequence token is predicted or the maximum sequence length is reached. moreover, in natural language generation, to avoid repetitiveness and overly long outputs, a length normalization term is typically added after the generation is complete. ## issues for existing decoding method in this section, we elaborate on the amplification bias and homogeneity issues of the existing decoding method, clarifying our motivation. ## debiasing-divesifying decoding next, we introduce debiasing-diversifying decoding, which incorporates two new designs into the existing method to address the two issues. remove amplification bias. to address amplification bias, according to its source, an intuitive approach is to exclude ghost tokens when calculating the sequence length for normalization in eq. ( 3 ). in essence, apply length normalization only to normal tokens. however, our analysis reveals that removing these tokens results in item token sequences with a much uniform length distribution, making length normalization for the remaining tokens unnecessary 2 . therefore, we opt to directly eliminate the length normalization to neutralize the impact of the ghost token and remove the amplification bias for the decoding. ## analysis this section further explores our decoding approach in detail and discusses potential extensions. first, we conduct an ablation analysis to validate the influence of our two key strategies on recommendation accuracy. we then examine the impact of the method's designs on recommendation diversity and investigate an extension of our methods which can enable easy adjustment of the recommendation type distribution. finally, we validate the generalizability of the proposed method using additional backbones, approaches, and datasets. ## conclusion in this paper, we begin by conducting a comprehensive analysis of the decoding strategies currently used in llms for recommendation, highlighting the critical role of the decoding process. during the analysis, we identify two major issues in existing methodologies: (1) amplification bias, i.e., amplifying scores for items with ghost tokens, and (2) homogeneity issue, i.e., generating highly similar recommendations and easy-to-produce recommendations with textual features similar to historical interactions this work introduces a novel approach, d 3 , to address the issues by eliminating length normalization and incorporating a text-free model to assist in decoding. extensive experimental results demonstrate that d 3 could significantly enhance recommendation accuracy and diversity. furthermore, the method can be generalized to non-text generative recommendation frameworks, such as tiger, indicating its versatility and effectiveness in improving recommendation systems.