Large language model recommendation method based on collaborative similarity alignment

By integrating the large language model and collaborative filtering signals through the similarity alignment mechanism and quality assessment module, the problem of the gap between the large language model and collaborative filtering signals is solved, and the accuracy and generalization ability of the recommendation system are improved.

CN120687685AActive Publication Date: 2025-09-23UNIV OF SCI & TECH OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511202918.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-09-23
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

There is a gap between large language models and collaborative filtering signals. Traditional methods find it difficult to fully understand collaborative signals, which limits the recommendation effect. In addition, the noise in collaborative filtering signals affects the learning of large models.

Method used

Through the similarity alignment mechanism, the large language model and collaborative filtering signals are integrated, a quality assessment module is introduced to screen high-quality information, the model parameters are optimized to reflect the collaborative similarity, and the recommendation results are generated through joint training.

Benefits of technology

It improves the recommendation system's ability to understand user behavior and the accuracy and generalization of recommendation effects, avoids noise interference, and ensures that large models learn stable and reliable collaborative knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687685A_ABST
    Figure CN120687685A_ABST
Patent Text Reader

Abstract

The invention discloses a large language model recommendation method based on collaborative similarity alignment. The method comprises the following steps: S100, a similarity alignment stage: respectively extracting vector representations of articles from language space embedding generated by a large language model and behavior space embedding generated by a collaborative filtering method; s200, a quality evaluation stage: performing quality evaluation on the behavior space embedding based on a statistical view angle and a collaborative view angle, and screening out a high-quality collaborative signal meeting a pre-auditing condition, and S300, a joint training stage: performing joint optimization on a similarity alignment loss and a standard training target of a language model, and completing end-to-end model training to generate a recommendation result. According to the method, more essential collaborative similarity signals are explored to guide large model learning recommendation knowledge, information loss is avoided, noise data can be accurately screened through the introduced quality evaluation module, only high-quality collaborative signals are reserved, and therefore the accuracy and generalization of recommendation results are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of large model recommendation, and specifically to a large language model recommendation method based on collaborative similarity alignment. Background Art

[0002] Over the past few decades, recommendation systems have significantly improved the ability to efficiently retrieve user-preferred content from massive amounts of data. Major online platforms leverage user interests from a variety of information sources to deliver more precise recommendations, generating substantial revenue. Despite the continuous evolution of recommendation technology, collaborative filtering signals continue to play a core role in recommendation systems. This means that users with similar behavioral patterns tend to share similar purchasing preferences. These behavioral patterns include historical clicked items, user profiles, and the attributes of purchased items.

[0003] In recent years, large language models (LLMs), with their powerful ability to encode world knowledge and superior reasoning capabilities, have reshaped the research paradigm in the recommendation field. Numerous researchers have devoted significant effort to exploring more efficient ways to deeply integrate LLMs with recommendation systems. These researchers approach this from various perspectives, ranging from optimizing model structures to enhance their understanding of collaborative signals to designing novel training paradigms to fully leverage user-item interaction data. Their goal is to improve recommendation quality while overcoming the limitations of existing approaches. However, a significant gap exists between the knowledge embedded in large models and the collaborative information in recommendation systems. Previous studies have often relied on simple adapters to align the two. However, this approach fails to fully understand the deep structure of collaborative signals, limiting the further development of large models in recommendation tasks. Furthermore, collaborative filtering signals are laced with significant noise. Indiscriminately incorporating these noises can lead large models to learn misleading patterns, thereby compromising recommendation effectiveness. Summary of the Invention

[0004] In this embodiment, a large language model recommendation method, device, electronic device and storage medium based on collaborative similarity alignment are provided to seamlessly integrate collaborative signals through a similarity alignment mechanism, and introduce a quality assessment module to screen high-quality information from a statistical and collaborative perspective, thereby improving the recommendation system's ability to understand user behavior and the recommendation effect.

