A personalized recommendation method based on semantic factor disentanglement
By constructing an iterative routing mechanism and a joint loss function, the problem of mixed compression of item features in recommendation systems is solved, and automatic deconstruction of item features and fine-grained preference capture are achieved, improving the interpretability and computational efficiency of the model and adapting to changes in user interests.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-12
AI Technical Summary
In existing recommendation systems, the multiple latent semantic features of items are compressed into a single dense vector, making them indistinguishable. This makes it difficult for the model to understand the specific attributes of items in different dimensions, deviating from accurately capturing users' fine-grained multidimensional preferences. Furthermore, the computational cost is high, the feature representation tends to be homogenized, and it lacks interpretability and the ability to adapt to changes in user interests.
By constructing an iterative routing mechanism, items are dynamically allocated to multiple independent semantic factor spaces using learnable routing logic values. The weights are calculated using Softmax normalization to generate independent semantic factor vectors. A joint loss function is introduced to constrain the uniformity of factor distribution, thereby optimizing user-item matching.
Automatic deconstruction of item features was achieved, which improved the model's interpretability, fine-grained preference capture ability, and computational efficiency, and enhanced the model's adaptability to changes in user interests and the accuracy of recommendation results.
Smart Images

Figure CN122199103A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of recommendation systems, unentangled representation learning, dynamic routing, and fine-grained semantic factor construction, specifically to the design of a personalized recommendation method based on semantic factor unentanglement. Background Technology
[0002] Recommender systems, as an essential tool for alleviating information overload, have been widely applied in e-commerce platforms, online video websites, and social media, profoundly impacting various stakeholders. Based on users' purchase history, these systems can predict and recommend content users may be interested in, helping them quickly find desired goods and services, thereby reducing information overload, improving user experience, and enhancing the platform's market competitiveness. However, existing mainstream recommendation models suffer from a fundamental flaw: semantic entanglement in their learned user and item representations. Specifically, multiple factors, including user preferences, item features, and interaction behaviors, are encoded in an indistinguishable "black box" vector. This entanglement leads to opaque internal model logic and limits its ability to fine-grainedly characterize users' true intentions and generalize to unseen interactions. Unentangled representation learning, a cutting-edge field in artificial intelligence, aims to separate independent, semantically clear latent generative factors from observable data, providing a powerful theoretical tool for solving the aforementioned representation "entanglement" problem. Currently, unentangled representation learning focuses on highly structured data such as computer vision (e.g., unentangled image color and shape) and natural language processing (e.g., unentangled grammar, topics, and sentiment). In contrast, recommender system data exhibits unique characteristics such as high discretization, implicitness, sparsity, and heterogeneous behavior. Therefore, designing effective unentangled representation learning methods for recommender system data remains a crucial issue that urgently needs exploration in both theoretical models and algorithmic practice. Summary of the Invention
[0003] I. Technical problems to be solved In practical applications, the multiple latent semantic features of items, such as style, function, and category, are compressed into a single dense vector, making them indistinguishable. This phenomenon makes it difficult for models to understand the specific attributes of items across different dimensions, thus deviating from the core objective of accurately capturing users' fine-grained multidimensional preferences. Ultimately, this results in recommendation results that lack interpretability and are unable to adapt to dynamic changes in user interests. Furthermore, existing graph neural network-based methods, when capturing higher-order signals, are often limited by high computational costs and the over-smoothing effect of deep networks, leading to homogenization of feature representations across different items. This further blurs semantic boundaries, exacerbating the difficulty in decoupling fine-grained features. Therefore, addressing the shortcomings of traditional recommendation systems in capturing item features, this invention proposes a personalized recommendation method based on semantic factor untangling. This method initializes learnable routing logic values, constructs an iterative routing mechanism, and dynamically calculates the weights of each semantic factor for each item using Softmax normalization. Then, it generates independent semantic factor vectors by weighted aggregation of global item information and strengthens the consistency of routing allocation using the similarity feedback between factors and the original vectors. Finally, it introduces a joint loss function including observation alignment, global uniformity, and semantic factor orthogonal regularization to optimize user-item matching while explicitly constraining the uniformity of the distribution among different semantic factors to prevent feature collapse. This invention achieves automatic untangling of item features without complex graph neighborhood aggregation, effectively solving the problem of mixed entanglement of embedded vectors and significantly improving the model's interpretability, fine-grained preference capture capability, and computational efficiency. II. Technical Solution Step 1: Download a publicly available recommendation system dataset containing user-item interaction records. Perform preprocessing: First, remove duplicate interaction records. Then, retain user and item entities with at least 5 interactions to filter noise and ensure data sparsity is within a reasonable range. Re-index and re-encode the retained user and item entities to construct a sparse interaction matrix. Finally, randomly divide each user's interaction records into training, validation, and test sets in an 80 / 10 / 10 ratio. Step 2: Import the preprocessed interaction matrix from Step 1, initialize the user and item embedding vectors, and then perform L2 normalization. This process does not rely on complex graph neighborhood aggregation; it generates initial user representation vectors and item embedding vectors based solely on observed interaction signals, avoiding oversmoothing and reducing computational costs. Step 3: Construct a semantic factor routing module by inputting the item embedding vectors obtained in Step 2 into this module. Introduce learnable routing logic value parameters, initialized as random values following a normal distribution to provide an unbiased starting point. During the routing iteration process, perform Softmax normalization on the routing logic values, dynamically calculate the weights assigned to each item vector for multiple preset global semantic factors, forming a probability distribution from item to semantic dimension, representing the item's contribution to different semantic features. Step 4: Based on the assigned weights calculated in Step 3, the embedding vectors of all items are weighted and aggregated to generate an intermediate representation vector for each semantic dimension. Subsequently, norm normalization is performed on the intermediate representation vectors to obtain semantic factor vectors of unit length. This process achieves a mapping from a discrete set of items to globally shared semantic factors, ensuring that each generated factor represents the feature of an item in a specific semantic dimension (such as category, style, function, etc.). Step 5: Using the similarity between the semantic factor vector generated in Step 4 and the original item embedding vector as a feedback signal, update the routing logic value in Step 3 to strengthen the association between items and their highly matching semantic factors. Repeat the iterative process from Step 3 to Step 5 until the preset number of iterations or convergence condition is reached. After the iteration is complete, output the final set of independent and globally shared fine-grained semantic factors. Step 6: Calculate the total loss function, which includes the alignment loss between interacting users and items, the homogenization loss among all user / item nodes, and the homogenization loss among semantic factors. Specifically, this loss function, while ensuring the accuracy of user and item interaction prediction, prevents feature redundancy and collapse among semantic factors, ensuring that each factor learns independent, fine-grained semantic features. Step 7: Iteratively update the model parameters based on the gradient information from Step 6 until convergence. By exploring model performance under different numbers of semantic factors and different loss function weight settings, and combining multi-dimensional evaluation metrics such as recall, Normalized Discounted Cumulative Gain (NDCG), and training time, the optimal parameter combination is selected. Finally, the trained model is used to calculate the matching score between users and candidate items, generating a recommendation list that meets users' personalized needs and has high generalization ability. III. Beneficial Effects Compared with existing technologies, the present invention has the following advantages: 1. To address the semantic ambiguity caused by existing methods that compress multiple semantic features of items into a single vector, this invention constructs an iterative routing mechanism. Utilizing learnable routing logic values, it adaptively and dynamically allocates item representations to multiple independent semantic factor spaces. This automatic unwrapping process enables each semantic factor to represent a feature in a specific dimension. This not only allows the model to accurately capture users' multidimensional preferences at a fine-grained level but also endows the recommendation results with clear semantic interpretability, effectively solving the problem that traditional black-box models struggle to adapt to dynamic changes in user interests. 2. To address the issues of feature redundancy or pattern collapse that easily arise in multi-factor learning, this invention innovatively designs a total loss function that includes alignment loss between interacting user and item sample pairs, homogenization loss among all user / item nodes, and homogenization loss among semantic factors. By explicitly constraining the uniform distribution among different semantic factor vectors during the optimization process, each factor is forced to learn independent and complementary feature representations. This mechanism not only ensures the richness and diversity of the semantic space but also effectively alleviates the problem of insufficient supervision signals caused by data sparsity, enabling the model to exhibit stronger generalization performance and robustness in cold-start and long-tail item recommendation scenarios. Attached Figure Description
[0004] Figure 1 Overall flowchart of the present invention Figure 2 Overall model framework diagram of the present invention Detailed Implementation
[0005] To clearly illustrate the purpose, technical solution, and advantages of this invention, the invention will be further described in detail below with reference to specific examples and accompanying drawings. This invention recommends items based on users' historical interaction data. The overall process is shown in Figure 1, and the specific steps are as follows: Step 1: Obtain publicly available Gowalla, Yelp 2018, Toys-and-Games, and Beauty recommendation datasets. Perform preprocessing operations on the datasets: First, remove duplicate interaction records; then, retain user and item entities with at least 5 interactions to filter noise and ensure data sparsity is within a reasonable range; re-index and re-encode the retained user and item entities to construct a sparse interaction matrix; finally, randomly divide each user's interaction records into training, validation, and test sets in an 80 / 10 / 10 ratio. Step 2: Import the preprocessed interaction matrix from Step 1 and perform user embedding vector processing. With item embedding vector Initialization is performed. Then, the embedding vector is L2 normalized and mapped onto the unit hypersphere to obtain the normalized representation. and : in, Representing Euclidean distance, this process does not rely on complex graph neighborhood aggregation, but generates initial user representation vectors and item embedding vectors based solely on observed interaction signals, avoiding oversmoothing problems and reducing computational costs. Step 3: Construct a semantic factor routing module by inputting the item embedding vector obtained in Step 2 into this module. Introduce learnable routing logic values. To control items To semantic factors The adaptive route allocation is initialized with small random values that follow a normal distribution. This provides an unbiased starting point for subsequent routing iterations. In each routing iteration, a Softmax normalization operation is first applied to the routing logical values, and the semantic allocation weights are dynamically updated. : in, This represents the total number of preset semantic factors. Represents the item Belonging to the The strength of each semantic factor This indicates the operation of the natural exponent. Step 4: Based on the assigned weights calculated in Step 3, perform weighted aggregation on the embedding vectors of all items to generate an intermediate representation vector for each semantic dimension. Then, perform a normalization operation to obtain a globally shared semantic factor vector of unit length. This process can be represented as: in, Represents a collection of items. Indicates the first An intermediate representation vector of semantic factors This represents the unit vector representation after L2 normalization. Step 5: Finally, leveraging the consistency between the item embedding vector and the semantic factor vector, a positive feedback mechanism is constructed to update the routing logic value. Repeat steps 3 through 5 until the preset maximum number of iterations is reached. .go through After round of iterations, semantic weights are assigned. The semantic factor vectors generated at this point tend to stabilize. This is the final globally shared semantic factor. Step 6: Calculate the total loss function, which includes the alignment loss between interacting users and items, the homogenization loss among all user / item nodes, and the homogenization loss among semantic factors. Specifically, this loss function, while ensuring the accuracy of user and item interaction prediction, prevents feature redundancy and collapse among semantic factors, ensuring that each factor learns independent, fine-grained semantic features. The alignment loss between interacting users and items is: in, This represents the observed positive sample interaction distribution. This represents a combination of users and items randomly selected from all observed interaction pairs. Represents the distribution of positive samples Mathematical expectation operation, This represents the square of the Euclidean distance. The homogenization loss among all user / item nodes is: , in, Represents the natural logarithm operation. This indicates the operation of the natural exponent. and These represent the distribution of users and projects, respectively. and These represent node pairs randomly sampled from the user set and the item set, respectively. and These represent the pairs of nodes that are independently and randomly sampled from the set of all users and the set of all items, respectively. and The mean of the calculated exponential similarity. The homogenization loss among semantic factors is: The final total loss function is defined as: and These are hyperparameters used to control the relative importance of the homogenization loss among all user / item nodes and the homogenization loss among semantic factors, respectively. Step 7: Iteratively update the model parameters based on the gradient information from Step 6, using the Adam optimizer to optimize the model parameters iteratively until convergence. By exploring the model performance under different numbers of semantic factors, similarity thresholds, and different loss function weights, and combining recall, normalized loss cumulative gain (and training time, among other multi-dimensional evaluation metrics), the optimal parameter combination is selected. Finally, the trained model is used to calculate the matching score between users and candidate items, generating a recommendation list that meets users' personalized needs and has high generalization ability. It should be noted that although the embodiments described above are illustrative, they are not intended to limit the invention. Therefore, the invention is not limited to the specific embodiments described above. Any other embodiments obtained by those skilled in the art under the guidance of this invention without departing from its principles are considered to be within the protection scope of this invention.
Claims
1. A personalized recommendation method based on semantic factor untangling, mainly including the following steps: Step 1: Download the publicly available recommendation system dataset that includes user and item interaction records; perform preprocessing operations: first, remove duplicate interaction records, and then retain user and item entities with at least 5 interactions to filter noise and ensure that data sparsity is within a reasonable range. The retained user and item entities are indexed and recoded to construct a sparse interaction matrix; finally, the interaction records of each user are randomly divided into training set, validation set and test set in a ratio of 80 / 10 / 10. Step 2: Import the preprocessed interaction matrix from Step 1, initialize the embedding vectors of users and items, and then perform L2 normalization. This process does not rely on complex graph neighborhood aggregation, but generates initial user representation vectors and item embedding vectors based solely on observed interaction signals, thus avoiding oversmoothing problems and reducing computational costs. Step 3: Construct a semantic factor routing module. Input the item embedding vector obtained in Step 2 into this module. Introduce learnable routing logic value parameters and initialize them as random values that follow a normal distribution to provide an unbiased starting point. During the routing iteration process, a Softmax normalization operation is performed on the routing logical value, and the weights of each item vector for multiple preset global semantic factors are dynamically calculated to form the probability distribution of items to semantic dimensions, representing the contribution of items to different semantic features. Step 4: Based on the weights calculated in Step 3, the embedding vectors of all items are weighted and aggregated to generate an intermediate representation vector for each semantic dimension. Then, norm normalization is performed on the intermediate representation vectors to obtain semantic factor vectors of unit length. This process realizes the mapping from a discrete set of items to globally shared semantic factors, ensuring that each generated factor represents the features of an item in a specific semantic dimension (such as category, style, function, etc.). Step 5: Using the similarity between the semantic factor vector generated in Step 4 and the original item embedding vector as a feedback signal, update the routing logic value in Step 3 to strengthen the association between the item and its highly matching semantic factors; repeat the iterative process from Step 3 to Step 5 until the preset number of iterations or convergence condition is reached; after the iteration is completed, output the final set of independent and globally shared fine-grained semantic factors. Step 6: Calculate the total loss function, which includes the alignment loss between interacting users and items, the homogenization loss between all user / item nodes, and the homogenization loss between semantic factors. Specifically, this loss function ensures the accuracy of user and item interaction prediction while preventing feature redundancy and collapse between semantic factors, and ensures that each factor learns independent fine-grained semantic features. Step 7: Iteratively update the model parameters based on the gradient information from Step 6 until convergence; explore the model performance under different numbers of semantic factors and different loss function weight settings, and select the optimal parameter combination by combining multi-dimensional evaluation indicators such as recall, normalized loss cumulative gain, and training time; finally, use the trained model to calculate the matching score between users and candidate items to generate a recommendation list that meets users' personalized needs and has high generalization ability.
2. The personalized recommendation method based on semantic factor untangling according to claim 1, characterized in that, In step 2, the specific process of initializing and normalizing the user embedding vector and the item embedding vector is as follows: in, and Embedding vectors representing users and items; It represents Euclidean distance.
3. The personalized recommendation method based on semantic factor untangling according to claim 1, characterized in that, Before step 3, there is also a step to initialize the routing logic values: Initialized to follow a normal distribution The random value is used as the unbiased starting point for iterative routing.
4. The personalized recommendation method based on semantic factor untangling according to claim 3, characterized in that, During the iteration process in step 3, the dynamic update of semantic allocation weights The calculation formula is: in, This indicates the total number of preset semantic factors.
5. A personalized recommendation method based on semantic factor untangling according to claim 4, characterized in that, In step 4, the global shared semantic factor vector is generated based on the assigned weights. The specific process is as follows: in, Represents a collection of items. Indicates the first An intermediate representation vector of semantic factors.
6. A personalized recommendation method based on semantic factor untangling according to claim 5, characterized in that, In step 5, the process of updating the routing logical value based on the consistency between the item and the semantic factor can be represented as follows:
7. A personalized recommendation method based on semantic factor untangling according to claim 6, characterized in that, In step 6, the loss function for the model optimization process is defined as: The final loss function is expressed as: in, This represents the observed positive sample interaction distribution. This represents a combination of users and items randomly selected from all observed interaction pairs. Represents the distribution of positive samples Mathematical expectation operation, Represents the square of the Euclidean distance. Represents the natural logarithm operation. This indicates the operation of the natural exponent. and These represent the distribution of users and projects, respectively. and These represent node pairs randomly sampled from the user set and the item set, respectively. and These represent the pairs of nodes that are independently and randomly sampled from the set of all users and the set of all items, respectively. and The mean of the calculated exponential similarity, and These are hyperparameters used to control the relative importance of the homogenization loss among all user / item nodes and the homogenization loss among semantic factors, respectively.