Hybrid identifier generation-based recommendation method and system based on local collaborative context

By using multi-granularity user group estimation and residual hybrid identifier construction, the problem of integrating diverse user preferences in generative recommender systems is solved, improving the accuracy and robustness of recommendations and achieving more accurate personalized recommendations.

CN121980091BActive Publication Date: 2026-06-26QINGDAO UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610450160.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-08
Publication Date
2026-06-26
Estimated Expiration
2046-04-08

AI Technical Summary

Technical Problem

Existing generative recommendation systems cannot effectively integrate users' diverse long-term and short-term preferences, leading to negative transfer problems when the model faces users with diverse interests, thus reducing recommendation accuracy.

Method used

By estimating user groups at multiple granularities, and utilizing residual hybrid identifiers to fuse static semantic stability and dynamic context awareness, a hybrid identifier generative recommendation method based on local collaborative context is constructed. This method includes multi-granular clustering, hybrid identifier construction, and instruction fine-tuning, thereby improving the recommendation accuracy of large language models.

Benefits of technology

It effectively integrates users' long-term and short-term preferences, improves the accuracy and robustness of generative recommendations, avoids negative transfer problems, and enhances the level of personalized recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121980091B_ABST
    Figure CN121980091B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence, and specifically relates to a hybrid identifier generation type recommendation method and system based on local collaborative context, acquires a user historical interaction sequence, carries out multi-granularity clustering on the user to obtain a group of each user; a static identifier is constructed based on item content, a dynamic identifier is constructed in combination with user group information and local interaction sequence, and a hybrid identifier of each item is fused and generated; an instruction fine-tuning task is constructed, group information is embedded into an instruction prompt, a large language model is used to learn to generate a hybrid identifier of a next item from a historical sequence; and a recommendation result is generated based on the optimized large language model according to a historical sequence of a target user and group information of the target user. The application fuses local collaborative context through multi-granularity group estimation, combines static and dynamic identifiers to construct a hybrid item representation, effectively solves the problems of single user interest modeling and missing semantics of item representation, and improves the accuracy and personalized level of the generation type recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically a hybrid identifier generative recommendation method and system based on local collaborative context. Background Technology

[0002] The statements in this section merely refer to the background art related to this invention and do not necessarily constitute prior art.

[0003] Generative recommender systems are a hot research topic at the intersection of artificial intelligence and recommender systems. They aim to generate representations of items a user might be potentially interested in using deep learning models, rather than simply filtering from a predefined candidate set. Currently, researchers are attempting to apply large language models to generative recommender tasks, leveraging their powerful semantic understanding and knowledge transfer capabilities to improve recommendation performance.

[0004] However, current methods primarily rely on individual users' historical interaction sequences and global user identifiers (ID information) for preference learning, forcing the model to infer user interests solely from global collaborative signals. This modeling approach ignores the diversity and dynamic nature of user interests. In practical applications, users often possess multiple dimensions of interest preferences simultaneously, and these interests may exhibit different characteristics over time. For example, long-term interests are relatively stable and suitable for large-scale user groupings; short-term interests reflect recent behavioral tendencies and can achieve more accurate alignment between users with similar new interests. Existing methods cannot effectively integrate user preference information at different granularities, leading to negative transfer problems when the model faces users with diverse interests. That is, indiscriminately mixing interaction data from users with significantly different interests actually reduces recommendation accuracy. Summary of the Invention

[0005] This invention provides a generative recommendation method and system based on hybrid identifiers with local collaborative context. It captures users' long-term and short-term preferences through multi-granularity user group estimation, utilizes residual hybrid identifiers to fuse static semantic stability and dynamic context awareness, and injects group collaborative information into a large language model through context-guided fine-tuning. By first finely segmenting users, then constructing enhanced item representations, and finally allowing the model to learn recommendations under group guidance, the accuracy and robustness of generative recommendations are improved.

[0006] The first aspect of this invention discloses a hybrid identifier generative recommendation method based on local collaborative context, comprising the following steps:

[0007] Obtain the user's historical interaction sequence, extract the user's long-term preference representation and short-term preference representation; perform coarse-grained clustering on the long-term preference representation and fine-grained clustering on the short-term preference representation to obtain the final group assigned to each user;

[0008] Static identifiers are constructed based on the content data of items in historical interaction sequences; local interaction sequences are extracted based on the user's historical interaction sequences, and dynamic identifiers are constructed by combining the user's group information; a hybrid identifier for each item is generated by merging the static and dynamic identifiers.

[0009] A command fine-tuning task is constructed, which embeds the user's final assigned group information into the command prompt, takes the user's historical sequence as input, and takes the hybrid identifier of the next item as the target output; by optimizing the parameters of the large language model, it learns to generate the hybrid identifier of the next item from the historical sequence.

[0010] Recommendation results are generated based on the target user's historical interaction sequence and group information, using an optimized large language model.

[0011] Furthermore, the user's long-term and short-term preference representations are extracted. Specifically, the user's complete historical interaction sequence is encoded using a pre-trained BERT model to obtain the long-term preference representation; the user's local interaction sequence of the most recent d items is encoded using a pre-trained BERT model to obtain the short-term preference representation.

