A cold start recommendation method and system based on balanced sampling and embedded optimization meta-learning

By employing a meta-learning method that combines balanced sampling and embedding optimization, the model adaptation bias caused by user task heterogeneity in cold start scenarios is addressed, resulting in more accurate content recommendations and improved accuracy and personalization capabilities of the recommendation system.

CN122153154APending Publication Date: 2026-06-05HENAN UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN UNIVERSITY
Filing Date
2026-02-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing recommendation methods fail to effectively consider user task heterogeneity in cold start scenarios, leading to model adaptation bias and making it difficult to provide accurate content recommendations.

Method used

We employ a meta-learning method based on balanced sampling and embedding optimization. By preprocessing user interaction data, we construct support sets and query sets, extract multidimensional implicit statistical features, build feature embedding and embedding optimization modules, and combine them with an adaptive deep recommendation network to dynamically adjust feature embedding, thereby achieving fine-grained optimization and personalized recommendations.

Benefits of technology

It significantly improves the accuracy and robustness of recommendations under cold start conditions, and can better meet users' personalized content needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153154A_ABST
    Figure CN122153154A_ABST
Patent Text Reader

Abstract

The application discloses a cold start recommendation method and system based on balanced sampling and embedded optimization meta-learning, and the method comprises the following steps: pre-processing interactive data; constructing a support set and a query set based on a score balanced sampling strategy; extracting seven-dimensional implicit task features to depict user preference patterns, including centralized mean, normalized standard deviation, truncated skewness, score range proportion, low score proportion, high score proportion and user activity; constructing an embedded optimization module, generating a task decision signal through a multi-source feature adapter and a funnel type fusion decoder, and introducing affine modulation dynamic correction of user and item original embedding; designing an adaptive deep recommendation network, and adopting a double-channel Dropout strategy to differentiate the adaptation of inner loop fitting and the generalization of outer loop. The application dynamically guides the feature embedding optimization based on the score distribution characteristics of user implicit statistics, realizes the adaptive correction of task preference, and improves the accuracy and robustness of recommendation in the cold start situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet recommendation system technology, and in particular to a cold-start recommendation method and system based on balanced sampling and embedding optimization meta-learning. Background Technology

[0002] With the explosive growth of online services, recommender systems have become a core tool for helping users filter information and discover content of interest. However, a classic challenge facing recommender systems is the "cold start" problem, namely, how to provide accurate recommendations to new users with very few interaction records. Traditional recommendation methods, such as collaborative filtering and matrix factorization, rely on dense historical interaction data, and their performance often degrades significantly when facing cold start scenarios. In recent years, meta-learning, especially model-agnostic meta-learning, has been introduced into the recommender field due to its "learning how to learn" characteristic. This type of method aims to learn a set of globally optimal initial parameters with good generalization ability through training on multiple tasks, enabling it to quickly adapt to the preferences of new users with only a small number of gradient updates. Although meta-learning methods alleviate the cold start problem to some extent, they still have limitations in pursuing high-precision recommendations. While existing improved methods introduce auxiliary information such as attribute fusion enhancement, multi-dimensional similarity calculation, and graph neural network structures to enrich feature representation when mining the association between users and items (such as products, videos, merchants, etc.), these methods often ignore the significant heterogeneity between different user tasks and fail to consider individual differences among users in terms of rating distribution, interaction habits, etc. Therefore, to achieve more accurate content recommendation under cold-start conditions with only a small number of interaction records, a method that can explicitly perceive user task characteristics is urgently needed. By introducing a dynamic adjustment mechanism, the feature distribution can be adaptively optimized according to task characteristics, thereby compensating for the shortcomings of a uniform adaptation strategy, improving the accuracy of cold-start recommendations, and better meeting users' personalized content needs. Summary of the Invention

[0003] This invention addresses the problem of adaptation bias in existing recommendation methods due to neglecting user task heterogeneity, and proposes a cold-start recommendation method and system based on balanced sampling and embedding optimization meta-learning.

[0004] To achieve the above objectives, the present invention adopts the following technical solution:

[0005] This invention proposes a cold-start recommendation method based on balanced sampling and embedding optimization meta-learning, comprising:

[0006] Step 1: Preprocess the original user interaction data, remove long-tail users whose sparsity is lower than the preset threshold I based on the number of interaction records N, and retain all interaction data of the remaining active users;

[0007] Step 2: For each user's interaction data, construct a meta-task containing a support set and a query set based on a rating equalization sampling strategy, and extract multi-dimensional implicit statistical features to characterize the rating habits and distribution characteristics of the current user's task, thus obtaining the feature preference code for each user.

[0008] Step 3: Construct a feature embedding module to achieve a unified representation of multiple feature types: For continuous features, perform a nonlinear transformation to obtain real-valued embedding vectors; for discrete fixed-length features, map them to embedding vectors using an embedding lookup table; for discrete variable-length features, use an index list and an offset list to represent the feature sequence, and aggregate them using the EmbeddingBag operation that supports higher-order gradient propagation to generate aggregated embedding vectors; finally, concatenate and fuse the three types of feature embedding vectors to construct the original feature embeddings for users and projects respectively.

[0009] Step 4: Construct an embedding optimization module to achieve fine-grained optimization of feature embedding: Combine the original feature embeddings of users and items with the feature preference encoding obtained in Step 2, generate dynamic adjustment parameters through a fusion decoding network, and use feature linear adjustment to dynamically transform the original feature embeddings to obtain the optimized feature embeddings of users and items;

[0010] Step 5: Construct an adaptive deep recommendation network as a rating predictor. This network adopts a funnel-shaped linear architecture that can efficiently compress feature representations. The neuron width and loss rate of each layer of the network are determined based on the input feature embedding dimension and the network layer depth. The optimized user and item features are embedded into the adaptive deep recommendation network, which outputs predicted ratings and makes item recommendations based on the predicted ratings.

[0011] Further, step 2 includes:

[0012] Step 2.1: Set stratified thresholds based on the scoring scale ;

[0013] Step 2.2: Based on the stratification threshold and All interactions are divided into three mutually exclusive sets: low score, medium score, and high score. , , :

[0014]

[0015]

[0016]

[0017] in, These represent the thresholds for low and high scores, respectively. Represents the complete set of interactions. Let u, i, r represent the interaction sets of low, medium, and high scores, respectively. ui Let u represent user u, item i that user u interacts with, and user u's rating of item i, respectively.

[0018] Step 2.3: Calculate the proportion of each type of user interaction in the overall interaction set:

[0019]

[0020]

[0021] in, The total number of user interactions. These represent the number of interactions in each interaction set;

[0022] Step 2.4: Let the total number of samples in the support set in the meta-learning task be k, and the total number of samples in the query set be q. Calculate the specific number of interactions of each category that should be included in the support set:

[0023]

[0024] in These represent the proportion of each type of interaction;

[0025] Step 2.5: From the mutually exclusive sets respectively Extraction The interaction records constitute the support set for this user task. Next, interaction samples that were sampled from the support set are removed from various sets, and the sampling ratio of the query set is calculated according to step 2.4 to form the query set. .

[0026] Step 2.6: Based on the set constructed in Step 2.5 (including the support set) and query set The implicit statistical features are extracted from the rating distribution, including the following seven statistical features:

[0027] 1) Centered mean: Calculate the mean score of the samples in the corresponding set. It is then normalized relative to the global center point to map it to the [-1,1] interval, which reflects whether the user tends to be lenient with high scores or harsh with low scores.

[0028]

[0029] in, The average rating of the current users. The center value of the dataset rating scale. To prevent smoothing terms from being divided by zero;

[0030] 2) Normalized standard deviation: Calculate the sample standard deviation It is then normalized using the global center point as a scale to reflect the dispersion of user ratings:

[0031]

[0032] 3) Rating Range Ratio: This calculates the ratio of the user's actual rating range to the theoretical maximum range, used to measure whether the user has made full use of the rating range.

[0033]

[0034] in These are the maximum and minimum values ​​of the interaction rating, respectively. It is the maximum value of the dataset's rating scale;

[0035] 4) Truncation skewness: Calculate the standardized third-order central moment to obtain the skewness. And introduce a scaling factor to Limiting the range to [-1, 1], this measure is used to assess the directional skewness of the user rating distribution.

[0036]

[0037]

[0038] MEAN represents the mean operation. This is the scaling factor;

[0039] 5) Low score ratio: Statistically, user ratings that are less than or equal to a preset low threshold are counted. The interaction percentage is used to reflect the frequency of negative user feedback.

[0040]

[0041] 6) High score ratio: Statistically, user ratings greater than or equal to a preset high threshold are counted. The interaction percentage is used to reflect the frequency of positive user feedback:

[0042]

[0043] 7) User Activity: The logarithm of the total number of interactions is normalized to the [0,1] interval to reflect user activity.

[0044]

[0045] in This represents the maximum number of interaction records for a single user in the dataset;

[0046] Step 2.7: Based on the seven statistical features calculated above, these are encapsulated to form the feature preference codes corresponding to the set. ;

[0047] Furthermore, step 3, which constructs an adaptive feature embedding module supporting higher-order gradients based on the feature cardinality, includes:

[0048] Step 3.1: Based on the on-demand allocation strategy, an adaptive dimension configuration that matches the embedding information capacity with the feature semantic complexity is adopted. Specifically, continuous numerical features are transformed into dense real-valued embedding vectors, while discrete features have their embedding dimensions dynamically set according to their cardinality, achieving a balance between embedding expressive power and parameter efficiency.

[0049] Step 3.2: For discrete fixed-length features, use the one-hot encoding method to construct a standard embedding lookup table to obtain a vector representation, as follows:

[0050]

[0051] Where d1 and d2 represent the feature cardinality and embedding dimension, respectively;

[0052] Step 3.3: For discrete variable-length features, construct a second-differentiable aggregate embedding using the multi-hot encoding method, as shown below:

[0053]

[0054] Where d1 and d2 represent the feature cardinality and embedding dimension, respectively; in the actual implementation, an index list and an offset list are used to efficiently store the multi-hot encoding, and differentiable aggregation is achieved through EmbeddingBag.

[0055] Step 3.4: Fixed-length feature embedding based on the above processing and aggregated variable-length feature embedding By combining continuous feature embeddings, the original user feature embeddings are constructed. Embedding of original features of the project .

[0056] Furthermore, step 4, based on the original feature embedding and user feature preferences, achieves fine-grained optimization of the feature embedding through an embedding optimization module, including:

[0057] Step 4.1: Encoding of feature preferences based on the results of Step 2 Step 3: User Original Feature Embedding Embedding of original features of the project These three information sources are heterogeneous and have significant dimensional differences. Without proper processing and fusion, high-dimensional features can easily dominate the information gradient flow. Therefore, this invention designs an independent and lightweight projection adapter for feature preprocessing:

[0058] 1) Task Feature Projection Adapter: Encoding macroscopic task feature preferences (dimension) Apply layer normalization and linear mapping to output the adaptation dimension. semantic representation This design can both alleviate the distribution offset between statistical features and the embedding space, improve its compatibility with microscopic representations, and enhance feature discriminativeness through learnable transformations, making macroscopic preference signals easier to capture by subsequent fusion modules;

[0059] 2) User Feature Projection Adapter: Embedding the original user features (dimension) Apply normalization and linear mapping to output the adaptation dimension. semantic representation This design, while preserving the integrity of inherent user attributes, achieves feature scale calibration and potential noise suppression, improving the stability of user representations and their cross-task generalization ability, and providing a more robust foundational signal for personalized modeling;

