A diffusion recommendation method and system based on dynamic mask modeling
Through the dynamic mask modeling method, combined with the dual probabilistic masking strategy of local correlation and global stationarity score, the guidance signal generation of the diffusion model is optimized, which solves the problem of fixed and single guidance signal in the diffusion model recommendation system and improves the recommendation quality and efficiency.
Patent Information
- Application Number
- CN202511013272.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-23
AI Technical Summary
The guidance signal in the existing diffusion model recommendation system is fixed and single, which cannot effectively reflect the dynamics and randomness of user interaction sequences, resulting in poor recommendation quality.
A method based on dynamic mask modeling is adopted to generate dynamically adaptive editing sequences through a dual probabilistic masking strategy of local correlation score and global stationarity score. The generation process of guidance signals is optimized by combining a denoising diffusion implicit model and a classifier-free guidance strategy.
It improves the robustness and flexibility of the diffusion model recommendation system for dynamic interaction sequences, improves the quality and efficiency of generating recommendations, reduces computational costs, and is suitable for large-scale recommendation tasks.
Smart Images

Figure CN120524040B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of recommendation systems, and more specifically to a diffusion recommendation method and system based on dynamic mask modeling. Background Art
[0002] With the widespread adoption of recommendation systems, generating personalized recommendations based on historical user interactions has become a key technical challenge. Current sequential recommendation methods primarily fall into two paradigms: classification and generative. Generative recommendation methods, by modeling user interaction sequences and generating target items, have shown significant potential. Among them, the denoising diffusion model, due to its powerful generative capabilities and ability to model complex distributions, has gradually become a key tool for recommendation tasks.
[0003] In diffusion models, a common approach is to first perform multi-step noise addition on the target items. Then, the user interaction sequence is encoded and modeled as a guidance signal for the diffusion model, guiding the diffusion model to gradually denoise the noisy target items. The modeling of user sequences is often crucial, impacting the quality of the guidance signal and the diffusion model's ability to perform personalized denoising. Due to the randomness and dynamic nature of sequence data in sequence recommendation tasks, traditional Transformer-based sequence modeling methods cannot effectively reflect these data characteristics, resulting in a fixed and single representation of the guidance signal. Summary of the Invention
[0004] In this embodiment, a diffusion recommendation method, system, electronic device, and storage medium based on dynamic mask modeling are provided to solve the problem of a fixed and single guidance signal in a diffusion model recommendation system in related technologies.
[0005] In a first aspect, an embodiment of the present invention provides a diffusion recommendation method based on dynamic mask modeling, the diffusion recommendation method based on dynamic mask modeling comprising:
[0006] Performing dynamic masking on the user's historical interaction sequence, wherein the dynamic masking includes a dual probabilistic masking strategy based on a local correlation score and a global stationarity score to generate a dynamically adaptive editing sequence;
[0007] Passing the edit sequence through an encoder to generate a dynamic guidance signal;
[0008] Based on the denoising diffusion implicit model and the dynamic guidance signal, the noisy target items are gradually denoised to generate recommendation results;
[0009] Get Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
[0010] In an optional embodiment, the correlation scores of the items in the sequence are calculated using a similarity function of adjacent items, and the correlation scores are normalized. The specific formula is:
[0011] ;
[0012] in, Indicates adjacent items, represents the similarity function, represents the relevance score, Normalize the similarity score and convert it into a probability distribution; is the total length of the user's historical interaction sequence.
[0013] In an optional embodiment, the calculation of the global stationarity score includes:
[0014] The stationarity is measured based on the entropy of the continuity distribution of items in the user's historical interaction sequence, and the entropy is normalized. The formula is:
[0015] ;
[0016] Where, is the stationarity score, represents the relevance score, It is the normalization of the continuity distribution entropy of the sequence.
[0017] In an optional embodiment, the dual probabilistic masking strategy is specifically:
[0018] Probabilistic models were constructed based on the local correlation score and the global stationarity score respectively;
[0019] By comparing the sampling probability value with the preset threshold, it is determined whether to mask the items in the sequence.
[0020] In an optional embodiment, the mask threshold is a dynamically adjustable parameter used to control the mask ratio to adapt to different data characteristics.
[0021] In an optional embodiment, the encoder is a Transformer structure, which is used to encode the masked edit sequence into a conditional guidance signal.
[0022] In an optional embodiment, the denoising diffusion process adopts a classifier-free guidance strategy to jointly train the conditional model and the unconditional model, and balance the generation weights of the two through linear combination.
[0023] Compared with the prior art, the diffusion recommendation method based on dynamic mask modeling of the present invention has the following beneficial effects:
[0024] This paper uses a dual-random masking strategy, combining local correlation and global stationarity, to model dynamic and random interaction sequences, optimize the generation of guidance signals, and improve the robustness and flexibility of diffusion model recommendation systems for dynamic interaction sequences. The dynamic generative recommendation framework innovatively combines dynamic guidance signals with a denoising diffusion model, enhancing the adaptability of the generative model to dynamic sequences and improving the quality of generated recommendations. Efficient reverse sampling optimization optimizes the reverse sampling process within the DDIM framework, reducing the number of diffusion steps, significantly improving generation efficiency, and lowering computational costs, making it suitable for large-scale recommendation tasks.
[0025] In a second aspect, an embodiment of the present invention provides a diffusion recommendation system based on dynamic mask modeling, including:
[0026] A dynamic masking module is used to perform dynamic masking processing on the user's historical interaction sequence. The dynamic masking processing includes a dual probabilistic masking strategy based on the local correlation score and the global stationarity score to generate a dynamic and adaptive editing sequence;
[0027] an encoding module, configured to generate a dynamic guidance signal by encoding the edit sequence;
[0028] a diffusion generation module, configured to gradually denoise the noisy target items based on a denoising diffusion implicit model in combination with the dynamic guidance signal to generate a recommendation result;
[0029] The retrieval module is used to obtain Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
[0030] 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.
[0031] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the diffusion recommendation method based on dynamic mask modeling as described in the first aspect are implemented.
[0032] Compared with the prior art, the beneficial effects of the diffusion recommendation system, electronic device, and storage medium based on dynamic mask modeling of the present invention are the same as those of the diffusion recommendation method based on dynamic mask modeling described in the first aspect, so they will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] 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.
[0034] Figure 1 Flowchart of a diffusion recommendation method based on dynamic mask modeling in an embodiment of the present invention;
[0035] Figure 2 2 is a framework diagram of DyDiffRec in an embodiment of the present invention;
[0036] Figure 3 Schematic diagram of the forward noise addition and reverse noise addition probabilities in an embodiment of the present invention;
[0037] Figure 4 4 is a structural block diagram of a diffusion recommendation system based on dynamic mask modeling in an embodiment of the present invention;
[0038] Figure 5 2 is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] 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.
[0040] 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.
[0041] The following scheme can be understood as proposing a dynamic mask modeling diffusion model (DyDiffRec) as follows Figure 2 As shown, Figure 2 The schematic diagram of DyDiffRec's framework aims to enhance the flexibility of modeling interaction sequences in sequential recommendation tasks. Due to the randomness and variability of sequence data, this problem is treated as a dynamic problem, and a two-layer random masking strategy is used to enhance the flexibility of sequence modeling. To maintain the evolution of user intent during dynamic modeling, two probabilistic models are first defined for the probabilistic masking strategy: one for locally modeling the shift in user interest between items, and the other for globally assessing the stability of user intent within the sequence. Then, historical interaction sequences are probabilistically masked based on these two probabilistic models, rather than an average, indiscriminate random mask.
[0042] In an embodiment of the present invention, a diffusion recommendation method based on dynamic mask modeling is provided. Figure 1 is a flow chart of the diffusion recommendation method based on dynamic mask modeling of the present invention, as shown in FIG. Figure 1 As shown, the process includes the following steps:
[0043] S100, performing dynamic masking processing on the user's historical interaction sequence, where the dynamic masking processing includes a dual probabilistic masking strategy based on a local correlation score and a global stationarity score to generate a dynamic and adaptive editing sequence;
[0044] We introduce two core probabilistic models to capture the dynamic evolution of user preferences. First, we calculate the parameters of the two probabilistic models: the relevance score (local) and the stationarity score (global).
[0045] The relevance score is calculated as follows: by calculating the interaction sequence The similarity of adjacent items in the ,evaluates the correlation between local items. Adjacent items with high correlation can reflect the users’ common interests and hobbies. Specifically, the similarity function sim() is used to calculate the adjacent items. and The cosine similarity of the adjacent items is normalized using the softmax() function to obtain the similarity scores of each item in the sequence. .
[0046] Specifically, the relevance scores of items in the sequence are calculated using the similarity function of adjacent items, and the relevance scores are normalized. The specific formula is:
[0047] ;
[0048] in, Indicates adjacent items, represents the similarity function, represents the relevance score, Normalize the similarity score and convert it into a probability distribution; is the total length of the user's historical interaction sequence.
[0049] The stationarity score is calculated as follows: by calculating the kth interaction sequence in the batch The continuity distribution entropy value of the sequence is used to measure the stationarity of the sequence. A sequence with high stability indicates that user preferences are relatively stable, while a sequence with low stability indicates that preferences change frequently. Each item The corresponding similarity score , calculate the continuity entropy value corresponding to the sequence, the calculation formula is as follows:
[0050] ;
[0051] Then use the softmax() function to normalize the continuity distribution entropy of the sequence to obtain the stationarity score .
[0052] Specifically, the calculation of the global stationarity score includes:
[0053] The stationarity is measured based on the entropy value of the continuity distribution of items in the user's historical interaction sequence, and the entropy value is normalized. The formula is:
[0054] ;
[0055] Where, is the stationarity score, represents the relevance score, It is the normalization of the continuity distribution entropy of the sequence.
[0056] Furthermore, the double probabilistic masking strategy is specifically as follows:
[0057] Probabilistic models were constructed based on the local correlation score and the global stationarity score respectively;
[0058] By comparing the sampling probability value with the preset threshold, it is determined whether to mask the items in the sequence.
[0059] Specifically, the probability model is parameterized by the correlation score and the stationary score: and ,in and is a random variable between 0 and 1. and As a distribution parameter of a probability model (e.g. Poisson distribution, Bernoulli distribution, Gamma distribution). The lower the value of The higher the value of , the higher the probability of sampling the kth sequence and the nth item in it. These two probabilistic models complement each other, jointly describing the local changes and global trends of user preferences over time, and providing a masking basis for further modeling of dynamic interaction sequences.
[0060] S200, generating a dynamic guidance signal by encoding the edit sequence;
[0061] It should be noted that the mask threshold is a dynamically adjustable parameter used to control the mask ratio to adapt to different data characteristics.
[0062] Specifically, this method adopts a double probabilistic masking strategy to perform probabilistic random masking on the user interaction sequence and the items in the sequence to generate a dynamic and adaptive guidance signal. Specifically, we perform probabilistic sampling based on the two probabilistic models defined above. For each sequence k in the batch, the global probabilistic model Sample them in sequence and get the sampling probability of K sequences respectively ( The value belongs to 0-1); for each item n in sequence k, the local probability model Sample them in sequence to obtain the sampling probability of N-2 items in the sequence The specific sampling formula is as follows:
[0063] ;
[0064] According to the parameter characteristics of the two probability models, the probability values obtained by sampling the interaction sequence with a higher stationarity score and the item with a higher correlation score ( as well as ) tends to be closer to 1. Two thresholds are introduced for the dual probabilistic masking strategy and , respectively controlling whether sequence k and item n in the sequence should be masked. Greater than the set threshold and Greater than , then item n in sequence k is masked. Since the sampling probability of highly stationary sequences and highly correlated items tends to be closer to 1, the probability of such items being removed by the double probability masking mechanism is greater. Removing such items will have less impact on the fluctuation of user preferences reflected in the sequence. Therefore, the double masking strategy can reflect the dynamics and randomness of the interaction sequence while retaining the evolution law of user preferences to the greatest extent. The two masking thresholds can control the proportion of random masking. The higher the threshold, the fewer items are masked. The masking threshold allows dynamic masking to flexibly adapt to different data quality and sequence characteristics. Through this dynamic masking, the double masking mechanism can obtain a sequence after random editing. .
[0065] It should be noted that the encoder is a Transformer structure, which is used to encode the masked edit sequence into a conditional guidance signal.
[0066] Specifically, through the Transformer encoder , this method encodes the edit sequence generated based on the dual probabilistic mask model into a dynamic and adaptive guidance signal , providing a robust conditional input for the diffusion process.
[0067] ;
[0068] S300, based on the denoising diffusion implicit model combined with the dynamic guidance signal, the noisy target items are gradually denoised to generate recommendation results;
[0069] It should be noted that the denoising diffusion process adopts a classifier-free guidance strategy to jointly train the conditional model and the unconditional model, and balance the generation weights of the two through linear combination.
[0070] S400: Obtain Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
[0071] In combination with the above, this method adopts a classifier-free guidance strategy to jointly train the conditional model and the unconditional model. Specifically, during the training process, the guidance signal is replaced by a dummy token (Φ) and using the modified This method helps train the model's performance under different conditions, so that the model can still maintain a certain generation ability in the absence of guidance signals.
[0072] like Figure 3 As shown, during the training process, the target item ( ) is added with noise and converted into an object with noise ( Specifically, set The noise adding process gradually adds the next target item that the user will click on. Apply Gaussian noise , get each Noise items The mathematical formula for this process can be expressed as:
[0073] ;
[0074] Equivalent to , represents the original item representation without noise, Represents the coefficient of noise addition, and then trains the denoising neural network ( ) to recover the real target object from the noisy object .
[0075] ;
[0076] ;
[0077] represents the prediction result of the denoising neural network on the original item representation, represents the training loss of the denoising neural network, Indicates expectation. In the generation phase, the trained denoising model is used The generation process is divided into multiple reverse sampling steps. Each generated item depends on the result of the previous step, and the target item is gradually denoised. Perform noise initialization:
[0078] ;
[0079] represents standard Gaussian noise. To combine conditional and unconditional generation, DyDiffRec introduces a linear combination in the denoising step:
[0080] ;
[0081] Where m is a hyperparameter of the guidance strength, which controls the balance between conditional and unconditional generation of the model. When m is larger, the model relies more on the guidance signal. , when m is small, the model relies more on unconditional generation. Ultimately, the goal of the reverse sampling process is to recover the target object from the noise , perform step-by-step back diffusion using the following formula:
[0082] ;
[0083] This process continues until the complete target item is generated.
[0084] Once the target item is generated ,DyDiffRec obtains the K most similar items from the candidate items through K-nearest neighbor retrieval (KNN) and returns the Top-K recommendation results.
[0085] This paper uses a dual-random masking strategy, combining local correlation and global stationarity, to model dynamic and random interaction sequences, optimize the generation of guidance signals, and improve the robustness and flexibility of diffusion model recommendation systems for dynamic interaction sequences. The dynamic generative recommendation framework innovatively combines dynamic guidance signals with a denoising diffusion model, enhancing the adaptability of the generative model to dynamic sequences and improving the quality of generated recommendations. Efficient reverse sampling optimization optimizes the reverse sampling process within the DDIM framework, reducing the number of diffusion steps, significantly improving generation efficiency, and lowering computational costs, making it suitable for large-scale recommendation tasks.
[0086] The above advantages are demonstrated through exhaustive experiments. To evaluate the effectiveness of our method, we used three datasets: Yoochoose, Zhihu, and KuaiRec. We also employed two evaluation metrics defined in previous research: HitRatio and Normalized Discounted Cumulative Gain (NDCG).
[0087] DyDiffRec was compared with several baseline models in terms of recommendation performance. Table 1 presents the experimental results, demonstrating that DyDiffRec outperforms all baseline models on all three datasets. For example, on the KuaiRec dataset, compared to DreamRec, a generative recommendation model based on dynamic data loss modeling (DDM), DyDiffRec achieves improvements of 5.84% and 13.84% in HR@20 and NDCG@20, respectively. This demonstrates that the guidance mechanism of dynamic data loss simulation enhances DDM's robustness to unreliable sequences, thereby improving overall recommendation performance. Furthermore, on the YooChoose dataset, DyDiffRec's NDCG@20 is at least 26.95% higher than methods specifically designed to handle missing data, such as IPS, DiffuASR, and PDRec, validating the advantages of the double random masking strategy in coping with missing data. These results provide strong evidence that the proposed dynamic adaptive guided diffusion model effectively mitigates the impact of missing data on user behavior sequences, thereby enhancing recommendation performance.
[0088] Table 1 Comparison of DyDiffRec and existing methods on sequence model recommendation tasks
[0089]
[0090] The double random masking strategy proposed in this paper can be used as a general algorithm to improve the robustness of recommendation systems to dynamic random interaction sequences. To verify the performance of the double masking strategy when extended to traditional recommenders, experiments were conducted on other recommenders, including GRU4Rec, SASRec, and CL4Rec. The experimental results are shown in Table 2. Applying the double masking strategy to traditional recommenders almost universally improves recommendation performance. This empirically demonstrates the effectiveness and scalability of our proposed masking strategy. Notably, it achieves the highest average performance improvement when applied to DreamRec, a generative recommender using a diffusion model.
[0091] Table 2 Scalability of dynamic masking on various recommendation models
[0092]
[0093] Compared with traditional DDPM, DyDiffRec reduces computation time by two orders of magnitude under the DDIM framework, especially on large-scale datasets, verifying its efficient generation capability and adaptability to real-time recommendation scenarios.
[0094] Table 3 Comparison of DyDiffRec and baseline methods in training and inference time
[0095]
[0096] The present invention also provides a diffusion recommendation system based on dynamic mask modeling, which is used to implement the above-mentioned method embodiment. The terms "module," "unit," "subunit," etc. used below may refer to a combination of software and / or hardware that implements the predetermined functions. Although the system described in the following embodiments is preferably implemented in software, implementation in hardware or a combination of software and hardware is also possible and contemplated.
[0097] like Figure 4 As shown, Figure 4 : is a structural block diagram of the diffusion recommendation system based on dynamic mask modeling in the present invention, which includes:
[0098] A dynamic masking module 101 is configured to perform dynamic masking on a user's historical interaction sequence. The dynamic masking includes a dual probabilistic masking strategy based on a local correlation score and a global stationarity score to generate a dynamic and adaptive editing sequence.
[0099] An encoding module 102, configured to generate a dynamic guidance signal by encoding the edit sequence;
[0100] Diffusion generation module 103, configured to gradually denoise the noisy target items based on the denoising diffusion implicit model in combination with the dynamic guidance signal to generate recommendation results;
[0101] The retrieval module 104 is used to obtain Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
[0102] The technical problems solved and the implementation methods of the diffusion recommendation system based on dynamic mask modeling in this embodiment are the same as those of the diffusion recommendation method based on dynamic mask modeling, so they will not be described in detail here.
[0103] Figure 5 A structural block diagram of an electronic device provided by an embodiment of the present invention, such as Figure 5 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:
[0104] Performing dynamic masking on the user's historical interaction sequence, wherein the dynamic masking includes a dual probabilistic masking strategy based on a local correlation score and a global stationarity score to generate a dynamically adaptive editing sequence;
[0105] Passing the edit sequence through an encoder to generate a dynamic guidance signal;
[0106] Based on the denoising diffusion implicit model and the dynamic guidance signal, the noisy target items are gradually denoised to generate recommendation results;
[0107] Get Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
[0108] 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.
[0109] 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.
[0110] 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 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 causing 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.
[0111] 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 diffusion recommendation method based on dynamic mask modeling, characterized in that: The recommended methods include: Dynamic masking is performed on the user's historical interaction sequence, and the dynamic masking includes: The local relevance score of items in the sequence is calculated by the similarity function of adjacent items: ; in, Indicates adjacent items, represents the similarity function, Normalize the similarity score; Calculate the global stationarity score based on the continuity distribution entropy of the sequence: ; Where, represents the relevance score, The continuity distribution entropy of the sequence is normalized; Based on local relevance score and the global stationarity score Construct local probability models separately and global probability model ,in and is a random variable between 0 and 1. and as distribution parameters of the probability model; Sampling from the local probability model to obtain item-level sampling probability , sampling from the global probability model to obtain the sequence-level sampling probability ; Will With local mask threshold Compare, With global mask threshold Compare, if both meet Greater than and Greater than , then mask the corresponding items in the sequence to generate a dynamically adaptive edit sequence; Passing the edit sequence through an encoder to generate a dynamic guidance signal; Based on the denoising diffusion implicit model and the dynamic guidance signal, the noisy target items are gradually denoised to generate recommendation results; Get Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
2. The diffusion recommendation method based on dynamic mask modeling according to claim 1, characterized in that: The mask threshold is a dynamically adjustable parameter used to control the mask ratio to adapt to different data characteristics.
3. The diffusion recommendation method based on dynamic mask modeling according to claim 1, characterized in that: The encoder is a Transformer structure, which is used to encode the masked edit sequence into a conditional guidance signal.
4. The diffusion recommendation method based on dynamic mask modeling according to claim 1, characterized in that: The denoising diffusion process adopts a classifier-free guidance strategy, jointly trains the conditional model and the unconditional model, and balances the generation weights of the two through linear combination.
5. A diffusion recommendation system based on dynamic mask modeling, characterized in that: include: The dynamic masking module is used to perform dynamic masking processing on the user's historical interaction sequence. The dynamic masking processing includes: The local relevance score of items in the sequence is calculated by the similarity function of adjacent items: ; in, Indicates adjacent items, represents the similarity function, Normalize the similarity score; Calculate the global stationarity score based on the continuity distribution entropy of the sequence: ; Where, represents the relevance score, The continuity distribution entropy of the sequence is normalized; Based on local relevance score and the global stationarity score Construct local probability models separately and global probability model ,in and is a random variable between 0 and 1. and as distribution parameters of the probability model; Sampling from the local probability model to obtain item-level sampling probability , sampling from the global probability model to obtain the sequence-level sampling probability ; Will With local mask threshold Compare, With global mask threshold Compare, if both meet Greater than and Greater than , then mask the corresponding items in the sequence to generate a dynamically adaptive edit sequence; an encoding module, configured to generate a dynamic guidance signal by encoding the edit sequence; a diffusion generation module, configured to gradually denoise the noisy target items based on a denoising diffusion implicit model in combination with the dynamic guidance signal to generate a recommendation result; The retrieval module is used to obtain Top-K recommendation results from candidate items through K-nearest neighbor retrieval.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the diffusion recommendation method based on dynamic mask modeling according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the diffusion recommendation method based on dynamic mask modeling according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Location recommendation method based on graph mask and space-time diffusion
CN119719522A
Guide diffusion model enhancement-based graph encoder recommendation method
CN119807522A