A double-embedding model hybrid training method, system, device and storage medium

By dynamically selecting and collaboratively updating the embedding table based on historical access information of classification features in the recommendation system, the problem of inconsistency between the training and inference modes of the embedding model is solved, improving the stability and recommendation accuracy of the model and adapting to different cache configurations.

CN122262151APending Publication Date: 2026-06-23SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
Filing Date
2026-02-10
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing recommendation systems, the training methods for embedded models fail to effectively simulate the dynamic changes in cache hits and misses during the inference phase, resulting in large fluctuations in recommendation accuracy and poor system stability in real-world scenarios. Furthermore, traditional training methods cannot adapt to different cache configurations.

Method used

By determining routing parameters based on historical access information with classification features, dynamically selecting embedding tables, and combining forward computation and loss computation, the first and second embedding tables are updated collaboratively, simulating a scenario where embedding tables are used in combination during the inference phase.

Benefits of technology

It improves the stability and robustness of the model in practical use, adapts to different business scenarios and resource constraints, improves recommendation accuracy and performance, and requires no additional hardware cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262151A_ABST
    Figure CN122262151A_ABST
Patent Text Reader

Abstract

The application discloses a double-embedding model hybrid training method, system, device and storage medium, which is applied to the technical field of recommendation systems and comprises the following steps: determining the routing parameters of each classification feature based on the historical access information of the classification features in a training data set; selecting a corresponding embedding table for the classification features input currently according to the routing parameters; wherein the embedding table comprises a first embedding table and a second embedding table; extracting the embedding vector corresponding to the classification features from the selected embedding table, and performing forward calculation and loss calculation of the model based on the embedding vector; and updating the parameters of the first embedding table, the second embedding table and a downstream model according to the result of the loss calculation. The application simulates the embedding hybrid use mode in reasoning in the training stage, enhances the collaborative ability of the two embedding tables, and improves the performance and robustness of the model in a real reasoning scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommendation system technology, and in particular to a method, system, device and storage medium for hybrid training of dual-embedded models based on hot and cold routing. Background Technology

[0002] With the growth of internet data, recommender systems have become a core technology for alleviating information overload. Embedding models, as a key component for processing categorical features, require dedicated embedding tables to represent massive amounts of categorical data. However, embedding tables suffer from sparse entries and large size, consuming significant memory resources and becoming a bottleneck for system performance.

[0003] To alleviate these issues, some studies have proposed a dual-embedding structure, combining a standard embedding table stored in the backend with an efficient embedding table stored in memory, supplemented by a caching mechanism. However, this structure faces challenges during the training phase: traditional training methods (such as independent training, random routing training, or fixed hot / cold data partitioning training) cannot effectively simulate the mixed usage pattern of embedding tables during the inference phase. Specifically, the training process does not consider the dynamic changes in cache hits and misses, the rigid hot / cold data partitioning, and the lack of collaborative training between the two embedding tables, resulting in large fluctuations in recommendation accuracy and poor system stability in real-world inference scenarios.

[0004] To overcome these shortcomings, this application proposes a dual-embedded model hybrid training method, system, device, and storage medium. Summary of the Invention

[0005] The purpose of this application is to provide a hybrid training method, system, device and storage medium for dual-embedded models, which aims to solve the problem of inconsistent patterns in dual-embedded structures during the training and inference stages.

[0006] To achieve the above objectives, this application provides the following technical solution: Firstly, this application provides a method for hybrid training of a dual-embedding model, comprising the following steps: Based on the historical access information of each classification feature in the training dataset, the routing parameters for each classification feature are determined. The corresponding embedding table is selected based on the current input classification features according to the routing parameters; wherein, the embedding table includes a first embedding table and a second embedding table; Extract the embedding vectors corresponding to the classification features from the selected embedding table, and perform forward computation and loss calculation of the model based on the embedding vectors; Based on the results of the loss calculation, update the parameters of the first embedding table, the second embedding table, and the downstream model.