[0060] 3) Projection Adapter for Projecting High-Dimensional Sparse and High-Cardinality Project Features (dimension) Apply normalization and use a dimensionality reduction projection strategy to output the adapted dimensions. semantic representation This design preserves core semantics while compressing redundant information, reduces the computational complexity of subsequent interactions, and mitigates the risk of overparameterization.

[0061] Three-way projection adapter output The combined feature representation of the task, after being concatenated, is shown below:

[0062]

[0063] Where [:] represents splicing, this projection design preserves the semantic characteristics of heterogeneous information sources while also aligning the feature embedding numerical scale with the semantic space;

[0064] Step 4.2: Joint representation of task features obtained in Step 4.1 To achieve deep collaboration and semantic condensation of multi-granularity features, this invention designs a funnel-shaped fusion decoder guided by information bottlenecks. ,include:

[0065] 1) Interaction Enhancement Layer: Expands the model capacity through dimensional linear mapping, provides sufficient interaction space for heterogeneous features, and alleviates information competition in the early fusion process;

[0066] 2) Semantic Extraction Layer: Introduces intermediate representations with dimensional shrinkage, constructs information bottlenecks, forces the network to filter task-irrelevant noise, and focuses on common preference patterns across projects;

[0067] 3) Decision Refinement Layer: Further reduce the dimensionality to a lightweight target dimension to generate high-information-density task decision signals, which facilitates efficient driving of downstream parameter adaptation modules;

[0068] Each layer employs LeakyReLU activation to alleviate gradient sparsity, supplemented by lightweight Dropout regularization, as shown below:

[0069]

[0070] in This represents a concise task decision embedding.

[0071] Step 4.3: Based on the refined task decision embedding obtained in Step 4.2 This invention introduces a learnable affine modulation mechanism, which generates scaling factors for user and item representations through four sets of lightweight mappings. With translation factor To ensure numerical stability and prevent semantic drift, activation functions and scaling factors are applied to the modulation parameters, specifically including:

[0072] 1) Scaling factor Using sigmoid activation and upper bound scaling This is achieved by scaling the feature dimensions only nonnegatively, while suppressing gradient explosion caused by excessive scaling.

[0073]

[0074] in For learnable matrices, ;

[0075] 2) Translation factor Tanh and amplitude control This implementation allows for directed offsets within a limited range while preventing overall embedding space drift from disrupting the pre-trained semantic structure.

[0076]

[0077] in For learnable matrices, ;

[0078] Step 4.4: Scaling factor obtained from 4.3 Translation factor While keeping the feature dimensions unchanged, embedding the original user features Project feature embedding Optimization is achieved by dynamically stretching or translating the feature space;

[0079]

[0080] in This indicates element-wise multiplication. .

[0081] This mechanism essentially constructs a lightweight feature corrector that achieves fine-grained, interpretable representation adaptation without reconstructing the underlying embedding, significantly improving the model's responsiveness to heterogeneous user preferences.

[0082] Furthermore, step 5, based on the optimized user feature embedding and item feature embedding, learns the user's interaction characteristics through an adaptive deep recommendation network to make a predicted score for the item, including:

[0083] Step 5.1: Construct an adaptive deep recommendation network Following a strategy of moderate expansion in the early stage, gradual compression in the middle stage, and strong bottleneck constraints in the late stage, the task semantics are extracted. This network includes:

[0084] 1) Information expansion layer: The first layer is slightly increased in dimensionality to alleviate the risk of representation collapse of sparse splicing features in the cold start scenario, and to retain sufficient freedom for subsequent interactions;

[0085] 2) Progressive compression layer: The width is reduced layer by layer to build a hierarchical information bottleneck, forcing the network to filter task-irrelevant noise while retaining the discrimination signal;

[0086] 3) Decision bottleneck layer: The extremely narrow dimension outputs a preference latent code with high information density, which significantly reduces the risk of overfitting and provides a compact and generalizable decision basis for the final prediction;

[0087] The LeakyReLU activation function is used uniformly between layers to ensure gradient flow while avoiding neuron inactivation caused by sparse input, thus ensuring stable model convergence.

[0088] Step 5.2: For the special training mode of meta-learning, a dual-channel Dropout execution strategy is designed to resolve the target conflict between inner layer few-sample fitting and outer layer generalization. For the outer loop, to balance the overfitting risk of deep networks and the information preservation requirements of shallow networks, this invention designs an adaptive dropout rate calculation mechanism that couples network layer depth and layer width. For the i-th layer, the baseline Dropout rate is calculated as follows:

[0089]

[0090] in For layer depth sensitivity parameters, This is a layer width sensitivity parameter. As the baseline embedding dimension, For the maximum Dropout rate, This represents the global Dropout rate. The maximum width factor, Embed a dimension for the width of each layer. Represents the depth of the current layer. Indicates the dimensional scaling baseline;

[0091] Step 5.3: The formula for calculating the Dropout rate of each layer in the inner loop is as follows:

[0092]

[0093] in This is the multiplier factor.

[0094] Step 5.4: Embed the optimized user features Embedding product features Input Adaptive Deep Recommendation Network Learn the characteristics of user interactions and output a scalar score. This indicates the user's level of interest in the current product, as shown below:

[0095]

[0096] Furthermore, after obtaining the user's predicted score in step 5, the model's training parameters need to be optimized and updated, including:

[0097] 1) Based on task-adaptive feature representation (i.e., optimized user and item feature embeddings) and an adaptive deep recommendation network, the support set is used to predict scores. The MAE loss and gradient are calculated, and the temporary parameters of the model are iteratively updated multiple times to obtain parameters specific to the current user. Specifically:

[0098] First, consider all trainable parameters of the global model. Perform shallow copy Construct an initial temporary parameter set; then in the t iteration steps ( (where T is the preset number of inner loop steps), using the current temporary parameters. For support sets Perform forward reasoning, where the score is predicted. The computation depends on the optimized feature embedding in step 4 and the adaptive deep recommendation network in step 5, as shown below:

[0099]

[0100] Then, the prediction error is calculated primarily using the mean squared error (MSE) to measure prediction quality and constrain the score distribution. The calculation formula is as follows:

[0101]

[0102] Where k is the number of interactions in the support set, this loss function quantizes the current parameters. The performance deviation on the current user task is analyzed; the next step is to calculate the loss using an automatic differentiation mechanism. Relative to the current temporary parameters The gradient of is calculated using the following formula:

[0103]

[0104] Finally, following the stochastic gradient descent rule, and combining the local learning rate (lr), the temporary parameters are updated using the following formula:

[0105]

[0106] Where lr is the local learning rate. After T iterations, the final parameters are obtained. These are user-specific parameters that adapt to the current user rating habits and preference distribution.

[0107] 2) Calculate the meta-loss based on the query set and the user-specific temporary parameters, and use the second derivative information of the preserved computation graph to backpropagate and update the model's global initialization parameters to achieve global optimization. Specifically:

[0108] First, the adapted parameters are generated based on the local loop. query set for the current user Forward propagation prediction is performed, and an adaptive deep network is used to obtain the prediction score. :

[0109]

[0110] Next, the meta-loss is calculated using the difference between the predicted score and the actual score, as shown in the following formula:

[0111]

[0112] Where q represents the number of interactions in the query set, this loss function measures the performance of the parameters after T-step adaptation on unseen data and serves as the core supervisory signal guiding global optimization. Then, backpropagation of the meta-loss is performed. Since the computational graph is preserved, temporary parameters... These are global initialization parameters. The function, therefore, calculate Compared to The gradient can be calculated by using the chain rule to traverse the optimization path throughout the entire inner loop, as shown in the following formula:

[0113]

[0114] This gradient contains second-order derivative information, explicitly encoding second-order trend information about how the initialization parameters should be adjusted to reach the optimal solution as quickly as possible after a few steps of gradient descent. Finally, the gradient of the calculated query set is used. Combined with the Adam optimizer, update global initialization parameters The calculation formula is as follows:

[0115]

[0116] Where ml and wd represent the meta-learning rate and weight decay coefficient, respectively.

[0117] A second aspect of this invention proposes a cold-start recommendation system based on balanced sampling and embedding optimization meta-learning, comprising:

[0118] The preprocessing unit is used to preprocess the original user interaction data, remove long-tail users whose sparsity is lower than a preset threshold I based on the number of interaction records N, and retain all interaction data of the remaining active users.

[0119] The first construction unit constructs a meta-task containing a support set and a query set based on the rating balance sampling strategy for each user's interaction data, and extracts multi-dimensional implicit statistical features to characterize the rating habits and distribution characteristics of the current user's task, thus obtaining the feature preference code for each user.

[0120] The second building unit is used to construct the feature embedding module to achieve a unified representation of multiple types of features: continuous features are transformed nonlinearly to obtain real-valued embedding vectors; discrete fixed-length features are mapped to embedding vectors through an embedding lookup table; discrete variable-length features are represented by an index list and an offset list, and aggregated through the EmbeddingBag operation that supports higher-order gradient propagation to generate aggregated embedding vectors; finally, the three types of feature embedding vectors are concatenated and fused to construct the original feature embeddings for users and projects respectively.

[0121] The third building unit is used to build the embedding optimization module to achieve fine-grained optimization of feature embedding: combining the original feature embeddings of users and items with the feature preference encoding obtained from the second building unit, generating dynamic adjustment parameters through a fusion decoding network, and using feature linear adjustment to dynamically transform the original feature embeddings to obtain the optimized feature embeddings of users and items.

[0122] The fourth building unit constructs an adaptive deep recommendation network as a rating predictor. This network adopts a funnel-shaped linear architecture that can efficiently compress feature representations. The neuron width and loss rate of each layer of the network are determined based on the input feature embedding dimension and the network layer depth. The optimized user and item features are embedded into the adaptive deep recommendation network, which outputs predicted ratings and recommends items based on the predicted ratings.

[0123] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements a cold-start recommendation method based on equal sampling and embedded optimization meta-learning as described in any of the preceding claims.

[0124] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a cold-start recommendation method based on equal sampling and embedded optimization meta-learning as described above.

[0125] Compared with the prior art, the present invention has the following beneficial effects:

[0126] This invention first preprocesses the interactive data; it constructs a support set and a query set based on a rating equalization sampling strategy to ensure that the rating preferences in the training set (i.e., the support set) are consistent with the centralized distribution of the dataset; it extracts seven-dimensional implicit task features, including centered mean, normalized standard deviation, truncation skewness, rating range proportion, low score proportion, high score proportion, and user activity, to characterize user preference patterns; it constructs an embedding optimization module, generating task decision signals through a multi-source feature adapter and a funnel-shaped fusion decoder, and introduces affine modulation to dynamically correct the original embeddings of users and items; it designs an adaptive deep recommendation network, whose layer width and dropout rate are dynamically adjusted according to layer depth and feature embedding dimensions, and adopts a dual-channel Dropout strategy to differentiate and adapt to the fitting of the inner loop and the generalization of the outer loop. Based on the implicit statistical rating distribution characteristics of users, this invention dynamically guides feature embedding optimization, achieving adaptive correction of task preferences and improving the accuracy and robustness of recommendations in cold-start scenarios. Attached Figure Description

[0127] Figure 1 This is a basic flowchart of a cold-start recommendation method based on balanced sampling and embedding optimization meta-learning provided in an embodiment of the present invention;

[0128] Figure 2 This is a schematic diagram of a task sample equalization sampling method provided in an embodiment of the present invention;

[0129] Figure 3 A schematic diagram of the feature embedding optimization mechanism provided in an embodiment of the present invention;

[0130] Figure 4 This is a schematic diagram of the architecture of a cold-start recommendation system based on balanced sampling and embedding optimization meta-learning, provided for an embodiment of the present invention. Detailed Implementation

