A method for constructing generation recommendation supervision fine-tuning data based on frozen semantic embedding guidance

CN122594580APending Publication Date: 2026-08-18BEIJING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610739405.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,现有方法大多聚焦于“如何让大模型使用推荐表示”或“如何让物品适配生成式建模”,对于“如何在序列推荐阶段先获得兼具语义结构与协同行为模式的高质量融合表征”这一关键问题关注仍然不足

Benefits of technology

本发明通过冻结外部获得的语义嵌入作为稳定锚点,避免了协同训练对语义空间的扭曲与噪声干扰,有效保护了内容先验知识。同时,在保持语义一致性的基础上,引入协同邻域和序列转移保持损失,使物品表征在向语义空间对齐的过程中仍能完整保留原始协同过滤空间中的行为模式和兴趣演化规律,获得语义增强且协同保真的高质量融合表征。基于该融合表征,通过残差聚类将其离散化为多级语义标识,构造适用于大语言模型监督微调的指令-响应样本,实现了传统推荐知识向生成式推荐范式的有效迁移,使大语言模型具备序列推荐能力,并显著提升了冷启动场景下的推荐效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594580A_ABST
    Figure CN122594580A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on frozen semantic embedding guide's generative recommendation supervision fine-tuning data construction method.The application avoids the distortion of semantic space and noise interference of collaborative training by freezing the semantic embedding obtained externally as a stable anchor, effectively protecting the content priori knowledge. At the same time, on the basis of maintaining semantic consistency, the collaborative neighborhood and sequence transfer preservation loss are introduced, so that the item representation can still completely retain the behavior patterns and interest evolution law in the original collaborative filtering space during the alignment process to the semantic space, obtaining high-quality fusion representation with semantic enhancement and collaborative authenticity. Based on the fusion representation, it is discretized into multi-level semantic identifiers through residual clustering, and instruction-response samples suitable for large language model supervision fine-tuning are constructed, realizing the effective migration of traditional recommendation knowledge to generative recommendation paradigm, enabling large language model to have sequence recommendation capability, and significantly improving the recommendation effect in cold start scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sequence recommendation in large language models, and specifically to a method for constructing supervised fine-tuning data for generative recommendation based on frozen semantic embedding guidance. Background Technology

[0002] Sequential recommendation aims to predict items a user might be interested in based on their historical interaction sequences, and is one of the core tasks in recommender systems. Compared to traditional collaborative filtering methods, sequential recommendation models can model the dynamic changes in user interests over time with finer granularity, and therefore have been widely used in e-commerce, short videos, music, and information distribution scenarios. In recent years, sequential recommendation methods based on the Transformer architecture, such as SASRec, have become important baseline models in this field due to their flexible modeling capabilities of long-term and short-term interests through self-attention mechanisms.

[0003] While sequence recommendation models, exemplified by SASRec, have achieved good results in behavioral pattern modeling, their item representations are typically learned based on discrete IDs. This type of ID representation has a natural advantage in capturing co-occurrence relationships, transition patterns, and collaborative preferences, but it also has significant limitations: firstly, ID embeddings lack explicit semantic information, making it difficult to support cross-domain generalization, cold-start adaptation, and interpretable modeling; secondly, ID representations are essentially situated in a collaborative filtering space driven by recommendation objectives, which differs significantly from the semantic token space that large language models excel at handling. This makes it difficult to naturally transfer knowledge from traditional recommendation models to generative recommendation frameworks.

[0004] Meanwhile, with the development of pre-trained language models and multimodal foundational models, researchers have begun to explore using item titles, descriptions, attribute text, and even image information to construct semantic representations and apply them to enhance recommender systems. Semantic representations can provide stronger prior knowledge, content understanding capabilities, and cross-scene transfer potential. However, relying solely on semantic representations often fails to fully model the implicit collaborative filtering patterns in user behavior and tends to underperform ID representations in modeling high-frequency behavior patterns, sequence transition relationships, and personalized preferences. Therefore, effectively integrating "semantic information" and "collaborative information" in recommender tasks is a crucial prerequisite for connecting traditional recommender models with large-scale generative recommender models.

[0005] Several works have attempted to bridge the gap between recommendation representations and language models from different perspectives. One type of approach projects the continuous embeddings of the recommendation model onto the LLM input space using a projector; another type uses semanticID, discrete semantic tokens, or generative retrieval methods to discretize the continuous item representation into a sequence of identifiers that can be predicted by an autoregressive model. However, most existing methods focus on "how to make large models use recommendation representations" or "how to adapt items to generative modeling," while paying insufficient attention to the crucial issue of "how to obtain a high-quality fusion representation that combines semantic structure and collaborative behavioral patterns in the sequence recommendation stage."