[0012] Furthermore, coarse-grained clustering is performed on the long-term preference representation, and fine-grained clustering is performed on the short-term preference representation. Specifically, the long-term preference representation and the short-term preference representation are clustered separately to obtain coarse-grained groups and fine-grained groups. Using the coarse-grained clustering results as constraints, the fine-grained clustering results are iteratively optimized through a reward function with enhanced temporal stability and an Actor-Critic framework to obtain the final group assigned to each user.

[0013] Furthermore, iterative optimization of fine-grained clustering results also includes: pre-optimizing fine-grained cluster centers through a variance-aware adaptive learning rate mechanism before strategy optimization; and adjusting the learning rate according to changes in the variance of rewards among users to improve the stability of cluster center updates.

[0014] Furthermore, a static identifier is constructed by performing multi-level quantization on the item content using a pre-trained residual quantization variational autoencoder, generating a set of discrete codes from multiple codebooks as static identifiers; and optimizing the codebook parameters through a quantization loss function so that the static identifiers retain the core semantic information of the item.

[0015] Furthermore, dynamic identifiers are constructed by extracting the user's local interaction sequence based on the user's historical interaction sequence, determining the d items the user has recently interacted with, and combining them with the user's group information to guide the large language model to generate dynamic contextual semantic tags for the d items, thereby constructing dynamic identifiers; starting from the residual after encoding the static identifier, codewords are selected step by step through residual quantization to construct dynamic identifiers.

[0016] Furthermore, constructing dynamic identifiers also includes: using a diversity regularization loss function to make items with the same static identifiers closer to each other in the semantic space, and items with different static identifiers farther apart, thus ensuring the semantic distinguishability of dynamic identifiers.

[0017] Furthermore, generating a hybrid identifier for each item also includes: aggregating the encoding embeddings of static identifiers at all levels with the encoding embeddings of dynamic identifiers at all levels to obtain quantized embeddings; reconstructing semantic information through a decoder, constructing a semantic reconstruction loss function, and ensuring the semantic fidelity of the hybrid identifier.

[0018] Furthermore, the constructed instruction fine-tuning tasks include identifier-to-identifier symmetric prediction tasks, identifier-to-text asymmetric prediction tasks, and text-to-identifier asymmetric prediction tasks.

[0019] For the identifier-to-identifier symmetric prediction task, take a sequence of mixed identifiers of a user's historical items as input and output the mixed identifier of the next item.

[0020] For the asymmetric prediction task from identifier to text, take a mixed identifier sequence of a user's historical items as input and output a text description of the next item;

[0021] For the asymmetric prediction task from text to identifier, take a text description of a user's past items as input and output a mixed identifier for the next item.

[0022] A second aspect of the present invention discloses a hybrid identifier generative recommender system based on local collaborative context, comprising:

[0023] The multi-granularity group estimation module is configured to: acquire the user's historical interaction sequence, extract the user's long-term preference representation and short-term preference representation; perform coarse-grained clustering on the long-term preference representation and fine-grained clustering on the short-term preference representation to obtain the final group assigned to each user;

[0024] The hybrid identifier construction module is configured to: construct static identifiers based on the content data of items in the historical interaction sequence; extract local interaction sequences based on the user's historical interaction sequence and combine them with the user's group information to construct dynamic identifiers; and generate a hybrid identifier for each item by fusing static and dynamic identifiers.

[0025] The large language model fine-tuning module is configured to: construct an instruction fine-tuning task, embed the user's final assigned group information into the instruction prompt, take the user's historical sequence as input, and take the hybrid identifier of the next item as the target output; and optimize the parameters of the large language model to enable it to learn to generate the hybrid identifier of the next item from the historical sequence.

[0026] The online recommendation module is configured to generate recommendation results based on an optimized large language model, according to the target user's historical interaction sequence and group information.

[0027] Compared with existing technologies, one or more of the above technical solutions have the following beneficial effects:

[0028] By extracting long-term and short-term preference representations of users and performing coarse-grained and fine-grained clustering respectively, the model effectively integrates long-term stable interest tendencies with short-term dynamic behavioral patterns. This allows the model to leverage local collaborative signals from similar user groups when inferring user preferences, avoiding negative transfer problems caused by indiscriminately mixing users with significantly different interests, thus improving the accuracy and personalization of generative recommendations. Furthermore, by embedding user group information into instruction prompts and fine-tuning the large language model, the semantic gap between the large language model and the recommendation task is narrowed, fully leveraging the semantic understanding and knowledge transfer capabilities of the large language model, thereby improving recommendation accuracy and model interpretability. Attached Figure Description

[0029] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0030] Figure 1 A flowchart illustrating a hybrid identifier generative recommendation method based on local collaborative context provided in one or more embodiments of the present invention;

[0031] Figure 2 Gradient similarity heatmaps using the LLaRA method provided for one or more embodiments of the present invention;

[0032] Figure 3 Gradient similarity heatmaps using the iLoRA method provided for one or more embodiments of the present invention;

[0033] Figure 4 Gradient similarity heatmaps using variant methods of this scheme provided for one or more embodiments of the present invention;

[0034] Figure 5 The gradient similarity heatmap using the LocHy-GenRec method (the method of this scheme) is provided for one or more embodiments of the present invention. Detailed Implementation