[0131] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0132] like Figure 1 As shown, a cold-start recommendation method based on balanced sampling and embedding optimization meta-learning includes:

[0133] S101: Preprocess the original user interaction data, remove long-tail users whose sparsity is lower than the preset threshold I based on the number of interaction records N, and retain all interaction data of the remaining active users.

[0134] S102: For each user's interaction data, construct a meta-task containing a support set and a query set based on a rating equalization sampling strategy, and extract multi-dimensional implicit statistical features to characterize the rating habits and distribution characteristics of the current user's task, thereby obtaining the feature preference code for each user.

[0135] S103: Construct a feature embedding module to achieve unified representation of multiple types of features: perform non-linear transformation on continuous features to obtain real-valued embedding vectors; map discrete fixed-length features to embedding vectors through an embedding lookup table; for discrete variable-length features, use an index list and an offset list to represent the feature sequence, and achieve aggregation through the EmbeddingBag operation that supports high-order gradient propagation to generate aggregated embedding vectors; finally, concatenate and fuse the three types of feature embedding vectors to respectively construct the original feature embeddings of users and items.

[0136] S104: Construct an embedding optimization module to achieve fine-grained optimization of feature embeddings: combine the original feature embeddings of users and items with the feature preference encoding obtained in S102, generate dynamic adjustment parameters through a fusion decoding network, and perform dynamic transformation on the original feature embeddings using feature linear adjustment to obtain optimized feature embeddings of users and items.

[0137] S105: Construct an adaptive deep recommendation network as a scoring predictor. This network adopts a funnel-shaped linear architecture that can efficiently compress feature representations. The neuron width and dropout rate of each layer of the network are calculated and determined according to the input feature embedding dimension and the network layer depth; input the optimized feature embeddings of users and items into the adaptive deep recommendation network, output the predicted score, and perform item recommendation based on the predicted score.

[0138] As an implementable manner, the method specifically includes:

[0139] (1) Dataset preprocessing

[0140] Original recommendation logs usually contain a large number of long-tail users with extremely sparse interactions. The behavior patterns of these users are highly random, which can easily introduce gradient noise during the meta-optimization process and affect the model's learning of common preferences. Therefore, in this embodiment, strict preprocessing and screening are performed on the original dataset Yelp to construct a high-quality meta-task dataset. Specifically, to reduce the computational complexity and improve the training efficiency, a 25% data subset is randomly sampled from the original interaction history logs as the experimental dataset. Then, traverse the interaction records of all users in this subset and count the total number of interactions N of each user. To ensure that the minimum sample requirements of the support set and the query set can be met in the subsequent meta-task construction, set the interaction quantity threshold I = 40, regard the long-tail users with N < I as invalid data and eliminate them, and only retain the active users with N ≥ I and their corresponding interaction records. In this embodiment, according to the configuration of k = 15 and q = 20, and at the same time adopting the data partitioning strategy based on user IDs, shuffle all the active users after screening randomly, and divide them into a meta-training set, a meta-validation set, and a meta-test set according to the ratio of 8:1:1.

[0141] (2) Construct a meta-task dataset

[0142] In the meta-learning framework, the support set is used to compute task-specific temporary parameters, and the query set is used to evaluate the generalization performance of those parameters. If simple random sampling is used, it can easily lead to inconsistent score distributions between the support set and the query set (e.g., the support set is entirely high scores, and the query set is entirely low scores), thus introducing serious distribution bias and misleading the optimization direction of the model. Therefore, this embodiment proposes a hierarchical sampling strategy based on score balancing to ensure the consistency of data distribution within the meta-task. Simultaneously, to explicitly represent the current user's scoring habits and distribution characteristics for the task, this embodiment does not rely on black-box implicit embeddings, but instead extracts a set of statistical features with clear physical meaning based on the constructed meta-task data, such as... Figure 2 As shown, the specific steps are as follows:

[0143] S102.1: Traverse the current user's interaction history and divide all interactions into three mutually exclusive hierarchical sets based on a preset rating threshold, including those with ratings greater than or equal to a positive threshold. positive interaction collection A score less than or equal to the negative threshold negative interaction set And greater than Less than Neutral interaction set The specific calculation method is shown in Formulas 1-3 in the invention content;

[0144] S102.2: Calculate the proportion of various user interactions in the overall interaction set. The specific calculation method is shown in formulas 4-5 in the invention content.

[0145] S102.3: Let the total number of samples in the support set in the meta-learning task be k, and the total number of samples in the query set be q. Calculate the specific number of each type of interaction that should be included in the support set. The specific calculation method is shown in Formula 6 in the invention content.

[0146] S102.4: From mutually exclusive sets respectively Extraction The interaction records constitute the support set for this user task. Next, interaction samples from the supported set are removed from various sets, and the sampling ratio of the query set is calculated according to step S102.3, and the query set is formed by sampling. .

[0147] It is worth noting that while some users may engage in certain rating interactions, their interactions are extremely rare. Strictly sampling proportionally and rounding could lead to the complete exclusion of such samples from the support or query sets, causing the model to misjudge that users lack this preference and creating a semantic blind spot. To address this, this work introduces remainder compensation and a minimum guarantee strategy based on proportional sampling. First, sampling quotas are allocated primarily based on the true distribution proportion. Second, quota shortfalls caused by rounding are compensated for based on the remainder. Finally, for categories that exist but have a very low proportion, at least one sample is forcibly retained. Although this strategy may result in slight deviations between local sampling proportions and the overall distribution (see Table 1), it avoids the complete loss of extreme preference signals, ensuring that the model can still access rare but highly informative extreme feedback, thereby learning a more complete preference boundary.

[0148] Table 1. Comparison of balanced sampling results for some users in Yelp data.

[0149]

[0150] S102.5: Based on the task dataset constructed in S102.4, multi-dimensional implicit statistical features are extracted using the rating distribution in it. The specific calculation method is shown in formula 7-14 in the invention content.