[0007] Secondly, this application provides a dual-embedding model hybrid training system, specifically including: The routing parameter configuration module is used to determine the routing parameters for each classification feature based on its historical access information in the training dataset. The dynamic routing module is used to select the corresponding embedding table for the currently input classification features based on the routing parameters; wherein the embedding table includes a first embedding table and a second embedding table; The embedding vector extraction module is used to extract the embedding vector corresponding to the classification feature from the selected embedding table; The forward and loss calculation module performs forward and loss calculations of the model based on the embedding vector. The parameter collaborative update module is used to update the parameters of the first embedding table, the second embedding table, and the downstream model based on the result of the loss calculation.

[0008] Thirdly, this application provides a computer device, the computer device including a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing a dual-embedded model hybrid training method; the processor is used to execute the program instructions stored in the memory to implement a dual-embedded model hybrid training.

[0009] Fourthly, this application provides a computer-readable storage medium storing processor-executable program instructions for executing a dual-embedding model hybrid training method.

[0010] This application provides a method, system, device, and storage medium for hybrid training of dual-embedded models, which has the following beneficial effects: (1) By dynamically selecting the embedding table based on the routing parameters during the training iteration, the scenario of the recommendation system using different embedding tables in a real inference environment due to the fluctuation of cache hit rate is effectively simulated. The alignment of this training process with the inference mode enables the trained model to better adapt to the dynamic changes in actual deployment, thereby improving the stability and robustness of the model in actual use. (2) Since the routing parameters can be flexibly set and adjusted according to the specific configurations such as the target system's cache size and expected hit rate, the same training framework can be easily adapted to different business scenarios and resource constraints. There is no need to redesign the training process for each cache configuration, which improves the universality and deployability of this application.

[0011] (3) This application achieves parameter co-update of the first embedding table, the second embedding table and the downstream model during the training phase, so that the representations from different embedding tables tend to be consistent under the common optimization objective. This co-optimization mechanism directly brings better model performance. Experiments on public datasets show that, compared with the traditional independent training method, the model trained by this method can achieve higher recommendation accuracy under the same cache configuration, and its performance is more robust and less volatile in scenarios with low cache hit rate.

[0012] (4) The entire training scheme is a pure software algorithm improvement, and its implementation does not depend on any specific hardware accelerator or computing device. Therefore, the method proposed in this application can be seamlessly integrated into the existing recommendation system framework. While improving performance, it does not require the introduction of additional hardware costs or complex system modifications, and has high practicality and economy. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating a dual-embedding model hybrid training method according to Embodiment 1 of this application; Figure 2 This is a flowchart of a dual-embedding model hybrid training method according to Embodiment 1 of this application; Figure 3 This is a schematic diagram of the structure of a dual-embedded model hybrid training system according to Embodiment 2 of this application; Figure 4 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application; Figure 5 This is a schematic diagram of the storage medium structure of Embodiment 4 of this application. Detailed Implementation

[0014] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0015] The following analysis, based on relevant technologies, examines existing solutions.

[0016] (1) Independent training method: Traditional embedding table and memory-efficient embedding table are trained separately, and the choice is made based on the cache hit situation during inference; however, the two do not interact during training, resulting in inconsistent representations during fusion.

[0017] (2) Random routing training method: The embedding table is randomly selected for forward propagation during training, but the hot and cold distribution of data access is not considered, which is out of touch with the real reasoning mode.

[0018] (3) Fixed hot and cold partitioning training method: hot and cold IDs are pre-divided according to the statistics of the training set. The corresponding embedding table is used in a fixed way during training, which cannot adapt to the dynamic cache hit situation during the inference stage.

[0019] Therefore, existing training methods mainly have the following drawbacks: Traditional training methods fail to simulate the dynamic changes in cache hits and misses during the inference phase, resulting in trained models that cannot adapt to real-world inference scenarios and exhibit significant performance fluctuations. Fixed hot and cold ID partitioning fails to reflect the dynamic data access patterns during inference, leading to poor model adaptability to different cache configurations. Furthermore, the two embedding tables operate independently during training, lacking effective collaborative optimization, resulting in inconsistent representations during fusion and severely impacting recommendation accuracy.

[0020] This application provides a method, system, device, and storage medium for hybrid training of dual-embedded models. By simulating the hybrid use mode of embeddings in inference during the training phase, it enhances the synergistic ability of the two embedding tables and improves the performance and robustness of the model in real inference scenarios.

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0022] Example 1 Please see Figure 1 This is a flowchart illustrating a dual-embedding model hybrid training method according to Embodiment 1 of this application; the steps include: S1: Determine the routing parameters for each classification feature based on its historical access information in the training dataset.