[0006] Further analysis reveals that directly adding, concatenating, or simply projecting semantic embeddings and ID embeddings typically faces the following problems: First, the two types of representations originate from different training objectives and geometric spaces, with significant distribution differences, and direct fusion may lead to training instability; Second, if semantic embeddings and ID embeddings are jointly optimized simultaneously, the semantic space may be corrupted by behavioral noise, resulting in the degradation of the original content knowledge; Third, if only semantic alignment is emphasized, the original collaborative filtering capability of the sequence recommendation model may be weakened, causing the model to degenerate into content similarity recommendation; Fourth, when continuous vectors are directly used to construct supervised fine-tuning samples, they do not fully match the LLM training mechanism based on discrete tokens; Fifth, when directly generating discrete tokens based on semantics to construct supervised fine-tuning samples, it is easy to overlook the sequence relationships between samples and the collaborative adjacency relationships and higher-order propagation information in the user-item bipartite graph. Summary of the Invention

[0007] To address the aforementioned issues, this invention proposes a generative recommendation supervised fine-tuning data construction based on frozen semantic embedding guidance. The core idea of ​​this invention is to treat externally obtained item semantic embeddings as stable "semantic anchors" with content priors, freezing them during the fusion training phase to prevent semantic space drift during joint training. Through early fusion modules and alignment constraints, the ID representation is guided to gradually converge towards the semantic space while maintaining the original sequence collaborative information. Experimental verification shows that during the process of training ID representations to converge towards the semantic space, the recommendation ability of the sequence recommendation model can still maintain or even slightly outperform the recommendation ability when directly learning ID representations. This indicates that the ID representation under this training method does not lose its sequence space information due to the fixed semantic representation. Furthermore, the ID vectors guided by the freezing method are verified through normalization, cosine similarity calculation, PCA dimensionality reduction visualization, etc., showing that the learned ID representations are indeed closer to the semantic representations in spatial structure than the directly learned ID representations. After obtaining semantically enhanced and co-fidelity fusion representations, continuous vectors are further mapped to multi-level semantic labels through discretization mechanisms such as residual clustering. This enables the construction of instruction-response samples suitable for supervised fine-tuning of large language models, achieving an effective transfer of traditional sequence recommendation knowledge to generative recommendation paradigms.

[0008] To achieve the above objectives, this invention provides a method for constructing supervised fine-tuning data for generative recommendations based on frozen semantic embedding guidance, comprising the following steps: S1. Obtain the original semantic vector of each item in the item set; S2. Input the original semantic vector into the constructed sequence recommendation model based on frozen semantic guidance, use the frozen original semantic vector to guide the learning of item ID representation, obtain the fusion representation of semantic and collaborative information, and construct supervised fine-tuning samples based on the fusion representation to fine-tune the large language model and obtain the generative sequence recommendation model. S3. Generative sequence recommendation is performed using a generative sequence recommendation model.

[0009] Preferably, S1 includes: encoding the text information of the items using an external pre-trained language model to obtain the original semantic vector of each item.

[0010] Preferably, in S2, The steps for guiding item ID representation learning using frozen raw semantic vectors include: encoding user historical interaction sequences based on SASRec, and learning item ID representations and dynamic sequence representations.

[0011] Preferably, after obtaining the item ID representation, guiding the learning of the item ID representation also includes: The original semantic vector is introduced as a frozen semantic embedding and a fixed anchor point. The item ID representation and semantic embedding are fused through the pre-fusion module to obtain a semantically enhanced item representation.

[0012] Preferably, the step of fusing the item ID representation and semantic embedding includes: The semantic embedding is projected into the same hidden space as the item ID embedding by a linear mapping, and the semantic information injection strength is controlled by a learnable scalar gating parameter to construct a semantically enhanced item representation.

[0013] Preferably, after obtaining the semantically enhanced item representation, the fusion model is trained using multi-objective loss; the multi-objective loss includes: task supervision loss, semantic alignment loss, cooperative neighborhood preservation loss, and sequence transfer preservation loss.

[0014] Preferably, in step S2, the step of constructing supervised fine-tuning samples based on fused representations includes: Residual clustering encoding is performed on the fused continuous item representations to form a multi-level semantic label sequence; By combining user history behavior with multi-level semantic identifier sequences of target items, an instruction-based SFT sample is constructed.