[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0036] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0037] This solution provides a generative recommendation method and system based on hybrid identifiers within a local collaborative context. It captures users' long-term and short-term preferences through multi-granularity user group estimation, integrates static semantic stability with dynamic context awareness using residual hybrid identifiers, and finally injects group collaborative information into a large language model through context-guided fine-tuning. The three modules form a closed loop: first, finely segmenting users; second, constructing enhanced item representations; and finally, allowing the model to learn recommendations under group guidance, thereby improving the accuracy and robustness of generative recommendations.

[0038] like Figure 1 As shown, the hybrid identifier generative recommendation method based on local collaborative context includes the following steps:

[0039] Step S1: Obtain the user's historical interaction sequence and extract the user's long-term and short-term preference representations; perform coarse-grained clustering on the long-term preference representations and fine-grained clustering on the short-term preference representations; use the coarse-grained clustering results as constraints to iteratively optimize the fine-grained clustering results and obtain the final group assigned to each user.

[0040] Step S2: Construct static identifiers based on the content data of items in the historical interaction sequence; extract the corresponding user's local interaction sequence according to the user's historical interaction sequence, determine the d items that the user recently interacted with, and combine them with the user's group information to guide the large language model to generate dynamic contextual semantic tags for the d most recent items, thereby constructing dynamic identifiers; generate a hybrid identifier for each item by fusing static identifiers and dynamic identifiers.

[0041] Step S3: Construct instruction fine-tuning tasks. In each task, embed the user's final assigned group information into the instruction prompt, take the obtained hybrid identifier or corresponding text description as input, and take the hybrid identifier or text description of the next item as the target output; optimize the parameters of the large language model so that it can learn to generate the hybrid identifier of the next item from the historical sequence under the guidance of the group context.

[0042] Step S4: Obtain the target user's historical interaction sequence and its final assigned fine-grained group information, combine it with the corresponding item hybrid identifier obtained in Step S2, input it into the large language model optimized in Step S3, and generate the prediction vector for the next item; perform vector retrieval in the item database, match the most similar item hybrid identifier, and output the corresponding item as the recommendation result.

[0043] This scheme improves recommendation performance by explicitly utilizing local group-level collaborative signals and jointly using static and dynamic identifiers in a residual manner. The scheme (named LocHy-GenRec) comprises three stages: agent-based multi-granularity user group estimation, residual-guided hybrid identifier construction, and generative recommendation based on hybrid identifiers within a local collaborative context. First, a clustering agent is trained through reward-driven cluster center updates and final group selection. Second, static and dynamic identifiers are combined to mutually enhance identifier quality in a hybrid manner. Finally, hybrid identifiers are learned through fine-tuning based on instructions within the local collaborative context, thus achieving generative recommendation.

[0044] Traditional methods define the recommendation problem as a multi-class classification problem: given a user's historical sequence, predict the category label of the next interactive item from a fixed set of items I. This approach redefines it as a vector generation problem: instead of predicting specific item IDs, the model directly generates the latent vector representation of the next item in the semantic space, and then uses vector retrieval to match the most similar item.

[0045] In this solution, "items" refers to recommended elements, such as videos on video platforms, products on e-commerce platforms, and articles on content platforms.

[0046] In this scheme, LocHy-GenRec = Local-Hybrid-Generative Recommendation is a hybrid identifier generative recommendation based on local collaborative context.

[0047] set up For user collection, For each user, this is a collection of items. Its historical interaction sequence is denoted as ,in Indicates user The first interaction One item, This represents the sequence length. This differs from traditional recommendations that start from a discrete candidate set. Unlike filtering for the next item, generative recommendation based on large language models aims to directly generate a latent representation (or identifier) ​​of the next item.

[0048] Formally, let the large language model to be fine-tuned be... (Parameters are) The process by which it maps user sequences to continuous latent vectors is as follows:

[0049] (1);

[0050] in, This represents the semantic embedding of the next item.

[0051] During the training phase, the model parameters are optimized to improve the generated latent representation. Embedding with the real next item Alignment; during the inference phase, given a user history sequence Model output The final recommendation result is obtained by searching for the nearest neighbor item in the potential space. ;(2)

[0052] 1. Multi-granularity user group estimation based on agents.

[0053] Existing generative recommendation methods primarily rely on individual users' historical interactions and ID information, forcing models to infer user preferences solely from global collaborative signals. However, relying solely on such global, coarse-grained context ignores the highly diverse (and even conflicting) nature of user interests, leading to negative transfer problems. This approach explicitly incorporates local collaborative context to enhance generative recommendation: specifically, users are grouped into consistent behavioral groups based on their interaction history, and group-level signals guide the large language model to more accurately model preferences. In this way, the model can focus on local collaborative patterns, avoiding preference conflicts arising from the indiscriminate mixing of users with significantly different interests.

[0054] It is worth noting that users exhibit both long-term and short-term preferences. Long-term interests are typically coarser and more stable, suitable for large-scale user grouping. Conversely, short-term interests reflect recent, finer-grained behavioral tendencies, enabling more precise alignment among users with similar emerging interests. While directly using standard clustering algorithms to divide users into fine-grained groups is simple and straightforward, traditional clustering methods are static, single-step clustering processes that cannot support iterative optimization and struggle to flexibly integrate long-term and short-term preference signals, often resulting in poor clustering quality.