[0005] In a first aspect, an embodiment of the present invention provides a large language model recommendation method based on collaborative similarity alignment, the large language model recommendation method based on collaborative similarity alignment comprising: S100, similarity alignment stage: extract vector representations of items from the language space embedding generated by the large language model and the behavior space embedding generated by the collaborative filtering method; calculating a first similarity matrix between the language space embeddings and a second similarity matrix between the behavior space embeddings, and adjusting parameters of the large language model by minimizing the difference between the first similarity matrix and the second similarity matrix so that the language space embeddings reflect the similarity relationship of the behavior space embeddings; S200, quality assessment stage: The behavior space embedding is evaluated based on statistical and collaborative perspectives to screen out high-quality collaborative signals that meet pre-screening conditions. The statistical perspective adjusts the weight of collaborative similarity based on the historical interaction frequency of items, and the collaborative perspective filters out item pairs with low quality similarity by setting a preset threshold. S300, joint training phase: By jointly optimizing the similarity alignment loss and the standard training objectives of the language model, complete end-to-end model training is performed to generate recommendation results.

[0006] In an optional embodiment, the language space embedding is extracted by: encoding the text information of the item using a large language model to generate a semantic embedding vector; The behavior space embedding is extracted by obtaining the item ID embedding vector through collaborative filtering model training based on the user-item interaction matrix.

[0007] In an optional embodiment, the first similarity matrix and the second similarity matrix are both calculated using a cosine similarity algorithm.

[0008] In an optional embodiment, the optimization of the difference adopts Manhattan distance as the loss function, and directly adjusts the embedding parameters of the large language model to minimize the difference.

[0009] In an optional embodiment, the statistical perspective screening is specifically: calculating the popularity weight of the item according to the historical number of interactions, and weighting the collaborative similarity based on the weight to reduce the impact of cold start items on similarity alignment.

[0010] In an optional embodiment, the collaborative perspective filters out item pairs with low-quality similarity by setting a preset threshold, which can be formalized as follows: ; in, Represents the similarity between items i and j in the behavior space, is the set threshold, Represents the weight coefficient of the coupling information between i and j.

[0011] In an optional embodiment, the screening of the collaborative perspective includes: Set a similarity threshold, and reduce the weight of item pairs in the alignment process or directly exclude them if their similarity in the behavior space is lower than the threshold.

[0012] In an optional embodiment, the loss function of the joint training is: ; in, is the standard training loss for the language model, is the similarity alignment loss, To balance the hyperparameters.

[0013] In an optional embodiment, the collaborative filtering model is selected from one of LightGCN and SASRec.

[0014] In an optional embodiment, the similarity threshold is set by dynamically adjusting the threshold to adapt to the noise level of different data sets according to the distribution characteristics of the behavior space similarity matrix.

[0015] Compared with the prior art, the collaborative similarity alignment-based large language model recommendation method of the present invention has the following beneficial effects: The present invention proposes a novel large-model recommendation framework to seamlessly integrate the rich information contained in collaborative similarity. Specifically, the present invention first introduces an alignment module, which includes extracting embeddings from the large language model and the behavior space, calculating their respective similarities, and finally aligning these similarities, thereby avoiding the limitation of the adapter in the traditional method that only converts the embedding but cannot fully understand the collaborative signal. In addition, in order to improve the robustness of the large model, the present invention further designs a quality assessment module, which evaluates the quality of item embeddings from both statistical and collaborative perspectives, accurately screens and filters noise information, and ensures that the large model can learn stable and reliable collaborative knowledge, thereby significantly improving the accuracy and generalization ability of recommendations.