[0023] In this embodiment, determining the routing parameters for each classification feature based on its historical access information in the training dataset includes steps S101 to S104, which are described in detail below.

[0024] S101: Calculate the access frequency of each classification feature in the training dataset.

[0025] Let's take user ID as a classification feature as an example. First, in the training dataset, we count the total number of times each unique user ID appears in the entire training set; this number is defined as the access frequency of that user ID. For example, according to the statistics, user ID "U12345" appeared 1534 times, and user ID "U67890" appeared 5 times.

[0026] S102: Based on the preset frequency threshold, the classification features are divided into a hot feature set and a cold feature set. Classification features with access frequency higher than the frequency threshold belong to the hot feature set, while classification features with access frequency lower than or equal to the frequency threshold belong to the cold feature set.

[0027] Set a frequency threshold This threshold is used to distinguish between high-frequency and low-frequency access features. It can be determined based on business experience, system memory constraints, or desired cache hit rate targets.

[0028] All access frequencies greater than User IDs are categorized to form a hot feature set; all users with access frequencies less than or equal to The user IDs are categorized to form a cold feature set. This step completes the initial division of all categorical features.

[0029] S103: Configure a first type of routing parameters for the classification features belonging to the hot feature set. The first type of routing parameters includes a first probability value that causes the corresponding classification feature to be selected into a first embedding table during training, and a second probability value that causes it to be selected into a second embedding table, wherein the first probability value is greater than the second probability value.

[0030] For each user ID in the hot feature set, configure a first type of routing parameter. This parameter is specifically represented by two probability values: First probability value This indicates the probability that the user ID will be selected into the first embedding table (i.e., the standard embedding table) in each iteration of the dual embedding model training. This probability value is set relatively high, for example... .

[0031] Second probability value This indicates the probability that the user ID will be selected into the second embedding table (i.e., the in-memory efficient embedding table) in each iteration of the dual embedding model training. This probability value is set relatively low, for example... .

[0032] in, ,and This simulates the scenario where, during the inference phase, the hot ID will hit the cache most of the time (using the first embedding table), but there is still a small probability that the second embedding table will be used due to a cache miss.

[0033] S104: Configure a second type of routing parameters for the classification features belonging to the cold feature set. The second type of routing parameters include a third probability value that causes the corresponding classification feature to be selected into a second embedding table during training, and a fourth probability value that causes it to be selected into a first embedding table, wherein the third probability value is greater than the fourth probability value.

[0034] For each user ID in the cold feature set, configure a second type of routing parameter. This parameter also includes two probability values: Third probability value This indicates the probability that the user ID will be selected into the second embedding table during the training iteration. A higher probability value is typically set as follows: .

[0035] Fourth probability value This indicates the probability that the user ID will be selected into the first embedding table during the training iteration. This probability value is set relatively low, for example... .

[0036] in, ,and This simulates the scenario where, during the inference phase, cold IDs typically do not reside in the cache (using the second embedding table), but occasionally become hot IDs due to increased access frequency and are cached (using the first embedding table).

[0037] Through the above steps, the routing parameters for each classification feature in the training data have been initialized and configured. These parameters are not fixed; their specific values ​​can be flexibly adjusted based on cache capacity, expected hit rate, and other configurations to adapt to different business scenarios and performance requirements. The dynamic and uncertain cache access behavior during the inference phase is simulated during the training phase using probabilistic routing parameters, providing a clear decision-making basis for subsequent steps and thus solving the fundamental problem of inconsistency between training and inference modes. The same process can be used for other classification features (such as product ID, scene ID, etc.). Frequency threshold Various probability values ​​can be set independently for different features to achieve more refined training control.

[0038] S2: Select the corresponding embedding table for the current input classification feature based on the routing parameters; wherein the embedding table includes a first embedding table and a second embedding table.

[0039] In this embodiment, it is assumed that the current training batch contains multiple training samples, each sample containing a user ID feature (e.g., U12345, which belongs to the hot feature set) and a product ID feature (e.g., I99999, which belongs to the cold feature set).

[0040] S201: In the training of the dual embedding model, for each input classification feature, obtain the routing parameters configured for that classification feature.