[0055] To address the aforementioned issues, this solution groups users with similar interests together, but instead of using traditional one-time clustering, it employs a self-learning "agent" to dynamically optimize the grouping results. A time-stability-aware clustering agent based on the Actor-Critic framework is used for multi-granularity user group estimation. This agent learns a strategy to optimize user groupings using standard clustering algorithms (i.e., k-means++) based on the current state—that is, the coarse-grained (long-term interests) and fine-grained (short-term interests) clustering results at the current time step. Through iterative optimization at consecutive time steps, the agent progressively improves the quality of grouping.

[0056] By designing a time-stability-enhanced silhouette coefficient reward, and introducing a time-consistency metric on the basis of the classic silhouette coefficient reward, the stability of clustering is ensured under different preference granularities, ultimately improving clustering accuracy.

[0057] By designing a variance-aware cluster center adjustment mechanism, cluster centers are directly updated through approximate gradients, improving the stability of policy training and solving the problem that standard policy optimization cannot directly adjust cluster centers.

[0058] 1.1 Multi-granularity clustering.

[0059] This scheme considers both long-term and short-term user interests, performing two clustering operations: coarse-grained clustering (long-term interests) and fine-grained clustering (short-term interests). Reflected in the clustering agent, its core function is to effectively aggregate information from different time scales to generate more consistent, fine-grained user groups. At each time point... First, based on the user's current long-term and short-term interaction representations, coarse-grained and fine-grained user clustering are performed respectively.

[0060] Specifically, the k-means++ algorithm is used due to its strong clustering stability and performance. The group assignment is defined as follows:

[0061] (3);

[0062] in, and Representing time respectively Coarse-grained and fine-grained user groups; and They are time points The k-means++ method yields the first... The first coarse-grained cluster center and the second Fine-grained cluster centers; and These represent the number of coarse-grained and fine-grained groups, respectively. and For users at any time Learnable long-term and short-term interaction representations.

[0063] In this scheme, the historical interaction sequence represents all the user's historical records, i.e., the original data, which includes all interactive items;

[0064] In this scheme, the local interaction sequence represents the most recent d times in the history record, that is, the latter part extracted from the historical interaction sequence;

[0065] Long-term preference representation refers to the representation obtained by encoding historical interaction sequences. This reflects the overall and stable interests of users;

[0066] Short-term preference representation refers to the representation obtained by encoding local interaction sequences. It reflects the user's recent and dynamic interests.

[0067] Cluster centers are initialized randomly, while the initial user representation... and Extracted using a pre-trained BERT model, specifically as follows:

[0068] (4);

[0069] in, Represents the complete sequence of user interactions. The total number of items the user has interacted with throughout history, and In this embodiment, the most recent fixed number of d preferences is taken as short-term preferences, filtering out users with fewer interactive items in the public dataset to ensure that d is effective.

[0070] set up and They are time points The coarse-grained and fine-grained cluster centers closest to the user are then... Current state Defined as:

[0071] (5);

[0072] Essentially, the expectation strategy involves comprehensive analysis of time points. User long-term preference representation Short-term preference representation and the nearest coarse-grained cluster center. and fine-grained cluster centers To find the optimal group.

[0073] 1.2 Temporal stability enhancement reward.

[0074] The quality of clustering results is evaluated using a reward function. In defining the reward function, in addition to the commonly used silhouette coefficient, a temporal stability metric is introduced to improve clustering accuracy. Intuitively, avoiding large fluctuations in group assignments during dynamic clustering is crucial for ensuring the reliability of the clustering results.

[0075] Due to coarse-grained reward and fine-grained rewards Having the same form, we will use coarse-grained rewards as an example here. Specifically, at time... The coarse-grained reward definition is as follows:

[0076] (6);

[0077] in, Represents the coarse-grained profile coefficient. For users With the same coarse-grained group The average distance to all other users in the middle. For users The average distance to all users in the nearest coarse-grained group; via indicator function Capturing temporal stability when the group assignment remains unchanged (i.e.) The value is 1, and it changes when the allocation changes (i.e.) The value is -1, which penalizes unnecessary coarse-grained group changes and encourages the maintenance of stable user coarse-grained groups. To balance the accuracy and temporal stability of rewards.

[0078] 1.3 Cluster center optimization.

[0079] Before performing standard global optimization on the policy model, a pre-optimization phase for cluster centers is introduced. This phase adjusts the cluster "centers" to make the grouping more reasonable. Since cluster centers cannot be directly optimized through global policy updates in the Actor-Critic framework, this phase aims to maximize the "momentum" of the cluster centers. The objective is to optimize the coarse-grained and fine-grained rewards defined in the current time step of the coarse-grained reward function, with the optimization parameters being the coarse-grained and fine-grained cluster centers themselves. Since this reward is non-differentiable, a gradient approximation technique is used to estimate its gradient relative to the cluster centers, and the cluster centers are updated through gradient ascent to maximize the reward. Specifically, gradient estimation is achieved through a sampling-based approximation method rather than direct differentiation. Furthermore, to mitigate update oscillations caused by inconsistent gradient directions and sensitivity to the learning rate, a variance-aware adaptive learning rate allocation mechanism is designed to stabilize cluster center updates: when the variance of rewards among users is large, the learning rate is reduced to avoid parameter abrupt changes and suppress oscillations; when the variance is small (the reward signal is more stable), the learning rate is increased to accelerate convergence.

