Timing-aware diffusion model for dynamic user preferences
By constructing a dynamic matrix factorization framework and a time-aware noise predictor, the problem of insufficient timeliness of generative recommendation models in dynamic user behavior is solved, achieving accurate capture of user interests and improvement of recommendation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-19
AI Technical Summary
Existing generative recommendation models lack explicit modeling of temporal features when dealing with dynamic user behavior, resulting in insufficient timeliness of recommendation results and difficulty in accurately capturing users' real-time fine-grained preferences.
By constructing a dynamic matrix factorization framework, introducing a time mapping function to extract the time-varying features of user preferences, and combining it with a multilayer perceptron to generate a user-side time condition vector, we can achieve accurate capture of user dynamic preferences and use a time-aware noise predictor for real-time denoising modulation.
It achieves a deep alignment between users' long-term trends and immediate preferences, improving the timeliness and accuracy of recommendations and significantly enhancing the performance metrics of the recommendation system.
Smart Images

Figure CN122240928A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer recommendation systems, and specifically to a recommendation method based on a time-aware diffusion model to capture users' dynamic preferences. Background Technology
[0002] As the mobile internet enters an era of fierce competition for existing users, personalized recommendation systems have become a core engine for various internet platforms, including short videos, e-commerce, and social media, to improve user activity and business conversion rates. In these high-frequency interaction scenarios, internet platforms generate massive amounts of user behavior data daily. This data is not only highly sparse but also exhibits real-time dynamic evolution. In the real-world logic of internet business, user interests are not static but constantly changing. For example, in e-commerce, user purchase intentions are often driven by seasonal changes, promotional holidays, or short-term sudden needs; in short videos, user focus may shift from entertainment content to professional knowledge in a short period. This phenomenon is known in academia as interest drift. Traditional recommendation algorithms often use static modeling, compressing users' past interactions into a uniform representation vector. This approach has revealed significant drawbacks in internet business practice: it struggles to distinguish between long-term user preferences and short-term immediate needs, resulting in poor timeliness of model recommendations and difficulty in retaining users with fragmented attention in a highly competitive internet environment.
[0003] Generative diffusion models (DM) offer a novel approach to addressing noise and sparsity in internet data due to their superior distribution simulation capabilities. However, when applying diffusion models to real-world recommendation scenarios, a fundamental mismatch exists between existing static modeling paradigms and the strong temporal characteristics of user interests, primarily manifested in two dimensions: First, global static representations struggle to depict long-term trends in preferences. Traditional diffusion recommendation models often directly process user-item interaction matrices or treat user historical trajectories as static features that do not change over time. This approach ignores the interest drift that occurs over time (e.g., changes in consumption motivation at different ages and seasons). Lacking explicit modeling of the temporal dimension, the prior distribution generated by the model often contains excessive outdated information, failing to reflect the user's current preference stage and resulting in insufficient timeliness of recommendation results. Second, diffusion denoising trajectories lack fine-grained real-time feature guidance. In the reverse generation process of diffusion models, the model mainly relies on preset embedding steps to control noise attenuation. However, in recommendation tasks, the user's most recent interaction time and current real-time context are crucial for identifying the user's current interest level. Most existing conditional diffusion mechanisms only introduce user IDs or attributes as conditions, failing to effectively integrate the physical time dimension into the modulation of each layer of the denoising network. This "time-aware blind spot" prevents the model from adaptively adjusting its recommendation focus according to the passage of time during the inference phase, making it difficult to accurately reproduce users' real-time fine-grained preferences. Therefore, how to construct a generative recommendation architecture that deeply fits the dynamic characteristics of the Internet and can perceive the drift of user interests in real time has become an urgent technical problem to be solved. Summary of the Invention
[0004] In view of this, this invention proposes a time-aware diffusion recommendation method and system for dynamic user preferences, to solve the problems of insufficient temporal feature characterization and lack of real-time condition guidance in the denoising process of generative recommendation models when dealing with dynamic user behavior. This invention achieves accurate capture of dynamic user preferences by combining dynamic time modeling with microscopic denoising trajectory modulation.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] S1: Construct a dynamic matrix factorization framework to generate time-structured prior inputs. Introduce a time mapping function to preprocess the raw sparse interactions, extracting the temporal variation features of user preferences. Time dimension discretization and normalization: Read the timestamp information from user and item interaction data and convert it into a monthly time index. Get the global maximum time index And calculate the normalized time factor:
[0007]
[0008] in, This is used to characterize the relative position of the interaction behavior throughout the entire observation period, ensuring the numerical stability of the temporal features during gradient updates.
[0009] Construct a dual time-aware rating prediction model: Define user u for item i over normalized time. Predicted scores
[0010] The modeling formula is as follows:
[0011]
[0012] in, This represents the global average score; For project i, this is the static bias term; A user time-perceived bias is used to capture the macroscopic drift of user rating habits over time, in which For static base bias, The bias coefficient varies over time; Dynamically embedding vectors for users is used to characterize the micro-evolution of user interest preferences, where For static fundamental vectors, The interest offset vector changes over time; Embed vectors for the project.
[0013] Dynamic Parameter Learning and Loss Functions: Defining the Dynamic Matrix Factorization Loss Function By minimizing the reconstruction error of the observation data and introducing Regularization terms are used to prevent overfitting.
[0014]
[0015] in, Given a known set of interaction samples, Rate based on real interactions. is the regularization coefficient; all parameters to be determined are iteratively updated using stochastic gradient descent until the model converges.
[0016] Dense Matrix Reconstruction and Normalized Prior Generation: Traversing the user and item sets, the full dense prediction rating matrix is reconstructed using the trained parameters. ;against The potential for non-positive and skewed distributions can be addressed by using the Yeo-Johnson transform to map nonlinear distributions.
[0017]
[0018] in, This represents the Yeo-Johnson transform function. These are the characteristic parameters in the transformation, which determine the strength of the nonlinear transformation. The goal is to make the transformed data follow a Gaussian distribution (normal distribution) as closely as possible. The above transformation maps the prediction matrix to a near-Gaussian distribution space, eliminating data bias and generating a structured prior input that conforms to the initial assumptions of the diffusion model. .
[0019] S2: Extract the diffusion step embedding vector: Convert the current denoising step number k into a high-dimensional space embedding vector using sinusoidal coding or linear mapping. This is used to characterize the micro-process information during the denoising iteration process; a real-time time mapping for the user is constructed: the timestamp of the target user's most recent interaction is obtained. The multilayer perceptron (MLP) is used to project the vector onto the same feature dimension as the diffusion step embedding, generating a user-side temporal conditional vector. Dual feature fusion: embedding the diffusion step With user-side time condition vector Perform feature-level fusion to generate joint temporal conditional factors. The calculation formula is as follows:
[0020]
[0021] in Indicates an element-level fusion component; Injected as a bias term or scaling operator into the noise predictor, it enables real-time dynamic modulation of the denoising direction.
[0022] Inverse denoising distribution Represented as:
[0023]
[0024] Among them, the mean Time-aware noise predictor calculate:
[0025]
[0026] in and These are the preset noise-adding scheduling parameters.
[0027] S3: Time-aware optimization mechanism for modeling user dynamic interests: In the diffusion modeling phase, network parameters are optimized by minimizing the prediction error of the noise predictor; given the structured prior input generated by S1. Injected real Gaussian noise And the current diffusion step k, using the noise predictor Under joint time conditions Guided by the noise fitting, its diffusion model predicts the loss. Defined as:
[0028]
[0029] in, To inject real Gaussian noise, This is the regularization coefficient.
[0030] An optimization algorithm based on time backpropagation is adopted to synchronously update the time offset coefficients, user and item vectors, and conditional mapping layer parameters in the dynamic matrix factorization framework. The diffusion model is guided to perform denoising learning in the dense prior space constructed by dynamic matrix factorization, thereby deeply characterizing the transient interest drift of users at the micro time scale and realizing the model's capture of users' macro long-term trends and micro immediate preferences.
[0031] S4: Real-time recommendation generation specifically includes: input initialization and condition alignment: obtaining the last interaction timestamp of the target user u. The multilayer perceptron described in step S2 is used to convert the data into a user-side time condition vector; simultaneously, the densed user preference vector generated in step S1 is extracted and used as the structured prior initial state of the diffusion model. Condition-guided iterative denoising and restoration: Starting with the noise state after forward denoising, in each denoising step k, the current diffusion step embedding vector is fused with the user-side time condition vector to form a joint time condition. ; Inject it into a time-aware noise predictor Perform the reverse denoising iteration, as shown in the following formula:
[0032]
[0033] in, The process involves random noise, iterating until a preset number of steps is reached or convergence occurs, to obtain the restored probability distribution vector of the user's current interest. ;
[0034] Item filtering and candidate set ranking: Determine the set of uninterrupted items for user u. Extract the prediction vector The middle corresponds to The score at each index position is used to globally sort the results from highest to lowest. The recommended list output selects the top K items with the highest scores from the sorted results and constructs a personalized recommendation list to return to the user.
[0035] Attached Figure Description
[0036] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0037] Figure 1 : A framework diagram for a time-aware diffusion recommendation method based on dynamic user preferences;
[0038] Figure 2 : The comparison results of the method of this invention with other advanced methods on the public datasets ML-100K and ML-1M; Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this invention clearer and easier to understand, the following will provide a detailed description of a time-aware diffusion recommendation method for dynamic user preferences proposed in this invention. It should be understood that the specific embodiments listed herein are merely illustrative of the invention and not a substantial limitation on its scope of protection. Any equivalent substitutions, partial improvements, or modifications made by those skilled in the art without departing from the concept of this invention should fall within the scope of protection of the claims of this invention.
[0040] Figure 1 This paper presents the overall framework of the time-aware diffusion recommendation method for dynamic user preferences provided by this invention. The framework mainly consists of a dynamic matrix factorization prior generation module, a dual-temporal condition feature extraction module, a time-aware diffusion modeling module, and a real-time recommendation generation module.
[0041] Figure 2 The performance of the proposed method was measured on the publicly available datasets MovieLens-100K (ML-100K) and MovieLens-1M (ML-1M). Comparison with existing state-of-the-art recommendation models demonstrates the effectiveness of the proposed method in handling dynamic preferences, showing significant improvements in all recommendation metrics (Recall and NDCG).
[0042] Furthermore, the specific implementation steps of the present invention are described in detail below:
[0043] Step S1: Construct a dynamic matrix factorization framework to generate macroscopic temporal structured priors. This step aims to extract the long-term evolution trend of user preferences from the original sparse interaction data and transform it into a dense distribution suitable for diffusion models.
[0044] 1. Time dimension normalization processing: First, read the raw timestamps from user and project interaction data and discretize them into a time index in months. To eliminate the impact of differences in time spans across different datasets on model training stability, a normalized time factor was calculated. :
[0045]
[0046] in, This represents the maximum value of the time index in the training set, making Mapped to An interval represents the relative time position of an interactive behavior.
[0047] 2. Construct a dual-time-aware rating prediction model: Utilize dynamic matrix factorization to capture the macroscopic shifts in user interests and predict ratings. The modeling formula is as follows:
[0048]
[0049] in, The average score is the global score. For the static bias of project i; To depict the macroscopic shift of user rating habits over time; Characterize the evolution trajectory of users' underlying latent preferences over time. This is achieved by minimizing the following loss function. Optimize parameters:
[0050]
[0051] 3. Normalization of the prior distribution: After training, reconstruct the full dense prediction rating matrix. To address the skewed distribution problem, the Yeo-Johnson transform is used for nonlinear mapping:
[0052]
[0053] The mapped dense vector serves as the structured prior input to the diffusion model. This ensures that the latent space distribution aligns with the Gaussian assumption of the diffusion model.
[0054] Step S2: Construct a dual-time condition awareness mechanism. This step achieves dynamic guidance of the denoising process by fusing information on the micro-diffusion process with real-time user behavior characteristics.
[0055] 1. Conditional Feature Extraction and Fusion: Micro-step Embedding: Mapping the current denoising step number k to a high-dimensional vector. Characterizes the time progression of noise evolution; Macroscopic real-time mapping: Obtains the timestamp of the target user's last interaction. Encoded into a time conditional vector using a multilayer perceptron (MLP). Joint feature fusion: Generating joint time conditional factors using fusion operators (such as element-wise addition or concatenation). :
[0056]
[0057] 2. Inverse denoising modulation: In the inverse stage, the denoising distribution is represented as:
[0058]
[0059] Among them, the mean Time-aware noise predictor The calculation yielded:
[0060]
[0061] Step S3: Time-aware optimization mechanism and parameter update. To achieve unified modeling of long-term and short-term interests, this invention adopts a collaborative training strategy.
[0062] 1. Loss Function Definition: The goal of training a diffusion model is to minimize the noise prediction error. Its loss function is... for:
[0063]
[0064] in, The injected real Gaussian noise.
[0065] 2. Co-evolutionary optimization: The parameters of the diffusion network are updated using an optimization algorithm based on time backpropagation. By learning within a dense prior space constructed by the DMF, the diffusion model can accurately characterize the transient interest drift of users at micro-timescales.
[0066] Step S4: Real-time recommendation generation.
[0067] 1. Interest Reconstruction Inference: For the target user to be recommended, input the condition vector corresponding to their last interaction timestamp, and...
[0068] Starting from the noisy state, in Guided by this, the user's current interest probability distribution vector is reconstructed through multiple iterative steps. The restoration process follows the formula below:
[0069]
[0070] 2. Sorting and List Output: Determine the candidate set of items that user u has not yet interacted with. ,extract The predicted score for the corresponding index. Sort by score in descending order, and select the top K items to form a recommendation list:
[0071]
Claims
1. A time-aware diffusion recommendation method based on dynamic user preferences, characterized in that, Includes the following steps: S1: Construct a dynamic matrix factorization framework: Introduce the time factor of users and items to dynamically model the original sparse user and item interaction data. By fitting the trend of user interest evolution over time, the original sparse rating matrix is transformed into a continuous and dense user representation vector containing time information. After Yeo-Johnson distribution transformation, it is used as the structured prior input of the diffusion generation model. S2: Construct a time-aware discretized diffusion backbone network: The dense user representation vector transformed by Gaussian distribution as described in S1 is used as the initial state input of the diffusion model. Gaussian noise is gradually injected in the forward noise addition stage. In the reverse denoising stage, a dual time condition formed by the fusion of diffusion step embedding and user real-time time features is introduced to dynamically modulate the denoising process. S3: Model Training and Optimization: Design a time-aware loss function and optimize the parameters of the diffuse noise predictor to model the time distribution of user interests. S4: Real-time Recommendation Generation: Deploy the trained model to the recommendation system, input the user's real-time time features, restore the user's interest distribution through reverse denoising, and generate a personalized recommendation list.
2. The time-aware diffusion recommendation method for dynamic user preferences according to claim 1, characterized in that: The dynamic matrix decomposition in step S1 specifically includes the following sub-steps: S11: Time Dimension Discretization and Normalization Processing: Read the timestamp information from user and project interaction data and convert it into a time index in months. ; Get the global maximum time index And calculate the normalized time factor. ,in This is used to characterize the relative position of the interaction behavior throughout the entire observation period; S12: Construct a dual-time-aware rating prediction model: Define user u for item i within normalized time. Predicted scores The modeling formula is as follows: , in, This represents the global average score; For project i, this is the static bias term; This is used to introduce a user-perceived time bias, which is employed to capture the macroscopic shift in user rating habits over time. For static base bias, The bias coefficient varies with time; Dynamically embedding vectors for users is used to characterize the micro-evolution of user interest preferences, where For static underlying vectors, The interest offset vector changes over time; Embed vectors for the project; S13: Dynamic Parameter Learning and Loss Function: Defining the Dynamic Matrix Factorization Loss Function By minimizing the reconstruction error of the observation data and introducing Regularization terms are used to prevent overfitting. , in, Given a known set of interaction samples, Rate based on real interactions. Here is the regularization coefficient; all parameters are iteratively updated using stochastic gradient descent until the model converges; S14: Dense Matrix Reconstruction and Normalized Prior Generation: Traverse the user set and item set, and reconstruct the full dense prediction rating matrix using the trained parameters. ;against The skewed distribution problem in the data is addressed by using the Yeo-Johnson transform to perform nonlinear distribution mapping: , in, To transform parameters and control the strength of the nonlinear mapping, the above transformation maps the prediction matrix to a near-Gaussian distribution space, alleviating data bias and generating structured prior inputs that conform to the initial assumptions of the diffusion model. .
3. The time-aware diffusion recommendation method for dynamic user preferences according to claim 1, characterized in that: The joint time-conditional modulation process in the reverse denoising stage of step S2 specifically includes the following sub-steps: S21: Extract the diffusion step embedding vector: Convert the current denoising step number k into a high-dimensional space embedding vector through a linear mapping. This is used to characterize the micro-process information in the denoising iteration process; S22: Construct a real-time time map for the user: Obtain the timestamp of the target user's most recent interaction. The multilayer perceptron (MLP) is used to project the vector onto the same feature dimension as the diffusion step embedding, generating a user-side temporal conditional vector. ; S23: Dual Feature Fusion: Embedding the diffusion step User-side time condition vector Perform feature-level fusion to generate joint temporal conditional factors. The calculation formula is as follows: , in Indicates element-level fusion; It is injected into the noise predictor as a bias term to achieve real-time dynamic modulation of the denoising direction.
4. The time-aware diffusion recommendation method for dynamic user preferences according to claim 1, characterized in that: In step S2, the reverse noise reduction distribution... Represented as: , Among them, the mean Time-aware noise predictor calculate: , in and These are the preset noise-adding scheduling parameters.
5. The time-aware diffusion recommendation method for dynamic user preferences according to claim 1, wherein the loss function for model optimization in step S3, the diffusion model prediction loss is defined as... : , in To inject real Gaussian noise, This is the regularization coefficient.
6. The time-aware diffusion recommendation method for dynamic user preferences according to claim 1, characterized in that: The real-time recommendation generation in step S4 specifically includes: S41: Input initialization and condition alignment: Obtain the last interaction timestamp of target user u. The multilayer perceptron described in step S2 is used to convert the data into a user-side time condition vector; simultaneously, the densed user preference vector generated in step S1 is extracted and used as the structured prior initial state of the diffusion model. ; S42: Condition-guided iterative denoising and restoration: with Starting with the noise state after forward denoising, in each denoising step k, the current diffusion step embedding vector is fused with the user-side time condition vector to form a joint time condition. ; Inject it into a time-aware noise predictor Perform reverse denoising iterations until a preset number of steps is reached or convergence is achieved, to obtain the restored probability distribution vector of the user's current interest. The formula is as follows: ; S43: Item Filtering and Candidate Set Ranking: Determining the set of uninterrupted items for user u. Extract the prediction vector The middle corresponds to The score at the index position is used to sort the scores globally from highest to lowest. S44: Recommendation List Output: Select the top K items with the highest scores from the sorted results, construct a personalized recommendation list, and return it to the user. 。