[0151] S102.6: Based on the seven statistical features calculated above, these are encapsulated to form a feature preference code. ;

[0152] (3) Feature embedding processing

[0153] Based on an on-demand allocation strategy, an adaptive dimension configuration is adopted that matches the embedding information capacity with the semantic complexity of the features. For example, in the Yelp dataset, continuous numerical features (total number of user reviews, user feedback, merchant star rating, total number of merchant reviews, etc.) naturally possess magnitude and distribution characteristics. Therefore, instead of using a traditional embedding lookup table, they are transformed using a log1p method and used as dense real-valued embedding vectors. For discrete features (merchant category and merchant location), the embedding dimension is dynamically set according to their cardinality to achieve a balance between embedding expressive power and parameter efficiency. The specific settings of the embedding dimension are shown in Table 2.

[0154] Table 2. Feature cardinality and embedding dimension of users and merchants in Yelp data

[0155]

[0156] For continuous numerical features, the transformed data is directly used as a real-valued embedding vector; for discrete fixed-length features, a standard embedding lookup table is constructed using one-hot encoding; for discrete variable-length features, a second-differentiable aggregate embedding is constructed using multi-hot encoding. The specific representation of the embedding is shown in formulas 15-16 of the invention description.

[0157] Based on the fixed-length feature embedding obtained above Variable-length feature embedding after aggregation And continuous feature embeddings are spliced ​​together to form the user's original feature embedding. Embedding merchant's original features .

[0158] (4) Feature embedding optimization (e.g.) Figure 3 (As shown)

[0159] S104.1: Due to feature preference encoding User original feature embedding Embedding merchant's original features These three sources are heterogeneous and have significant dimensional differences. Without processing and fusion, high-dimensional features can easily dominate the information gradient flow. To address this, this invention designs an independent and lightweight projection adapter for feature preprocessing. The input and output dimensions of each projection adapter are set as shown in Table 3.

[0160] Table 3. User and Merchant Characteristics Projection Adapter Dimension Design

[0161]

[0162] Projection adapter output After splicing, a joint task feature is formed. The specific representation method is shown in Formula 17 in the invention content;

[0163] S104.2: Joint representation of task features obtained based on S104.1 After fusion decoder Achieving deep collaboration and semantic condensation of multi-granularity features, the specific representation method is shown in Formula 18 in the invention content;

[0164] S104.3: The condensed task decision embedding obtained from S104.2 Scaling factors for user and merchant representations are generated through four sets of lightweight mappings. With translation factor Specifically, it is represented as shown in formulas 19-20 in the invention description; where the scaling factor The constraint s takes a value of 2.0, and the translation factor is... The constraint t is set to 0.5. This value has been experimentally verified to balance modulation flexibility and embedding space stability, avoiding gradient explosion or semantic drift.

[0165] S104.4: Scaling factor obtained based on S104.3 Translation factor , for the original user embedding embedding with merchants Optimization is achieved by dynamically stretching or translating the feature space, as specifically represented by formula 21 in the invention description;

[0166] This mechanism essentially constructs a lightweight feature corrector that achieves fine-grained, interpretable representation adaptation without reconstructing the underlying embedding, significantly improving the model's responsiveness to heterogeneous user preferences.

[0167] (5) Recommendation Network

[0168] The adaptive deep recommendation network constructed in this invention Its core principle lies in treating the network structure itself as the modeling object for task awareness, and achieving coordinated optimization of parameter efficiency and representation capability through dynamic coupling of layer depth, layer width, and embedding dimension. This includes:

[0169] The layer-aware Dropout mechanism is shown in Formula 22 in the invention description, where the layer depth sensitivity parameter... The value is 0.05, which is the layer width sensitivity parameter. The value is 0.1, representing the baseline embedding dimension. Value 128 represents the maximum Dropout rate. A value of 0.3 represents the global Dropout rate. The maximum width factor is 0.1. The value is 1.2.

[0170] The formula for calculating the Dropout rate of each layer in the inner loop of the dual-channel Dropout execution strategy is shown in Formula 23 of the invention, where the multiplier factor is... The value is 0.5;

[0171] Combined with user embedding Product embedding Recommended Network The Dropout mechanism learns user interaction characteristics and outputs a scalar score. It indicates the user's level of interest in the current product, as specifically shown in Formula 24 in the invention description;

[0172] This design addresses the fundamental contradictions of "few samples, high noise, and strong heterogeneity" in meta-learning recommendation from a structural perspective, significantly improving the model's prediction stability and accuracy with minimal interactions.

[0173] (6) Train the method model

[0174] In the internal loop local update phase, an adaptive deep recommendation network is used. After obtaining the support set prediction score (Formula 25 in the invention description), the MAE loss and gradient are first calculated (Formulas 26-27 in the invention description). Then, the temporary parameters of the model are updated through multi-step rapid iteration (Formula 28 in the invention description) to obtain parameters specific to the current user, where lr represents the local learning rate, with a value of 1e. -3 T represents the local loop update step count, which takes the value 3;

[0175] In the outer loop global update phase, the query set prediction score is obtained based on user-specific temporary parameters (Formula 29 in the invention). First, the prediction loss is calculated (Formula 30 in the invention). Then, using the second derivative information of the preserved computation graph, the global initialization parameters of the model are updated through backpropagation to achieve global optimization (Formulas 31-32 in the invention), where ml and wd represent the meta-learning rate and are the weight decay coefficients, respectively, with a value of 5e. -4 and 1e -3 .

[0176] Thus, the model completed a full meta-learning iteration, and the updated model... It will serve as the starting point for the next user task, and will have a stronger ability to adapt to cold starts.

[0177] Tested on the Yelp dataset, with a minimum interaction threshold of I=40 and a low sample interaction score threshold. =2, high score threshold =4, supports set size k=15, query set q=20, user feature and merchant feature embedding dimension design is shown in Table 2, feature projection adapter dimension design is shown in Table 3, feature adjustment scaling factor constraint. =2.0, translation factor constraint =0.5, local learning rate lr=1e -3 Global (meta) learning rate ml=5e -4 Weight decay coefficient wd=1e -3 With local update steps T=3 and Dropout rate=0.1, the cold start recommendation results are shown in Table 4:

[0178] Table 4. Recommendation results under cold start conditions in Yelp data

[0179]

[0180] Based on the above embodiments, such as Figure 4As shown, this invention also proposes a cold-start recommendation system based on balanced sampling and embedding optimization meta-learning, comprising:

[0181] The preprocessing unit is used to preprocess the original user interaction data, remove long-tail users whose sparsity is lower than the preset threshold I based on the number of interaction records N, and retain all interaction records of the remaining active users to build a high-quality task dataset.

[0182] The first construction unit constructs a meta-task containing a support set and a query set based on the rating balance sampling strategy for each user's interaction data, and extracts multi-dimensional implicit statistical features to characterize the rating habits and distribution characteristics of the current user's task, thus obtaining the feature preference code for each user.

[0183] The second building unit is used to construct the feature embedding module to achieve a unified representation of multiple types of features: continuous features are transformed nonlinearly to obtain real-valued embedding vectors; discrete fixed-length features are mapped to embedding vectors through an embedding lookup table; discrete variable-length features are represented by an index list and an offset list, and aggregated through the EmbeddingBag operation that supports higher-order gradient propagation to generate aggregated embedding vectors; finally, the three types of feature embedding vectors are concatenated and fused to construct the original feature embeddings for users and projects respectively.

[0184] The third building unit is used to build the embedding optimization module to achieve fine-grained optimization of feature embedding: combining the original feature embeddings of users and items with the feature preference encoding obtained from the second building unit, generating dynamic adjustment parameters through a fusion decoding network, and using feature linear adjustment to dynamically transform the original feature embeddings to obtain the optimized feature embeddings of users and items.

[0185] The fourth building unit constructs an adaptive deep recommendation network as a rating predictor. This network adopts a funnel-shaped linear architecture that can efficiently compress feature representations. The neuron width and loss rate of each layer of the network are determined based on the input feature embedding dimension and the network layer depth. The optimized user and item features are embedded into the adaptive deep recommendation network, which outputs predicted ratings and recommends items based on the predicted ratings.

[0186] Based on the above embodiments, the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in S101-S105.

[0187] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the method described in S101-S105.

[0188] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A cold-start recommendation method based on balanced sampling and embedding optimization meta-learning, characterized in that, include: Step 1: Preprocess the original user interaction data, remove long-tail users whose sparsity is lower than the preset threshold I based on the number of interaction records N, and retain all interaction data of the remaining active users; Step 2: For each user's interaction data, construct a meta-task containing a support set and a query set based on a rating equalization sampling strategy, and extract multi-dimensional implicit statistical features to characterize the rating habits and distribution characteristics of the current user's task, thus obtaining the feature preference code for each user. Step 3: Construct a feature embedding module to achieve a unified representation of multiple feature types: For continuous features, perform a nonlinear transformation to obtain real-valued embedding vectors; for discrete fixed-length features, map them to embedding vectors using an embedding lookup table; for discrete variable-length features, use an index list and an offset list to represent the feature sequence, and aggregate them using the EmbeddingBag operation that supports higher-order gradient propagation to generate aggregated embedding vectors; finally, concatenate and fuse the three types of feature embedding vectors to construct the original feature embeddings for users and projects respectively. Step 4: Construct an embedding optimization module to achieve fine-grained optimization of feature embedding: Combine the original feature embeddings of users and items with the feature preference encoding obtained in Step 2, generate dynamic adjustment parameters through a fusion decoding network, and use feature linear adjustment to dynamically transform the original feature embeddings to obtain the optimized feature embeddings of users and items; Step 5: Construct an adaptive deep recommendation network as a rating predictor. This network adopts a funnel-shaped linear architecture that can efficiently compress feature representations. The neuron width and loss rate of each layer of the network are determined based on the input feature embedding dimension and the network layer depth. The optimized user and item features are embedded into the adaptive deep recommendation network, which outputs predicted ratings and makes item recommendations based on the predicted ratings.

2. The cold-start recommendation method based on balanced sampling and embedding optimization meta-learning according to claim 1, characterized in that, Step 2 includes: Step 2.1: Set stratification thresholds based on the scoring scale; Step 2.2: Based on the stratification threshold, divide all interactions into three mutually exclusive sets: low score, medium score, and high score. , and ; Step 2.3: Calculate the proportion of each type of user interaction in the overall interaction set based on the number of interactions in each type of interaction set. , and ; Step 2.4: Based on the total number of samples in the support set and the total number of samples in the query set in the meta-learning task, combined with... , and Calculate the specific number of each type of interaction that should be included in the support set and query set: Step 2.5: From respectively Extract the corresponding interaction records to form the support set for this user task. Next, the interaction samples sampled by the support set are removed from various interaction sets, and the corresponding interaction records are extracted to form the query set for the user task. ; Step 2.6: Based on the set constructed in Step 2.5, extract multi-dimensional implicit statistical features using the rating distribution within it; Step 2.7: Based on the calculated statistical features, encapsulate them to form the feature preference code corresponding to the set. .