[0080] The variance-aware adaptive learning rate is defined as follows:

[0081] (7);

[0082] in, and They are time points Coarse-grained reward variance and fine-grained reward variance for all users For scaling hyperparameters;

[0083] and The variance-aware learning rates for optimizing coarse-grained and fine-grained cluster centers are updated using the following formulas:

[0084] (8);

[0085] After the cluster center optimization described above, the coarse-grained and fine-grained group assignments for users can be adjusted, thereby updating the status. The nearest cluster center for each user.

[0086] 1.4 Clustering search strategy optimization.

[0087] This section describes how the agent learns the "grouping strategy." The clustering agent's decisions are based on the clustering search strategy. Dominant, this strategy defines the strategy given the current state. Select a specific user group (action) The goal is to maximize the cumulative reward by determining the probability of a given outcome. To optimize this strategy, an Actor-Critic framework is employed: the Actor network executes the search strategy, and the Critic network evaluates the quality of the decision by estimating the expected cumulative reward. Through an iterative "execution-evaluation" process, the Actor progressively optimizes the strategy to maximize the cumulative reward.

[0088] Following the clustering-oriented optimizations described above, the core clustering search strategy is further optimized. In this stage, the search strategy... Based on the current state Select actions. Since fine-grained (short-term) grouping produces more distinct user groups than coarse-grained (long-term) grouping, each action is defined from the action space. (Include A fine-grained group is selected from among the candidate fine-grained groups. Notably, the state representation incorporates coarse-grained clustering results, allowing these coarse-grained signals to implicitly guide the search strategy's action selection, thereby improving the robustness and stability of the fine-grained clustering process.

[0089] Optimization objectives for Actors and Critics and The definition is as follows:

[0090] (9);

[0091] in, For the policy model, output time step against Probability distribution of candidate fine-grained groups ; Indicates that Critic is in state The following evaluation value; To accumulate future rewards; To emphasize the discount factor for short-term rewards.

[0092] For the Actor-Critic framework, a gradient-based optimization method is used to optimize the Actor's parameters. Parameters of Critic Referring to existing methods for calculating the dominance function using time-series difference errors. This method aims to stabilize and accelerate network updates. Ultimately, it involves selecting the action space. The index with the highest probability is used to determine the user's final allocation group. .

[0093] Cluster contour coefficients and temporal stability rewards are not directly differentiable, making them unoptimizable by traditional gradient descent. Actor-Critic, based on reinforcement learning policy gradients, does not require a differentiable objective. For iterative optimization of user grouping at each time step, Actor-Critic can continuously output the optimal grouping action based on the current state (long-term and short-term preferences, cluster centers).

[0094] At this point, the agent has learned the "grouping strategy" and obtained the final group assigned to each user. This part can be understood as "using the coarse-grained clustering results" as "constraints" to optimize the "fine-grained clustering results".

[0095] By using multi-granularity group estimation, the model distinguishes between users' long-term and short-term preferences. It performs coarse-grained clustering on long-term preference representations and fine-grained clustering on short-term preference representations. The coarse-grained clustering results are used as constraints to iteratively optimize the fine-grained clustering results, ultimately assigning a stable fine-grained group to each user. This approach accurately captures the diversity and dynamic characteristics of user interests, effectively integrating long-term stable interest tendencies with short-term dynamic behavioral patterns. When inferring user preferences, the model can leverage local collaborative signals from similar user groups, avoiding negative transfer problems caused by indiscriminately mixing users with significantly different interests, thus improving the accuracy and personalization of generative recommendations.

[0096] 2. Residual-guided construction of hybrid identifiers.

[0097] This step creates two sets of identifiers for each item: one set of static identifiers (derived from the textual semantics describing the item itself) and the other set of dynamic identifiers (generated by a large language model based on the user group information and local interaction sequences obtained in the previous step, with meanings in the current context). The two sets are then merged using a residual approach, preserving both stability and flexibility.

[0098] Unlike traditional random item IDs that have no semantic meaning for large language models, semantic identifiers represent each item as a set of semantically preserved discrete codes. This allows large language models to understand and autoregressively generate recommended items without requiring a large-scale item embedding table, thus improving performance, scalability, and memory efficiency. Existing semantic identifier construction methods mainly rely on codebook-based static identifiers generated only from the content of a single item, ignoring the interaction context of the item, resulting in poor identifier performance. Although recently proposed dynamic identifier encoding addresses this limitation through context-aware item identifier learning, over-reliance on interaction context may introduce noise and instability. To overcome these problems, this solution proposes a residual-guided hybrid identifier construction method that effectively integrates static and dynamic identifiers while avoiding semantic redundancy, achieving a more robust and expressive representation of the next item that the user may be potentially interested in.

[0099] 2.1 Static identifier construction.

[0100] Following mainstream methods, this paper first utilizes a pre-trained residual quantization variational autoencoder (RQ-VAE) to generate static identifiers. As a multi-level vector quantization technique, RQ-VAE recursively quantizes residual vectors from coarse to fine granularity, thereby generating a set of semantically meaningful discrete codes (i.e., item identifiers) from multiple codebooks. The codebook is denoted as ,in The codebook size. From the codebook The code allocated in The definition is as follows:

[0101] (10);

[0102] in, for The first in Each codebook vector Indicates the first Level residual vector, The length of the static identifier is used. Text semantic embeddings are extracted using a pre-trained semantic extractor. ( The latent text semantic embedding is obtained through the encoder. And as ,and For codebook optimization Define loss as follows:

[0103] (11);

[0104] in, This indicates that the gradient operator is stopped. This is the loss coefficient.

[0105] 2.2 Dynamic identifier construction with enhanced local collaborative context.

[0106] In addition to static identifiers, dynamic identifiers are introduced, allowing the same item to have different representations in different interaction contexts. Dynamic identifiers are also generated through vector quantization and can be seamlessly integrated with static identifiers in the latent semantic space. Unlike existing works that directly rely on user IDs and global interaction sequences to generate item-specific dynamic identifiers, this scheme emphasizes local interaction sequences and incorporates user grouping signals to obtain more discriminative dynamic identifiers.

[0107] This design is based on two core observations:

[0108] 1) Local interaction signals are better able to reflect a user's short-term intentions than global history, making item representations more reflective of context-dependent preferences;

[0109] 2) Local group-level collaborative information provides a less noisy and more reliable context for guiding the construction of dynamic identifiers.