[0041] For user IDU12345 (belonging to the hot feature set), obtain its first type of routing parameter: the first probability value of being selected into the first embedding table. and the second probability value selected into the second embedding table. .

[0042] For product IDI99999 (belonging to the cold feature set), its second type of routing parameter is obtained: the third probability value of being selected into the second embedding table. and the fourth probability value selected into the first embedding table. .

[0043] S202: Based on the probability values ​​corresponding to the routing parameters, select the first embedding table or the second embedding table as the target embedding table for the current classification feature.

[0044] Generate a random number uniformly distributed in the interval [0, 1) for features U12345 and I99999 respectively. For example, U12345 generates a random number R1=0.65, and I99999 generates a random number R2=0.03.

[0045] The generated random number is compared with the key probability threshold in the routing parameters.

[0046] For thermal feature U12345: First probability value If R1 < 0.8, then in this iteration it is routed to the first embedding table; otherwise it is routed to the second embedding table. Since 0.65 < 0.8, the target embedding table for U12345 is determined to be the first embedding table.

[0047] For the cold feature I99999: the third probability value If R² < 0.9, then in this iteration it is routed to the second embedding table; otherwise it is routed to the first embedding table. Since 0.03 < 0.9, the target embedding table for I99999 is determined to be the second embedding table.

[0048] Through the above implementation, in each training iteration, the embedding table used for the classification features is no longer fixed, but randomly determined by the probability distribution defined by its routing parameters. This mechanism accurately simulates the scenario of mixed embedding table usage caused by dynamic fluctuations in cache hit rate during the inference phase. This dynamic, probabilistic routing selection allows the model to frequently experience and learn the representations and fusion of the two embedding tables in different contexts during the training phase. This leads to the alignment of the representation spaces of the first and second embedding tables during parameter updates, overcoming the problems of inconsistency between training and inference modes and insufficient embedding table synergy. The probability values ​​can be adjusted according to the actual cache configuration of the target system to adapt to different performance and resource balance points.

[0049] S3: Extract the embedding vectors corresponding to the classification features from the selected embedding table, and perform forward computation and loss calculation of the model based on the embedding vectors.

[0050] In this embodiment, the current training batch contains one training sample, which includes two classification features whose target embedding tables have been determined through dynamic routing: User ID U12345 (routed to the first embedding table) and Product ID I99999 (routed to the second embedding table). The first embedding table (i.e., the standard embedding table) has a vector dimension of 64, and the second embedding table (i.e., the memory-efficient embedding table) has a vector dimension of 32; the downstream model is a neural network; the true label of the sample is 1. Specifically, steps S301 to S304 are included, which are described in detail below.

[0051] S301: When multiple classification features are selected to different embedding tables, the corresponding embedding vectors are extracted from the first embedding table and the second embedding table respectively.

[0052] For user ID U12345, the target embedding table is the first embedding table. The row corresponding to this ID is found in the first embedding table, yielding a 64-dimensional embedding vector.

[0053] For product ID I99999, its target embedding table is the second embedding table. The row corresponding to this ID is found in the second embedding table, yielding a 32-dimensional embedding vector.

[0054] S302: The extracted multiple embedding vectors are fused to obtain a fused embedding vector.

[0055] Since the two extracted embedding vectors come from different tables and have different dimensions, they need to be fused to form a unified feature representation for downstream model processing. This embodiment uses vector concatenation as the fusion method. The 64-dimensional embedding vector and the 32-dimensional embedding vector are concatenated end-to-end along the feature dimension to obtain a 96-dimensional fused embedding vector.

[0056] This fusion operation preserves all feature information from the different embedding tables. In alternative implementations, fusion can also be performed using methods such as weighted summation.

[0057] S303: Input the fused embedding vector into the downstream model for forward propagation to obtain the prediction result.

[0058] First, the embedded vectors are fused as input and fed into a feature interaction module. In this embodiment, this module is a multilayer perceptron (MLP) containing two fully connected layers. The first layer transforms the 96-dimensional input into 48 dimensions and applies the ReLU activation function; the second layer transforms the 48-dimensional input into 24 dimensions and applies the ReLU activation function again. This process enables deep interaction and abstraction of features.

[0059] The 24-dimensional feature vector after interaction is input into an output layer, which ultimately outputs a scalar prediction value between 0 and 1; this value represents the probability of user clicks predicted by the model.