[0015] Preferred methods for fine-tuning large language models include: using imperative SFT samples to perform supervised fine-tuning of the large language model, enabling the large language model to have generative sequence recommendation capabilities.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention uses externally obtained semantic embeddings as stable anchors, avoiding the distortion and noise interference of the semantic space caused by collaborative training, and effectively protecting prior knowledge of the content. Simultaneously, while maintaining semantic consistency, it introduces collaborative neighborhood and sequence transfer preservation loss, ensuring that item representations retain the behavioral patterns and interest evolution rules in the original collaborative filtering space during alignment with the semantic space, resulting in high-quality fusion representations that are semantically enhanced and collaboratively faithful. Based on this fusion representation, it is discretized into multi-level semantic labels through residual clustering, constructing instruction-response samples suitable for supervised fine-tuning of large language models. This achieves an effective transfer of traditional recommendation knowledge to a generative recommendation paradigm, enabling large language models to possess sequence recommendation capabilities and significantly improving recommendation performance in cold-start scenarios. Attached Figure Description

[0017] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of the model structure according to an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] Example First, a brief explanation of some parameter definitions and related technical descriptions in this embodiment will be given.

[0022] Let the user set be The collection of items is For any user Its historical interaction sequence is represented as follows: in, This represents the items a user interacts with at time t. The goal of sequence recommendation is to leverage a user's historical sequence. Predict the target item most likely to be interacted with in the next moment. .

[0023] In the traditional SASRec framework, each item corresponds to a trainable ID embedding. This embodiment further assumes that each item also possesses a semantic embedding pre-obtained by an external semantic encoder. The embedding can be derived from the item title, description text, attribute information, or multimodal content encoding results.

[0024] This embodiment aims to address the following problem: how to guide the ID embedding space to align with the semantic space while maintaining the collaborative filtering structure during sequence recommendation training, using frozen semantic embeddings as stable anchors; and how to analyze the degree of spatial alignment based on PCA dimensionality reduction and cosine similarity. After obtaining high-quality fused representations, the representations are converted into multi-level token IDs that integrate semantic and collaborative filtering information through residual clustering quantization. After data preprocessing, large-scale model training sample instances suitable for supervised fine-tuning are generated, enabling the large language model to possess sequence recommendation capabilities.

[0025] Based on this, this embodiment presents a method for constructing data for frozen semantic embedding guided representation alignment and supervised fine-tuning under generative sequence recommendation, the steps of which include: S1. Obtain the original semantic vector of each item in the item set.

[0026] Let the user set be The collection of items is For each item v First, the original semantic vector is obtained using an external pre-trained language model: .

[0027] S2. Input the original semantic vector into the constructed sequence recommendation model based on frozen semantic guidance, use the frozen original semantic vector to guide the learning of item ID representation, obtain the fusion representation of semantic and collaborative information, and construct supervised fine-tuning samples based on the fusion representation to fine-tune the large language model and obtain the generative sequence recommendation model.

[0028] The acquired raw semantic vectors are input into the constructed sequence recommendation model guided by frozen semantics. The structure of the sequence recommendation model is as follows: Figure 1 As shown, its construction steps include: S201. Encode the user's historical interaction sequence based on SASRec, and learn the item ID representation and dynamic sequence representation.

[0029] S202. Introduce pre-trained semantic embedding as a fixed anchor point, and fuse ID representation and semantic representation through the pre-fusion module to obtain semantically enhanced item representation.

[0030] During model training, the semantic vector is obtained by looking up the pre-trained embedding table and remains frozen, not participating in gradient updates. Subsequently, the semantic embedding is projected into the same latent space as the ID embedding using a linear mapping. in, In the formula, W p b p All parameters are trainable and are initialized using standard randomization during model initialization. d This represents the dimension of the hidden layer in the sequence recommendation model.

[0031] To control the intensity of semantic information injection, this embodiment introduces a learnable scalar gating parameter α, which is mapped to the (0,1) interval via a Sigmoid function: in, This is the Sigmoid function.

[0032] This embodiment will use items v The fusion representation is defined as e v To construct the fusion representation: And As a unified item representation for sequence modeling and candidate scoring.

[0033] Based on this, the model maps user historical interaction sequences into fused representation sequences and combines them with a location-embedded input multilayer causal self-attention network to model the evolution of user interests. During training, a matching score is calculated by the inner product of the current position's hidden state and the positive and negative sample item representations, and a binary classification loss is used for optimization. During prediction, the inner product score is calculated using the hidden state of the last position in the sequence and the fused representation of the candidate item, thus obtaining the recommendation result. This design allows frozen semantic priors to be injected into the ID representation learning process in a controllable manner, thereby enhancing the semantic consistency and generalization ability of item representations.