[0110] (1) Generation of dynamic context semantic tags.

[0111] To obtain dynamic identifiers, we first leverage the powerful reasoning capabilities of large language models and their rich real-world knowledge to extract the identifiers for each item. Dynamic content. Specifically, design prompts. This includes user grouping information and local interaction sequences, guiding the large language model to generate dynamic contextual semantic tags (“<contextual semantics>”). Subsequently, the hidden layer states of the output dynamic contextual semantic encoding are extracted as contextual semantic embeddings. Indicates the corresponding item:

[0112] ;(12)

[0113] (2) Residual-guided dynamic identifier construction.

[0114] Unlike existing methods for constructing dynamic identifiers without structural constraints, this scheme generates dynamic identifiers using a residual approach, avoiding the injection of redundant semantic information into the final hybrid identifier. Specifically, it first utilizes a pre-trained BERT model to embed contextual semantics. Encode to obtain And calculate the initial semantic residual. Subsequently, dynamic identifiers are constructed step by step by selecting codes through residual quantization, in a manner similar to the construction of static identifiers. The process is defined as follows:

[0115] ;(13)

[0116] Next, codewords are selected step-by-step through residual quantization to progressively construct dynamic identifiers in a manner similar to static identifier construction. This process is defined as follows:

[0117] (14)

[0118] in, Indicates from the first Codebook The selected encoding, for The first in One encoded vector, Indicates the first Level semantic residuals The length of the dynamic identifier. Codebook Through the loss function Optimization, definition and "loss" The function model is similar to that of "".

[0119] (3) Dynamic identifier diversity regularization.

[0120] To ensure that dynamic identifiers retain meaningful semantic information, diversity regularization is introduced, bringing semantically related items closer together while distancing unrelated items. Items with the same static identifier are observed to generally have similar textual semantics and can therefore be considered positive examples. Formally, diversity loss... The definition is as follows:

[0121] (15);

[0122] in, This indicates the semantic embedding of positive example items. To embed batches of semantics for items, As a temperature hyperparameter, a higher temperature coefficient encourages the model to focus on more potential positive examples, while a lower temperature coefficient helps to enhance the discriminative power of existing positive examples.

[0123] 2.3 Semantic Reconstruction of Hybrid Identifiers.

[0124] The two sets of identifiers are merged into a hybrid identifier, and the merged hybrid identifier is ensured to restore the original semantics.

[0125] By jointly constructing static and dynamic identifiers, the hybrid identifier is formalized as " ".

[0126] Drawing on existing research, this paper introduces commonly used semantic reconstruction loss to optimize identifier learning. Specifically, it first aggregates the hybrid identifier encoding embeddings and then derives the quantized embeddings. The formula is as follows:

[0127] (16)

[0128] Subsequently, the semantic information is reconstructed using quantized embedding as follows:

[0129] (17)

[0130] in, This represents a multilayer perceptron. For reconstructed semantic embedding.

[0131] Ultimately, the semantic reconstruction loss of hybrid identifiers The definition is as follows: ;(18)

[0132] This solution constructs hybrid identifiers by fusing static and dynamic identifiers. Static identifiers retain core semantic information based on item content data, while dynamic identifiers combine user group information and local interaction sequences to generate context-aware representations. This approach ensures the semantic stability of item representations while achieving dynamic adaptation to context, avoiding semantic redundancy and noise interference during identifier construction, and improving the robustness and expressiveness of item representations.

[0133] 3. Generative recommendation of hybrid identifiers based on local collaborative context.

[0134] This step teaches the large language model to "translate," that is, to "translate" the user's historical behavior and group information into a hybrid identifier for the next item.

[0135] Since hybrid identifiers are not part of the native vocabulary of a large language model, instruction fine-tuning is crucial for enabling the model to absorb and utilize this external knowledge. Three types of instruction fine-tuning tasks are employed: identifier-to-identifier prediction, identifier-to-text prediction, and text-to-identifier prediction.

[0136] In the first type of task, the model predicts the mixed identifier of the next item based on the mixed identifier of the items the user has interacted with in the past.

[0137] In the second type of task, a text description of the next item is generated from the hybrid identifiers of items in the user's historical interactions.