[0016] In a second aspect, an embodiment of the present invention provides a large language model recommendation device based on collaborative similarity alignment, comprising: A similarity alignment module is used to extract vector representations of items from the language space embedding generated by the large language model and the behavior space embedding generated by the collaborative filtering method; calculating a first similarity matrix between the language space embeddings and a second similarity matrix between the behavior space embeddings, and adjusting parameters of the large language model by minimizing the difference between the first similarity matrix and the second similarity matrix so that the language space embeddings reflect the similarity relationship of the behavior space embeddings; A quality assessment module is used to perform a quality assessment on the behavior space embedding based on a statistical perspective and a collaborative perspective, and filter out high-quality collaborative signals that meet pre-screening conditions. The statistical perspective adjusts the weight of collaborative similarity based on the historical interaction frequency of items, and the collaborative perspective filters out item pairs with low quality similarity by setting a preset threshold. The joint training module is used to perform end-to-end model training to generate recommendation results by jointly optimizing the similarity alignment loss and the standard training objective of the language model.

[0017] In a third aspect, an embodiment of the present invention provides an electronic device comprising a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory communicate with each other through the bus, and the processor can call logic instructions in the memory to execute the steps of the method provided in the first aspect.

[0018] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the large language model recommendation method based on collaborative similarity alignment as described in the first aspect.

[0019] Compared with the prior art, the beneficial effects of the large language model recommendation device, electronic device and storage medium based on collaborative similarity alignment of the present invention are the same as those of the large language model recommendation method based on collaborative similarity alignment described in the first aspect, so they will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 This is a flowchart of a large language model recommendation method based on collaborative similarity alignment in an embodiment of the present invention; Figure 2 This is a diagram of the framework structure of the similarity perception large model recommendation in an embodiment of the present invention; Figure 3 This is a structural block diagram of a large language model recommendation device based on collaborative similarity alignment in an embodiment of the present invention; Figure 4 2 is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to more clearly understand the purpose, technical solutions and advantages of this application, this application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0023] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and similar expressions in this application do not denote limitations on quantity and may be singular or plural. The terms "comprise," "include," "have," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include unlisted steps or modules (units) or other steps or modules (units) inherent to the process, method, product, or device. The terms "connected," "connected," "coupled," and similar expressions used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used in this application, "plurality" means two or more. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone; A and B exist simultaneously; or B exists alone. Generally, the character " / " indicates that the objects in the preceding and following relationship are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0024] First, the technical solution of the present invention is briefly explained. The purpose of the present invention is to provide a method for fusing a large language model with collaborative signals, seamlessly fusing collaborative signals through a similarity alignment mechanism, and introducing a quality assessment module to screen high-quality information from a statistical and collaborative perspective, thereby improving the recommendation system's ability to understand user behavior and the recommendation effect.

[0025] The implementation process of this invention is divided into two phases. In the first phase, the goal is to align the similarity between the large language model and the user behavior space. Through the similarity alignment mechanism, the large model can understand the underlying patterns of collaborative signals. In the second phase, based on the alignment results of the first phase, the invention introduces a quality assessment module to screen high-quality collaborative information from a statistical and collaborative perspective to improve the accuracy and generalization of recommendations.

[0026] In the first stage, the present invention designs a similarity alignment module to enable the large language model to understand and absorb the inherent patterns of collaborative signals. Specifically, the module first extracts embeddings from the large language model and the user behavior space, calculating the text-based embedding similarity and the user behavior-based embedding similarity, respectively. Subsequently, through the similarity alignment mechanism, the embeddings in the large language model are adjusted so that they can reflect the similarity relationships in the user behavior space in the language space, thereby bridging the gap between the two. This approach avoids the limitation of traditional methods in which the adapter only performs embedding conversion and cannot deeply understand the collaborative information.

[0027] In the second stage, the present invention introduces a quality assessment module to ensure that the alignment process can filter out noise information and retain high-quality collaborative knowledge. Specifically, this module evaluates the quality of item embeddings from both a statistical perspective and a collaborative perspective. From a statistical perspective, the present invention adjusts the impact of cold-start items based on the popularity information of items to avoid low-quality embeddings interfering with model learning. From a collaborative perspective, the present invention measures the collaborative similarity between items, sets an adaptability threshold, screens out reliable collaborative signals, and suppresses the spread of noise information. Ultimately, this module can ensure that the large language model focuses on learning high-quality collaborative information, thereby improving the accuracy and generalization ability of the recommendation system.