[0060] S304: Calculate the loss function value based on the prediction results and the obtained true labels.

[0061] After obtaining the model's predicted values, they are compared with the true labels of the samples, and the loss function value is calculated to quantify the error of this prediction. Specifically, the loss value for this training iteration is calculated using the binary cross-entropy loss function; this loss value will serve as the basis for subsequent parameter updates.

[0062] Based on the dynamic routing results, corresponding vectors are extracted from either the first or second embedding table and fused into a unified feature representation through a concatenation operation. This simulates a scenario where embedding vectors of different precisions are used interchangeably during the inference stage due to cache hits. The fused vector serves as the input to the downstream neural network, undergoing standard feature interactions and nonlinear transformations to obtain the final prediction result. The prediction error is accurately calculated using a loss function, providing a clear optimization objective for the subsequent collaborative parameter updates of the first and second embedding tables and the downstream model.

[0063] S4: Update the parameters of the first embedding table, the second embedding table, and the downstream model based on the result of the loss calculation.

[0064] In this embodiment, the current training iteration has completed forward computation and loss calculation, resulting in a loss value. This embodiment uses this loss value and the backpropagation algorithm to simultaneously update the parameters of the first embedding table, the second embedding table, and the downstream model, thereby achieving collaborative training among the three.

[0065] S401: Based on the loss function value obtained from the loss calculation, the parameter gradients of the first embedding table, the second embedding table, and the downstream model are calculated using the backpropagation algorithm.

[0066] First, the gradient of the loss value with respect to the model's final predicted output is calculated. This gradient starts from the output layer and propagates along the backward path of the forward computation, sequentially through each layer of the downstream model. During this process, the chain rule is used to calculate the gradient of the loss value with respect to the parameters of each layer. Simultaneously, the gradient continues to propagate backward until the gradient of the loss value with respect to the fused embedding vector is obtained, denoted as... v_fused.

[0067] Since the fused embedding vector is composed of the user vector (from the first embedding table) and the item vector (from the second embedding table), the gradient... v_fused can then be naturally split according to the dimensions before splicing, thus obtaining the gradient of the loss relative to the user vector and the gradient of the loss relative to the item vector; at the same time, the gradient of the downstream model parameters is also obtained.

[0068] S402: Update the parameters of the first embedding table, the second embedding table, and the downstream model according to the parameter gradient.

[0069] After obtaining the gradients of all parameters, the parameters are updated using the optimizer. The gradients are then... `v_user` is applied to the 64-dimensional embedding vector row corresponding to user ID U12345 in the first embedding table. The optimizer determines the update amount for this iteration based on this gradient and its own algorithm (such as calculating first and second moment estimates), and modifies the value of that row vector. The gradient is then... v_item is applied to the 32-dimensional embedding vector row corresponding to product ID I99999 in the second embedding table; the optimizer updates the value of this row vector using the same mechanism. The calculated gradients of the weights and biases of each layer are applied to the parameter matrices and vectors of the downstream models, and updated synchronously.

[0070] This process is completed within a single training iteration, ensuring that the first embedding table, the second embedding table, and the downstream model are simultaneously adjusted according to the same objective (minimizing the loss of the current sample). Since the gradient signals received by the parameters in both embedding tables originate from the same loss function and have undergone mapping and interaction with the same downstream model, they are driven to evolve towards a common optimal feature representation space during optimization. This directly solves the problem of insufficient synergy among embedding tables, leading to inconsistent representations during fusion.

[0071] Although the embedding table used for each feature in each iteration is randomly routed, the collaborative update mechanism ensures that regardless of which table a feature is routed to, its parameter update direction is always aimed at optimizing the overall model's predictive ability. This allows the model to adapt to such dynamic changes and learn representations that remain robust even in complex inference scenarios that use a mix of two embedding tables, thus resolving the performance fluctuation problem caused by inconsistencies between training and inference modes.