[0138] In the third type of task, the hybrid identifier of the next item is inferred based on the text description of the items the user has interacted with in the past.

[0139] Of the three types of instructions integrated with local collaborative context guidance, the first instruction example is identifier-identifier symmetric item prediction based on local collaborative context guidance, while the second and third instruction samples are asymmetric item prediction based on local collaborative context guidance.

[0140] The latter two types of asymmetric tasks are more challenging, specifically designed to enhance the alignment between hybrid identifiers and text descriptions. However, existing methods only utilize user interaction sequences and global user IDs for instruction fine-tuning, neglecting the advantage of incorporating local collaborative context to improve the understanding of user preferences by large language models. To address this limitation, this approach proposes a context-guided instruction fine-tuning strategy that explicitly embeds group-level collaborative signals into instruction prompts, thereby enhancing the generative recommendation capabilities of large language models.

[0141] In terms of optimization, negative log-likelihood generation loss is adopted. The definition is as follows:

[0142] (19)

[0143] in, and These represent the instruction and the corresponding target response, respectively. express Previous encoding or text sequence.

[0144] By fine-tuning the task using instructions predicted by these items, co-semantics can be integrated into the large language model, narrowing the semantic gap between the large language model and the recommendation system, promoting the large language model's understanding of mixed identifiers, and fully utilizing the large language model's excellent reasoning ability for recommendations.

[0145] Ultimately, the total loss for the generative recommendation objective is as follows:

[0146] (20);

[0147] in, and These are the hyperparameters for diversity loss and semantic regularization, respectively.

[0148] By embedding fine-grained user group information into instruction prompts, a fine-tuning task is constructed, enabling the large language model to learn to generate a hybrid identifier for the next item from a historical sequence under the guidance of group context. Integrating group-level collaborative signals into model training effectively narrows the semantic gap between the large language model and recommendation tasks, fully leveraging the semantic understanding and knowledge transfer capabilities of the large language model, and improving recommendation accuracy and model interpretability.

[0149] verify.

[0150] Since conflicting gradients between different user groups are a key source of negative transfer, this paper analyzes how our proposed scheme (LocHy-GenRec) mitigates this problem in recommendation systems based on large language models. The cosine similarity between gradients computed for different user groups in four representative methods is visualized, including:

[0151] (1)LLaRA - a classic instruction fine-tuning method that does not consider negative transfer;

[0152] (2) iLoRA - utilizes expert networks to mitigate negative migration but ignores group-level signals;

[0153] (3) LocHy-GenRec(k-means): This variant replaces the agent-based multi-granularity user group estimation module with the standard k-means clustering strategy;

[0154] (4) LocHy-GenRec, this scheme is a hybrid identifier generative recommendation based on local collaborative context.

[0155] Following the experimental setup of the previous study iLoRA, users were grouped using k-means clustering based on multi-hot user interaction vectors. The experimental results are shown in Table 1 and... Figures 2-5 As shown.

[0156] Table 1 Experimental Results

[0157]

[0158] In Table 1, HR@5, HR@10, NDCG@5, and NDCG@10 are all evaluation indicators.

[0159] HR@5 indicates the probability that the top 5 recommendations include items that the user is genuinely interested in;

[0160] HR@10 indicates the probability that the top 10 recommendations include items that the user is genuinely interested in;

[0161] NDCG@5 represents the weighted score of the location of the items that the user is truly interested in among the top 5 recommendations;

[0162] NDCG@10 represents the weighted score of the location of the items that the user is truly interested in among the top 10 recommendations;

[0163] BERT4Rec, TALLRec, LLaRA, CoLLM, iLoRA, TIGER, LC-Rec, LETTER, GenSAR, UTGRec and ED 2 This refers to the recommendation algorithm used in the experiment.

[0164] The experimental method is compared with the overall performance of LocHy-GenRec on three public datasets: Instruments, Beauty, and Games. Best and second-best performance are indicated by bold and underline, respectively. "Performance Improvement" indicates the relative improvement of LocHy-GenRec compared to the experimental method.

[0165] Figures 2-5 A gradient similarity heatmap was visualized, with the x-axis representing the source group and the y-axis representing the target group. Each cell represents the gradient similarity between the two groups, ranging from -1.00 (strong conflict, blue) to 1.00 (high consistency, red). Higher gradient similarity indicates a more consistent direction of model parameter updates between the two groups during the learning process; lower gradient similarity indicates a greater difference in the direction of model parameter updates between the two groups. Ideally, a lower degree of negative transfer corresponds to higher gradient similarity between user groups, which is reflected in a larger proportion of the red area.

[0166] Figure 2 (LLaRA method) shows that there is serious gradient conflict among user groups with significant differences in preferences. Figure 3 In the (iLoRA method), the user group with "severe gradient conflict" is compared to... Figure 2 The number is even lower, which can be attributed to the fact that the expert activation mechanism used by iLoRA partially mitigates gradient conflicts. Figure 4 Then more Figure 2 and Figure 3 Further reducing the user group with "severe gradient conflicts" demonstrates that LocHy-GenRec (k-means) is superior to LLaRA and iLoRA. This improvement stems from the explicit integration of group-level signals into the identifier construction and instruction fine-tuning stages of this scheme. Figure 5 The complete method shown verifies the effectiveness of the agent-based multi-granularity user group estimation module.