[0028] Specifically, an embodiment of the present invention provides a large language model recommendation method based on collaborative similarity alignment. Figure 1 This is a flow chart of the large language model recommendation method based on collaborative similarity alignment of the present invention. Figure 1 As shown, the process includes the following steps: S100, similarity alignment stage: extract vector representations of items from the language space embedding generated by the large language model and the behavior space embedding generated by the collaborative filtering method; The first similarity matrix between language space embeddings and the second similarity matrix between behavior space embeddings are calculated. By minimizing the difference between the first similarity matrix and the second similarity matrix, the parameters of the large language model are adjusted so that the language space embeddings reflect the similarity relationship of the behavior space embeddings. It should be noted that the cosine similarity algorithm is used to calculate both the first similarity matrix and the second similarity matrix.

[0029] Specifically, the language space embedding is extracted by: using a large language model to encode the text information of the item and generate a semantic embedding vector; The behavior space embedding is extracted by training the collaborative filtering model based on the user-item interaction matrix to obtain the item ID embedding vector.

[0030] Because the embedding space of a large language model (LLM) differs significantly from that of traditional collaborative filtering methods in terms of representation and feature distribution, directly aligning the two embeddings will result in information loss or semantic distortion. Therefore, this paper proposes a similarity alignment mechanism that, by comparing the similarity structures in the two spaces, guides the LLM embeddings to gradually approach the collaborative information contained in user behavior data, thereby addressing the shortcomings of traditional adapter methods.

[0031] The present invention first extracts vector representations of items from the language space (semantic embedding generated by LLMs) and the behavior space (ID embedding based on collaborative filtering method).

[0032] Behavior Space Embedding: We use mature collaborative filtering methods (such as LightGCN and SASRec) to obtain embedding vectors for item IDs. These embedding vectors are trained using the user-item interaction matrix and can capture the collaborative relationships between items.

[0033] ; in, represents the embedded information obtained by the traditional ID-based recommendation method, c represents the traditional collaborative filtering method, Indicates the parameter information that has been trained. Indicates that the traditional recommendation system is used to process item i.

[0034] Language space embedding: For each item, the present invention uses a large language model to encode its text information (such as title and description) to generate a high-dimensional semantic embedding.

[0035] ; in, Represents the embedded information obtained by encoding the title through the large model, Represents the parameters of the large model, LLM means using a large-scale language model to process item i, Represents the title of item i.

[0036] Furthermore, in order to establish a connection between the two spaces, the present invention calculates the behavior space similarity and the language space similarity respectively, and uses them as the basis for alignment.

[0037] Behavior space similarity: Measure the similarity between item pairs in collaborative filtering methods by calculating the cosine similarity between ID-based embedding vectors.

[0038] Language space similarity: The cosine similarity between the item embeddings generated by LLMs is calculated to measure their proximity in the semantic space.

[0039] ; Among them, i and j represent two different items. and Represents items i and j after traditional methods The representation obtained later, and They represent the representations of items i and j after being processed by a large-scale language model. , Represents the similarity between items i and j in the behavior space and language space respectively, and cosine_similarity represents the cosine similarity between two vectors.

[0040] Furthermore, after obtaining the similarity matrices of the two spaces, the present invention uses similarity alignment loss to optimize the parameters of the large language model to minimize the similarity difference between the two spaces; ; Represents a distance function used to express similarity and Note that any distance function can be used to calculate the difference between the two. It represents the difference between the information of items i and j. The difference here is calculated by default using the distance function, that is, the greater the distance, the greater the difference between items i and j. The differences between all item pairs (i, j) are accumulated as an alignment loss. Our goal is to reduce this alignment loss, thereby aligning the signals of traditional recommendation methods with those of large-scale language model methods. Without loss of generality, the Manhattan distance is used as the loss function to optimize the differences, directly adjusting the embedding parameters of the large language model to minimize the differences. This paper uses the Manhattan distance: ; Represents a distance function used to express similarity and The difference between represents the difference between two similarities, and | - | represents the absolute value sign.