[0072] Please see Figure 2This is a flowchart of a dual-embedding model hybrid training method according to Embodiment 1 of this application. Training data is input in batches. First, preprocessing is performed, dividing the data into a hot ID set based on historical access frequency, and coloring the ID features within each batch to generate identifier data with a structure of batch size and number of ID feature columns. The process then enters the core dynamic routing stage: a standard embedding table (i.e., the first embedding table) and a memory-efficient embedding table (i.e., the second embedding table) exist in parallel. An embedding table is dynamically selected for each ID based on preset routing probabilities (hot IDs use the standard embedding table with an 80% probability and the memory-efficient embedding table with a 20% probability; cold IDs use the two tables with 10% and 90% probabilities respectively). This is the ID routing process. After routing, vectors are extracted from the corresponding embedding tables and the process enters the ID fusion stage, where embedding vectors from different sources are fused to provide a unified feature input for downstream neural network computation.

[0073] The feasibility of this application has been experimentally verified. Experiments were conducted on public datasets (Criteo, Avazu, ML-20M). Experimental results show that on the Criteo dataset, the DeRec system using this application achieves an AUC improvement of approximately 0.25% compared to the independent training method with a 3% cache size. Under different cache hit rates, this application exhibits more stable performance with less fluctuation than traditional training methods. Embedding fusion is smoother during training, and the model converges faster.

[0074] In summary, Embodiment 1 of this application provides a hybrid training method for dual-embedded models, aiming to solve the storage efficiency bottleneck caused by the large size of embedding tables in recommendation systems, and the performance fluctuation problem caused by the inconsistency between training and inference modes in traditional dual-embedded architectures. This method first divides the training data into hot and cold feature sets based on the historical access frequency of classification features using a preset threshold. Routing parameters are then configured for features belonging to different sets, ensuring that hot features are associated with a high-precision first embedding table with a high probability, and cold features are associated with a high-storage-efficiency second embedding table with a high probability. In each iteration of model training, each input feature is probabilistically and randomly routed according to the routing parameters, dynamically determining the target embedding table used in this iteration. This accurately simulates the scenario of hybrid embedding table usage caused by dynamic fluctuations in cache hit rate during the inference stage. Subsequently, corresponding feature vectors are extracted from the selected embedding tables. When features in the same training sample are routed to different embedding tables, these heterogeneous vectors are fused and input into the downstream neural network to complete forward computation and loss evaluation. Finally, based on the loss value, the parameters of the first embedding table, the second embedding table, and the downstream neural network are calculated and updated using the backpropagation algorithm, achieving synergistic optimization among the three. This method aligns the training process with the real-world inference scenario through a dynamic routing mechanism and promotes the convergence of the representation spaces of the two embedding tables through collaborative updates, thereby fundamentally improving the model's recommendation accuracy without requiring additional hardware support.

[0075] Example 2 Please see Figure 3 This is a schematic diagram of the structure of a dual-embedded model hybrid training system according to Embodiment 2 of this application; the specific content includes: The routing parameter configuration module 100 is used to determine the routing parameters for each classification feature based on the historical access information of each classification feature in the training dataset. The dynamic routing module 200 is used to select the corresponding embedding table for the currently input classification features based on the routing parameters; wherein the embedding table includes a first embedding table and a second embedding table; The embedding vector extraction module 300 is used to extract the embedding vector corresponding to the classification feature from the selected embedding table; The forward and loss calculation module 400 performs forward and loss calculations of the model based on the embedded vector. The parameter collaborative update module 500 is used to update the parameters of the first embedding table, the second embedding table, and the downstream model based on the result of the loss calculation.

[0076] For further details regarding the implementation techniques of each module in the dual-embedded model hybrid training system, please refer to the description of a dual-embedded model hybrid training method in the above embodiments, which will not be repeated here.

[0077] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system-type embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0078] Example 3 Please see Figure 4 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application. The computer device 50 includes a processor 51 and a memory 52 coupled to the processor 51.

[0079] The memory 52 stores program instructions for implementing the above-described dual-embedded model hybrid training method.

[0080] The processor 51 is used to execute program instructions stored in the memory 52 to implement a hybrid training of a dual-embedded model.

[0081] The processor 51 can also be referred to as a CPU (Central Processing Unit).

[0082] Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0083] Example 4 Please see Figure 5 This is a schematic diagram of the storage medium in Embodiment 4 of this application. The storage medium in this embodiment stores a program file 61 capable of implementing all the above methods. This program file 61 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or devices such as computers, servers, mobile phones, and tablets.

[0084] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0085] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0086] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.