[0167] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A hybrid identifier generative recommendation method based on local collaborative context, characterized in that, Includes the following steps: Obtain the user's historical interaction sequence, extract the user's long-term preference representation and short-term preference representation; perform coarse-grained clustering on the long-term preference representation and fine-grained clustering on the short-term preference representation to obtain the final group assigned to each user; Coarse-grained clustering is performed on long-term preference representations, and fine-grained clustering is performed on short-term preference representations. Specifically, long-term preference representations and short-term preference representations are clustered separately to obtain coarse-grained groups and fine-grained groups. Using the coarse-grained clustering results as constraints, the fine-grained clustering results are iteratively optimized through a reward function with enhanced temporal stability and an Actor-Critic framework to obtain the final group assigned to each user. Iterative optimization of fine-grained clustering results also includes: pre-optimizing fine-grained cluster centers through a variance-aware adaptive learning rate mechanism before policy optimization; and adjusting the learning rate according to changes in the variance of rewards among users to improve the stability of cluster center updates. Static identifiers are constructed based on the content data of items in historical interaction sequences; local interaction sequences are extracted based on the user's historical interaction sequences, and dynamic identifiers are constructed by combining the user's group information; a hybrid identifier for each item is generated by merging the static and dynamic identifiers. The static identifier is constructed by performing multi-level quantization on the item content through a pre-trained residual quantization variational autoencoder, generating a set of discrete codes from multiple codebooks as static identifiers; and optimizing the codebook parameters through a quantization loss function so that the static identifier retains the core semantic information of the item. The construction of dynamic identifiers involves: extracting the corresponding user's local interaction sequence based on the user's historical interaction sequence, determining the d items the user has recently interacted with, and combining this with the user's group information to guide the large language model to generate dynamic contextual semantic tags for the d items, thereby constructing dynamic identifiers; using the residual after encoding the static identifier as the starting point, codewords are selected step by step through residual quantization to construct dynamic identifiers. Constructing dynamic identifiers also includes: using a diversity regularization loss function to make items with the same static identifiers close to each other in the semantic space, and items with different static identifiers far apart, thus ensuring the semantic distinguishability of dynamic identifiers. A command fine-tuning task is constructed, which embeds the user's final assigned group information into the command prompt, takes the user's historical sequence as input, and takes the hybrid identifier of the next item as the target output; by optimizing the parameters of the large language model, it learns to generate the hybrid identifier of the next item from the historical sequence. Recommendation results are generated based on the target user's historical interaction sequence and group information, using an optimized large language model.

2. The hybrid identifier generative recommendation method based on local collaborative context as described in claim 1, characterized in that, Extracting the user's long-term and short-term preference representations, specifically: Long-term preference representations are obtained by encoding the complete historical interaction sequence of users through a pre-trained BERT model; By encoding the local interaction sequence of the user's most recent d items using a pre-trained BERT model, a short-term preference representation is obtained.

3. The hybrid identifier generative recommendation method based on local collaborative context as described in claim 1, characterized in that, The process of generating a hybrid identifier for each item also includes: aggregating the encoding embeddings of static identifiers at all levels with the encoding embeddings of dynamic identifiers at all levels to obtain quantized embeddings; reconstructing semantic information through a decoder, constructing a semantic reconstruction loss function, and ensuring the semantic fidelity of the hybrid identifier.

4. The hybrid identifier generative recommendation method based on local collaborative context as described in claim 1, characterized in that, The constructed instruction fine-tuning tasks include: identifier-to-identifier symmetric prediction task, identifier-to-text asymmetric prediction task, and text-to-identifier asymmetric prediction task. For the identifier-to-identifier symmetric prediction task, take a sequence of mixed identifiers of a user's historical items as input and output the mixed identifier of the next item. For the asymmetric prediction task from identifier to text, take a mixed identifier sequence of a user's historical items as input and output a text description of the next item; For the asymmetric prediction task from text to identifier, take a text description of a user's historical items as input and output a mixed identifier for the next item.

5. A hybrid identifier generative recommendation system based on local collaborative context, employing the hybrid identifier generative recommendation method based on local collaborative context as described in any one of claims 1-4, characterized in that, include: The multi-granularity group estimation module is configured to: acquire the user's historical interaction sequence and extract the user's long-term and short-term preference representations; Coarse-grained clustering is performed on long-term preference representations, and fine-grained clustering is performed on short-term preference representations to obtain the final group assigned to each user; The hybrid identifier building module is configured to: build static identifiers based on the content data of items in the historical interaction sequence; Extract local interaction sequences based on the user's historical interaction sequences, and construct dynamic identifiers by combining the user's group information; By merging static and dynamic identifiers, a hybrid identifier is generated for each item; The large language model fine-tuning module is configured to: construct an instruction fine-tuning task, embed the user's final assigned group information into the instruction prompt, take the user's historical sequence as input, and take the hybrid identifier of the next item as the target output; and optimize the parameters of the large language model to enable it to learn to generate the hybrid identifier of the next item from the historical sequence. The online recommendation module is configured to generate recommendation results based on an optimized large language model, according to the target user's historical interaction sequence and group information.

Citation Information

Patent Citations

  • Large model recommendation method and system based on comparative learning enhancement and model fine tuning

    CN120670674A