[0041] In addition, the present invention directly adjusts the embedding of the large model so that it actively approaches the similarity structure of the behavior space during training, thereby avoiding the traditional adapter method that only performs simple embedding conversion and causes information loss.

[0042] S200, quality assessment stage: Based on the statistical perspective and the collaborative perspective, the behavior space embedding is evaluated to select high-quality collaborative signals that meet the pre-screening conditions. The statistical perspective adjusts the weight of collaborative similarity based on the historical interaction frequency of items, and the collaborative perspective filters out low-quality similarity item pairs by setting a preset threshold. The specific screening from a statistical perspective is as follows: the popularity weight of an item is calculated based on its historical number of interactions, and the collaborative similarity is weighted based on this weight to reduce the impact of cold-start items on similarity alignment.

[0043] The screening of collaborative perspectives includes: Set a similarity threshold and reduce the weight of item pairs in the alignment process or exclude them directly if their similarity in the behavior space is lower than the threshold.

[0044] The collaborative filtering model is selected from LightGCN or SASRec.

[0045] The similarity threshold is set as follows: according to the distribution characteristics of the behavior space similarity matrix, the threshold is dynamically adjusted to adapt to the noise level of different data sets.

[0046] Specifically, while similarity alignment enables LLMs to learn collaborative knowledge, ID embeddings in traditional collaborative filtering methods often contain noise. For example, low-quality embeddings of cold-start items can affect model learning. Therefore, this paper further designs a quality assessment module to ensure that LLMs only absorb high-quality collaborative signals. Its formula is as follows: ; in, represents the difference between items i and j, Represents the distance difference between two similarities, Represents the weight of this distance, that is Not only is the distance function Constraints should also be constrained by a weight function to prevent certain items from having too much influence on (i, j). Weight It is divided into three parts, among which, represents the weight coefficient of the coupling information between items i and j, and and = ∑ i = 1 and j = ∑ j = 1 and 2 respectively represent the weights of the internal attributes of items i and j, and their specific forms will be shown below. It is worth noting that this formula is a generalized form, and such methods should be included in the scope of the present invention.

[0047] Furthermore, since interaction data for cold-start items is sparse, their embedding vectors often lack sufficient training and cannot accurately reflect the true collaborative relationships between items. Therefore, the present invention adopts a popularity-weighted strategy to adjust the similarity weight of an item based on its historical interaction frequency.

[0048] The present invention uses the following function to measure the popularity of items and weights their collaborative similarity: ; in, It represents the weight of the internal attributes of item i. Tanh represents the tangent function, which is expressed as tanh(x)=sinh(x) / cosh(x), which is used to limit the weight range to between -1 and 1. Log represents the logarithmic function, which is used to prevent the numerical inflation caused by excessive pop function. Pop(i) represents the number of historical interactions of item i. This is a hyperparameter that controls the influence of popularity. By using this method, the model can pay more attention to items with higher popularity and weaken the influence of cold start items on similarity alignment.

[0049] Relying solely on popularity information is not sufficient to completely remove low-quality embeddings. Therefore, the present invention further adopts a collaborative similarity screening strategy to filter out noise information based on the collaborative relationship between items.

[0050] ; in, Represents the similarity between items i and j in the traditional recommendation embedding space, is the set threshold. represents the indicator function, that is, when Greater than threshold When the output is 1, Less than threshold , the output is 0. It represents the weight of the coupling information output between items i and j. For item pairs below this threshold, the present invention reduces their influence during the alignment process, ensuring that LLMs only learn high-quality collaborative information.