[0087] Of course, the present invention may have many other embodiments. Based on this embodiment, other embodiments obtained by those skilled in the art without any creative effort are all within the scope of protection of the present invention.

Claims

1. A dual-embedding model hybrid training method, characterized in that, include: Based on the historical access information of each classification feature in the training dataset, the routing parameters for each classification feature are determined. The corresponding embedding table is selected based on the current input classification features according to the routing parameters; wherein, the embedding table includes a first embedding table and a second embedding table; Extract the embedding vectors corresponding to the classification features from the selected embedding table, and perform forward computation and loss calculation of the model based on the embedding vectors; Based on the results of the loss calculation, update the parameters of the first embedding table, the second embedding table, and the downstream model.

2. The dual-embedding model mixed training method according to claim 1, wherein, The step of determining the routing parameters for each classification feature based on its historical access information in the training dataset specifically includes: Calculate the access frequency of each classification feature in the training dataset; Based on a preset frequency threshold, the classification features are divided into a hot feature set and a cold feature set. Classification features with an access frequency higher than the frequency threshold belong to the hot feature set, and classification features with an access frequency lower than or equal to the frequency threshold belong to the cold feature set. Configure a first type of routing parameter for the classification feature belonging to the hot feature set. The first type of routing parameter includes a first probability value that causes the corresponding classification feature to be selected to the first embedding table during training, and a second probability value that causes it to be selected to the second embedding table, wherein the first probability value is greater than the second probability value. Configure a second type of routing parameters for the classification features belonging to the cold feature set. The second type of routing parameters includes a third probability value that causes the corresponding classification feature to be selected into the second embedding table during training, and a fourth probability value that causes it to be selected into the first embedding table, wherein the third probability value is greater than the fourth probability value.

3. The dual-embedding model mixed training method according to claim 2, characterized in that, The step of selecting the corresponding embedding table for the current input classification features based on the routing parameters specifically includes: In the training of the dual embedding model, for each input classification feature, the routing parameters configured for that classification feature are obtained; Based on the probability values ​​corresponding to the routing parameters, the first embedding table or the second embedding table is selected as the target embedding table for the current classification feature.

4. The dual-embedding model mixed training method according to claim 3, characterized in that, The step of extracting the embedding vector corresponding to the classification feature from the selected embedding table, and performing forward computation and loss calculation of the model based on the embedding vector, specifically includes: When multiple classification features are selected into different embedding tables, the corresponding embedding vectors are extracted from the first embedding table and the second embedding table, respectively. The extracted multiple embedding vectors are fused to obtain a fused embedding vector; The fused embedding vector is input into the downstream model for forward propagation to obtain the prediction result; Based on the prediction results and the obtained true labels, the loss function value is calculated.

5. The dual-embedding model mixed training method according to claim 4, characterized in that, The step of updating the parameters of the first embedding table, the second embedding table, and the downstream model based on the result of the loss calculation specifically includes: Based on the loss function value obtained from the loss calculation, the parameter gradients of the first embedding table, the second embedding table, and the downstream model are calculated using the backpropagation algorithm. The parameters of the first embedding table, the second embedding table, and the downstream model are updated based on the parameter gradient.

6. A dual-embedding model hybrid training system, characterized in that, For performing the dual-embedded model hybrid training method according to any one of claims 1 to 5, the dual-embedded model hybrid training system comprises: The routing parameter configuration module is used to determine the routing parameters for each classification feature based on its historical access information in the training dataset. The dynamic routing module is used to select the corresponding embedding table for the currently input classification features based on the routing parameters; wherein the embedding table includes a first embedding table and a second embedding table; The embedding vector extraction module is used to extract the embedding vector corresponding to the classification feature from the selected embedding table; The forward and loss calculation module performs forward and loss calculations of the model based on the embedding vector. The parameter collaborative update module is used to update the parameters of the first embedding table, the second embedding table, and the downstream model based on the result of the loss calculation.

7. A computer device, characterized in that, The computer device includes a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing the dual-embedded model hybrid training method according to any one of claims 1-5; the processor is used to execute the program instructions stored in the memory to implement dual-embedded model hybrid training.

8. A computer-readable storage medium, characterized in that, The system stores processor-executable program instructions for performing the dual-embedding model hybrid training method according to any one of claims 1-5.