[0034] The next item matching process during the training phase is as follows: For each location t Let the positive sample items be... Negative sample items are The model first obtains the contextual representation of each position from the sequence encoder: Then, item representations for positive and negative samples are constructed separately. The item representations for positive and negative samples are as follows: in, , These represent the ID embedding vector and semantic embedding vector of the positive sample, respectively. , These represent the ID embedding vector and semantic embedding vector of the negative sample, respectively.

[0035] Therefore, the corresponding score is: in, s Indicates the scores for positive and negative samples; u , t Indicates user u Before observation t Interest representations after historical interactions; h represents the context hidden state output by the sequence encoder; This represents the transpose of the matrix.

[0036] S203. The fusion model is trained by multi-objective loss so that the fusion representation is close to the semantic space and retains the original cooperative neighborhood and sequence transfer rules.

[0037] (1) Task supervision loss The training objective uses point-wise BCE loss. Let the set of effective locations be denoted as... The training objective is: .

[0038] (2) Semantic alignment loss To bring the fused representation closer to the frozen semantic space, semantic consistency constraints are introduced: in, , Representing items v The fusion represents the embedding vector and the semantic embedding vector.

[0039] Alternatively, cosine similarity can be used: This constraint encourages the merged representation to inherit the semantic geometry of the item.

[0040] (3) Collaborative neighborhood preservation loss If only semantic alignment loss is applied, the model may overly favor content similarity, thereby weakening the collaborative relationships learned from interactive data. Therefore, this embodiment introduces a neighborhood preservation constraint based on the original ID space or sequence co-occurrence statistics. Let... For items The nearest neighbor set in the original collaborative space requires that the nearest neighbor relationships in the merged space be maintained as much as possible: in, Either Euclidean distance or cosine distance can be used. Represents items v’ The fused embedding vector, Represents items v ID embedding vector, Represents items v’ The ID embedding vector.

[0041] This item is used to preserve the local topology in the original collaborative filtering space.

[0042] (4) Sequence transfer preservation loss Since sequence recommendation relies not only on the static adjacency structure but also on the sequential transition relationships in user behavior, this embodiment further designs sequence preservation constraints. For adjacent interactive items within the same user sequence... This requires that its predictability in the fusion space is no less than the level learned in the original collaborative space. It can be modeled using pairwise ranking or transition consistency, for example: in, , Adjacent interactive items in the same sequence vt and vt +1 is the fusion vector representation.

[0043] In summary, the overall training objective of this embodiment is: in, , , This represents the weighting parameter.

[0044] S204. Perform residual clustering encoding on the fused continuous item representations to form a multi-level semantic identifier sequence.

[0045] To adapt the fused representation to the training mechanism of a language model based on discrete tokens, this embodiment employs residual clustering (Residual K-Means) or hierarchical residual quantization to discretely encode continuous vectors into multi-level semantic identifiers. Let each fused item be represented as... ,use Level 1 residual clustering, with each level codebook size being [size missing]. The first-level clustering yields the centers. : The first-order residual is obtained: The second stage continues clustering in the residual space: Following this logic, the final item v Encoded as a length of Semantic identifier sequence: This discrete representation has the following advantages: it transforms continuous fused representations into discrete tokens that can be processed by language models; it preserves more representation details through multi-level residual encoding; tokens at different levels can form a hierarchical structure from coarse to fine in semantics; and it is conducive to constructing a unified generative recommendation training objective.

[0046] S205. Finally, by combining user history behavior with target item identifiers, an instructional SFT sample is constructed, and the large language model is fine-tuned to enable it to have generative sequence recommendation capabilities.

[0047] S3. Generative sequence recommendation is performed using a generative sequence recommendation model.

[0048] In recommendation tasks, semantic embeddings are typically derived from large-scale pre-trained models, whose encoding spaces already possess strong semantic consistency and content generalization capabilities. If semantic embeddings are directly updated jointly during recommendation training, high-frequency biases in the interaction data, popular item biases, and local behavioral noise can distort the semantic space, causing degradation of the original semantic priors. This embodiment freezes the semantic embeddings, using them as stable anchor points, providing directional constraints for ID representation and thus preventing the semantic representation from being destroyed during joint optimization.