[0051] Finally, this paper combines statistical and collaborative perspectives to construct a robust quality assessment mechanism, which enables the large language model to absorb collaborative signals while avoiding noise interference, thereby improving the reliability and generalization ability of recommendations. ; As mentioned above, Represents the weight coefficient corresponding to the distance function, which is used to re-evaluate the alignment difference between item pairs (i, j). That is the coupling coefficient , and It represents the weight coefficient formed by the internal attributes of items i and j. The final weight coefficient is obtained by multiplying these three This weight coefficient indicates that only pairs of items that are similar in the traditional recommendation embedding space and have a sufficient number of occurrences (i.e., pairs that have been trained sufficiently) are more likely to participate in alignment training. This is because traditional recommendation systems contain a large amount of noise information. If the item itself is a cold start item, its embedding information is unreliable.

[0052] S300, joint training phase: By jointly optimizing the similarity alignment loss and the standard training objectives of the language model, complete end-to-end model training is performed to generate recommendation results.

[0053] This paper achieves end-to-end training by jointly optimizing the similarity alignment loss and the next word prediction loss: ; ; ; Among them, CE represents the cross entropy loss, that is, given a text information , based on the parameters of the large model , we can get the prediction result of the next word , then we need to use CE, that is, cross entropy loss, to calculate the prediction results With the correct result The difference between. In the example, N represents the total number of samples, and L represents the total number of words in the text information of a sample. Represented as each predicted word in all samples With the correct word The sum of the differences between is the standard training target of the language model, and It is the similarity alignment loss, which has been explained in detail above. To balance the hyperparameters of the two.

[0054] The present invention proposes a novel similarity-aware large model recommendation framework structure to seamlessly integrate the rich information contained in collaborative similarity. Specifically, the present invention first introduces an alignment module, which includes extracting embeddings from the large language model and the behavior space, calculating their respective similarities, and finally aligning these similarities, thereby avoiding the limitation of the adapter in the traditional method that only converts the embedding but cannot fully understand the collaborative signal. In addition, in order to improve the robustness of the large model, the present invention further designs a quality assessment module, which evaluates the quality of item embeddings from both statistical and collaborative perspectives, accurately screens and filters noise information, and ensures that the large model can learn stable and reliable collaborative knowledge, thereby significantly improving the accuracy and generalization ability of recommendations.

[0055] As can be seen from the technical solutions provided by the present invention, compared to other embedding conversion methods for large-scale model recommendation, this invention explores a more fundamental collaborative similarity signal to guide the large-scale model in learning recommendation knowledge, thus avoiding information loss. Furthermore, the quality assessment module introduced in this invention can accurately filter out noisy data and retain only high-quality collaborative signals, thereby improving the accuracy and generalizability of recommendation results.

[0056] An embodiment of the present invention also provides a large language model recommendation device based on collaborative similarity alignment, which is used to implement the above-mentioned method embodiment, and will not be repeated hereafter. The terms "module", "unit", "sub-unit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, implementation by hardware or a combination of software and hardware is also possible and conceived.

[0057] like Figure 3 As shown, Figure 3 This is a structural block diagram of a large language model recommendation device based on collaborative similarity alignment in the present invention, which includes: A similarity alignment module 101 is used to extract vector representations of items from the language space embedding generated by the large language model and the behavior space embedding generated by the collaborative filtering method; calculating a first similarity matrix between the language space embeddings and a second similarity matrix between the behavior space embeddings, and adjusting parameters of the large language model by minimizing the difference between the first similarity matrix and the second similarity matrix so that the language space embeddings reflect the similarity relationship of the behavior space embeddings; A quality assessment module 102 is configured to perform a quality assessment on the behavior space embedding based on a statistical perspective and a collaborative perspective, and filter out high-quality collaborative signals that meet pre-screening conditions. The statistical perspective adjusts the weight of collaborative similarity based on the historical interaction frequency of items, and the collaborative perspective filters out item pairs with low quality similarity by setting a preset threshold. The joint training module 103 is used to perform end-to-end model training by jointly optimizing the similarity alignment loss and the standard training objective of the language model to generate recommendation results.