3. The cold-start recommendation method based on balanced sampling and embedding optimization meta-learning according to claim 2, characterized in that, The statistical characteristics were obtained in the following manner: 1) Calculate the mean score of the samples in the set. It is normalized relative to the global center point to map it to the interval [-1,1], which is used to reflect the tendency of users to give high or low ratings; 2) Calculate the sample standard deviation It is normalized using the global center point as a scale to reflect the dispersion of user ratings; 3) Calculate the ratio of the user's actual rating range to the theoretical maximum range. This is used to measure whether users have made full use of the rating range: in These are the maximum and minimum values ​​of the interaction rating, respectively. It is the maximum value of the dataset's rating scale. To prevent smoothing terms from being divided by zero; 4) Calculate the standardized third-order central moment, and then obtain the skewness. And introduce a scaling factor to Restricted to the range [-1, 1] Used to measure the directional skewness of user rating distribution: MEAN represents the mean operation. This represents user u's rating of item i. This is the scaling factor; 5) Statistical user ratings are less than or equal to a preset low threshold. The interaction percentage is used to reflect the frequency of users' negative reviews; 6) Statistical user ratings greater than or equal to a preset high threshold The interaction ratio is used to reflect the frequency of positive user feedback; 7) Take the logarithm of the total number of interactions and normalize it to the [0,1] interval to reflect the user's activity level.

4. The cold-start recommendation method based on balanced sampling and embedding optimization meta-learning according to claim 1, characterized in that, Step 4 includes: Step 4.1: Encoding the feature preferences obtained in Step 2 Step 3: User Original Feature Embedding Embedding of original features of the project Each projection adapter is designed for feature preprocessing, and the outputs of the three projection adapters are concatenated to form a joint feature representation for the task. ; Step 4.2: Joint representation of task features obtained in Step 4.1 A funnel-shaped fusion decoder guided by an information bottleneck is used for... The process yields a refined task decision embedding. ; Step 4.3: Based on the results obtained in Step 4.2 A learnable affine modulation mechanism is introduced to generate scaling factors for user and item representations in the following manner. With translation factor : in This represents the sigmoid activation function. It is the upper bound scaling factor. For learnable matrices, t is the amplitude control factor; Step 4.4: Based on and While keeping the feature dimensions unchanged, for and Optimization is achieved by dynamically stretching or translating the feature space: in This represents the optimized feature embedding. This indicates element-wise multiplication.

5. The cold-start recommendation method based on balanced sampling and embedding optimization meta-learning according to claim 4, characterized in that, Step 4.1 includes: Design a task feature projection adapter to encode feature preferences. Apply layer normalization and linear mapping to output semantic representations adapted to the dimensions. ; Design a user feature projection adapter to embed the original user features. Apply normalization and linear mapping to output semantic representations that fit the dimensions. ; Design a project feature projection adapter to embed the original project features. Normalization is applied, and a dimensionality reduction projection strategy is used to output a semantic representation that fits the dimensions. ; The output of the three-way projection adapter The joint feature representation of the task is obtained by splicing the features together. .

6. The cold-start recommendation method based on balanced sampling and embedding optimization meta-learning according to claim 1, characterized in that, Step 5 includes: Step 5.1: Construct an adaptive deep recommendation network, following the strategy of moderate expansion in the early stage, gradual compression in the middle stage, and strong bottleneck constraints in the final stage to extract task semantics; among them, the LeakyReLU activation function is used uniformly across different network layers; Step 5.2: For the meta-learning training mode, design a dual-channel dropout rate execution strategy with inner and outer loops; the dropout rate calculation formula for each layer of the outer loop is as follows: in For layer depth sensitivity parameters, This is a layer width sensitivity parameter. As the baseline embedding dimension, For the maximum loss rate, This represents the global loss rate. The maximum width factor, Embed a dimension for the width of each layer. Represents the current layer network depth. Indicates the dimensional scaling baseline; Step 5.3: The formula for calculating the loss rate of each layer in the inner loop is as follows: in This is the multiplier factor; Step 5.4: Embed the optimized user features Embedding product features The input is an adaptive deep recommendation network that learns the user's interaction characteristics and outputs a scalar score representing the user's level of interest in the current product.

7. The cold-start recommendation method based on balanced sampling and embedding optimization meta-learning according to claim 1, characterized in that, After obtaining the user's predicted rating based on step 5, the process also includes: calculating the loss based on the predicted rating of the support set, updating the model parameters through gradient descent to obtain specific parameters adapted to the current user's rating habits; using the specific parameters to make predictions based on the query set, calculating the meta-loss, and updating the global parameters shared by all tasks through backpropagation.

8. A cold-start recommendation system based on balanced sampling and embedding optimization meta-learning, characterized in that, include: The preprocessing unit is used to preprocess the original user interaction data, remove long-tail users whose sparsity is lower than a preset threshold I based on the number of interaction records N, and retain all interaction data of the remaining active users. The first construction unit constructs a meta-task containing a support set and a query set based on the rating balance sampling strategy for each user's interaction data, and extracts multi-dimensional implicit statistical features to characterize the rating habits and distribution characteristics of the current user's task, thus obtaining the feature preference code for each user. The second building unit is used to construct the feature embedding module to achieve a unified representation of multiple types of features: continuous features are transformed nonlinearly to obtain real-valued embedding vectors; discrete fixed-length features are mapped to embedding vectors through an embedding lookup table; discrete variable-length features are represented by an index list and an offset list, and aggregated through the EmbeddingBag operation that supports higher-order gradient propagation to generate aggregated embedding vectors; finally, the three types of feature embedding vectors are concatenated and fused to construct the original feature embeddings for users and projects respectively. The third building unit is used to build the embedding optimization module to achieve fine-grained optimization of feature embedding: combining the original feature embeddings of users and items with the feature preference encoding obtained from the second building unit, generating dynamic adjustment parameters through a fusion decoding network, and using feature linear adjustment to dynamically transform the original feature embeddings to obtain the optimized feature embeddings of users and items. The fourth building unit constructs an adaptive deep recommendation network as a rating predictor. This network adopts a funnel-shaped linear architecture that can efficiently compress feature representations. The neuron width and loss rate of each layer of the network are determined based on the input feature embedding dimension and the network layer depth. The optimized user and item features are embedded into the adaptive deep recommendation network, which outputs predicted ratings and recommends items based on the predicted ratings.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a cold-start recommendation method based on equal sampling and embedding optimization meta-learning as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a cold-start recommendation method based on equal sampling and embedding optimization meta-learning as described in any one of claims 1 to 7.