[0049] While simple addition or concatenation is a common baseline approach in semantically enhanced recommendation, it cannot guarantee the geometric compatibility of the two types of spaces from a mechanistic perspective. Since ID representations and semantic representations originate from different objective functions, their distribution scales, local densities, and topological relationships often differ significantly. Direct fusion can easily lead to training instability, representation collapse, or dilution of collaborative knowledge. This embodiment introduces explicit alignment and structure preservation constraints, making fusion no longer just a feature-level concatenation, but a "targeted spatial reorganization process."

[0050] One of the core advantages of recommender systems lies in modeling higher-order collaborative patterns using user group behavior. If only semantic consistency is the goal, the final model may be better at recommending similar items, but it cannot accurately characterize the actual shift patterns of user preferences. This embodiment uses neighborhood preservation and sequence preservation losses to preserve the local topology and behavioral evolution patterns in the collaborative space while introducing semantic structure, thus preventing the model from degenerating into a content similarity retrieval machine.

[0051] The conversion from continuous vectors to discrete semantic tokens is a crucial bridge connecting recommendation models and LLM (Limited Learning Model). Compared to directly inputting continuous embeddings into a large model, discrete tokens offer better autoregressive modelability, higher training compatibility, and a clearer task interface. Through multi-level residual clustering encoding, the model can retain richer item representation information within a finite token length, providing a scalable representation carrier for generative recommendations.

[0052] Because this embodiment explicitly introduces and preserves semantic structure in representation learning, it has natural potential for cold-start items and cross-domain scenarios. For new items with sparse interactions, even with insufficient coordination signals, a relatively reasonable initial representation can be obtained by leveraging content semantic anchors. For cross-domain migration scenarios, as long as items from different domains have alignable semantic content representations, the method in this embodiment may also improve migration robustness through a unified semantic space.

[0053] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for constructing generation recommendation supervision fine-tuning data based on frozen semantic embedding guidance, characterized by the following steps include: S1. Obtain the original semantic vector of each item in the item collection; S2. Input the original semantic vector into the constructed sequence recommendation model based on frozen semantic guidance, use the frozen original semantic vector to guide the learning of item ID representation, obtain the fusion representation of semantic and collaborative information, and construct supervised fine-tuning samples based on the fusion representation to fine-tune the large language model and obtain the generative sequence recommendation model. S3. Generative sequence recommendation is performed using a generative sequence recommendation model.

2. The frozen-semantic-embedding-guided generative recommendation supervised fine-tuning data construction method according to claim 1, characterized in that, S1 includes: encoding the text information of the items using an external pre-trained language model to obtain the original semantic vector of each item.

3. The method of claim 1, wherein the method further comprises: In S2, The steps for guiding item ID representation learning using frozen raw semantic vectors include: encoding user historical interaction sequences based on SASRec, and learning item ID representations and dynamic sequence representations.

4. The frozen-semantic-embedding-guided generative recommendation supervised fine-tuning data construction method according to claim 3, characterized in that, After obtaining the item ID representation, the guided item ID representation learning also includes: The original semantic vector is introduced as a frozen semantic embedding and a fixed anchor point. The item ID representation and semantic embedding are fused through the pre-fusion module to obtain a semantically enhanced item representation.

5. The data construction method for supervised fine-tuning of generative recommendations based on frozen semantic embedding guidance according to claim 4, characterized in that, The steps to fuse item ID representation and semantic embedding include: The semantic embedding is projected into the same hidden space as the item ID embedding by a linear mapping, and the semantic information injection strength is controlled by a learnable scalar gating parameter to construct a semantically enhanced item representation.

6. The method for constructing supervised fine-tuning data for generative recommendation based on frozen semantic embedding guidance according to claim 4, characterized in that, After obtaining semantically enhanced item representations, the fusion model is trained using multi-objective losses, which include: task supervision loss, semantic alignment loss, cooperative neighborhood preservation loss, and sequence transfer preservation loss.

7. The method for constructing supervised fine-tuning data for generative recommendation based on frozen semantic embedding guidance according to claim 1, characterized in that, In step S2, the step of constructing supervised fine-tuning samples based on fusion representation includes: Residual clustering encoding is performed on the fused continuous item representations to form a multi-level semantic label sequence; By combining user history behavior with multi-level semantic identifier sequences of target items, an instruction-based SFT sample is constructed.

8. The method for constructing supervised fine-tuning data for generative recommendation based on frozen semantic embedding guidance according to claim 7, characterized in that, Methods for fine-tuning large language models include: using imperative SFT samples to supervise the fine-tuning of large language models, enabling them to have generative sequence recommendation capabilities.