[0058] Figure 4 A structural block diagram of an electronic device provided by an embodiment of the present invention, such as Figure 4 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the following method: S100, similarity alignment stage: extract vector representations of items from the language space embedding generated by the large language model and the behavior space embedding generated by the collaborative filtering method; calculating a first similarity matrix between the language space embeddings and a second similarity matrix between the behavior space embeddings, and adjusting parameters of the large language model by minimizing the difference between the first similarity matrix and the second similarity matrix so that the language space embeddings reflect the similarity relationship of the behavior space embeddings; S200, quality assessment stage: The behavior space embedding is evaluated based on statistical and collaborative perspectives to screen out high-quality collaborative signals that meet pre-screening conditions. The statistical perspective adjusts the weight of collaborative similarity based on the historical interaction frequency of items, and the collaborative perspective filters out item pairs with low quality similarity by setting a preset threshold. S300, joint training phase: By jointly optimizing the similarity alignment loss and the standard training objectives of the language model, complete end-to-end model training is performed to generate recommendation results.

[0059] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0060] An embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method provided in the above embodiments is implemented.

[0061] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.

[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A large language model recommendation method based on collaborative similarity alignment, characterized in that: The large language model recommendation method based on collaborative similarity alignment includes: S100, similarity alignment stage: extracting vector representations of items from the language space embedding generated by the large language model and the behavior space embedding generated by the collaborative filtering method; calculating a first similarity matrix between the language space embeddings and a second similarity matrix between the behavior space embeddings; and adjusting the parameters of the large language model by minimizing the difference between the first similarity matrix and the second similarity matrix so that the language space embedding reflects the similarity relationship of the behavior space embedding; S200, quality assessment stage: The behavior space embedding is evaluated based on statistical and collaborative perspectives to screen out high-quality collaborative signals that meet pre-screening conditions. The statistical perspective adjusts the weight of collaborative similarity based on the historical interaction frequency of items, and the collaborative perspective filters out item pairs with low quality similarity by setting a preset threshold. S300, joint training phase: By jointly optimizing the similarity alignment loss and the standard training objectives of the language model, complete end-to-end model training is performed to generate recommendation results.

2. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The method of extracting the language space embedding includes: encoding the text information of the object using a large language model to generate a semantic embedding vector; The behavior space embedding is extracted by obtaining the item ID embedding vector through collaborative filtering model training based on the user-item interaction matrix.

3. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The first similarity matrix and the second similarity matrix are both calculated using a cosine similarity algorithm.

4. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The optimization of the difference adopts Manhattan distance as the loss function, and directly adjusts the embedding parameters of the large language model to minimize the difference.

5. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The statistical perspective screening is specifically as follows: calculating the popularity weight of an item according to its historical interaction times, and weighting the collaborative similarity based on the weight to reduce the impact of cold start items on similarity alignment.

6. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The collaborative perspective filters out low-quality similarity item pairs by setting a preset threshold, which can be formalized as follows: ; in, Represents the similarity between items i and j in the behavior space, is the set threshold, Represents the weight coefficient of the coupling information between i and j.

7. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The screening of the collaborative perspective includes: Set a similarity threshold, and reduce the weight of item pairs in the alignment process or directly exclude them if their similarity in the behavior space is lower than the threshold.

8. The large language model recommendation method based on collaborative similarity alignment according to claim 1, characterized in that: The loss function of the joint training is: ; in, is the standard training loss for the language model, is the similarity alignment loss, To balance the hyperparameters.

9. The large language model recommendation method based on collaborative similarity alignment according to claim 2, characterized in that: The collaborative filtering model is selected from one of LightGCN and SASRec.

10. The large language model recommendation method based on collaborative similarity alignment according to claim 7, characterized in that: The similarity threshold is set in such a way that the threshold is dynamically adjusted according to the distribution characteristics of the behavior space similarity matrix to adapt to the noise levels of different data sets.

Citation Information

Patent Citations

  • Personalized recommendation method and device, electronic equipment and readable storage medium

    CN117992672A

  • Cross-domain sequence recommendation method and system based on sequence perception article feature alignment

    CN118132846A

  • Graph denoising collaborative filtering recommendation method based on alignment and uniformity

    CN120541312A