A multi-source cross-domain recommendation method and system based on causal intervention

CN122692299BActive Publication Date: 2026-11-03NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511848299.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-11-03
Estimated Expiration
2045-12-09

AI Technical Summary

Technical Problem

Existing multi-source cross-domain recommendation methods struggle to effectively isolate the interference of domain attributes on domain-invariant preferences in scenarios with multiple source domains, leading to a decline in recommendation performance. This is especially true when the relationship between the source and target domains is not strong, as the model cannot accurately extract domain-invariant preferences.

Method used

By constructing a causal graph to identify users' domain-invariant and domain-specific preferences, and by using backdoor adjustment to eliminate the confusion bias of domain attributes on the representation of domain-invariant preferences, multiple encoders are used to extract users' domain-invariant and domain-specific preference representations, and causal intervention techniques are combined to make recommendation predictions.

Benefits of technology

It significantly improves the accuracy and robustness of cross-domain recommendations, effectively eliminates domain attribute bias in multi-source scenarios, and enhances the model's generalization ability and recommendation accuracy in the target domain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122692299B_ABST
    Figure CN122692299B_ABST
Patent Text Reader

Abstract

The application discloses a multi-source cross-domain recommendation method and system based on causal intervention, and relates to the technical field of computers.The method comprises the following steps: constructing a causal graph of user preferences, which is used to represent the causal relationship among domain attributes, user preferences and user-item interactions in multiple source domains and a target domain; identifying domain-invariant preferences and domain-specific preferences of users based on the causal graph; extracting representations of the domain-invariant preferences and the domain-specific preferences through multiple encoders respectively; based on the causal graph, adjusting the intervention on the domain-specific preference representation through a backdoor to eliminate domain attribute bias; and based on the domain-invariant preference representation and the domain-specific preference representation after intervention, performing recommendation prediction of items by users in the target domain.The application effectively eliminates domain attribute bias in a multi-source scene through causal intervention technology, separates domain-invariant and domain-specific preferences of users through decoupled learning, significantly improves the accuracy and robustness of cross-domain recommendation, and is particularly suitable for complex recommendation scenarios of multiple source domains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, specifically to a multi-source cross-domain recommendation method and system based on causal intervention. Background Technology

[0002] Personalized recommendations are crucial for mitigating information overload, but existing methods often suffer from severe data scarcity in user item interactions. In recent years, cross-domain recommendation methods have been proposed to overcome this limitation by learning preferences in the target domain using user interactions from the source domain. Traditional single-domain recommendation assumes that training and testing data are independently and identically distributed (IID). However, user preferences can change across domains, leading to the Out-of-Depth (OOD) problem in cross-domain recommendations. To address this, previous research aimed to learn a mapping function that maps user embeddings in the source domain to the target domain. However, such mapping functions may introduce additional noise from the source domain, failing to accurately model user preferences in the target domain. Other research has suggested extracting common preferences exhibited by users in both the source and target domains to provide more accurate recommendations. However, this strategy may ignore unique user preferences in the target domain, resulting in limited recommendation performance.

[0003] In recent years, researchers have aimed to address the aforementioned problem by decoupling user preferences in each domain into domain-invariant and domain-specific preferences. Omnimatch uses a classifier to accurately classify domain-specific preferences between the source and target domains and designs a gradient reversal layer (GRL) to learn domain-invariant preferences. Similarly, C2DR utilizes the same classifier while also employing orthogonal loss to decouple domain-invariant and domain-specific preferences. However, these methods still suffer from the following significant drawbacks: When there are multiple source domains, most of them cannot be well applied due to limitations in model structure. Directly merging data from multiple source domains into a single source domain may ignore the heterogeneity between different source domains, leading to noise interference in domain-invariant preference learning and inaccurate extraction of domain-specific preferences. When the relationship between the source and target domains is not strong enough, these methods struggle to extract domain-invariant preferences, and recommendations are primarily generated based on domain-specific preferences. This characteristic becomes more pronounced as the number of domains increases.

[0004] In practical multi-source cross-domain recommendation, user preferences are composed of both domain-invariant preferences and domain-specific preferences, while domain attributes, as confounding variables, affect both simultaneously. Without intervention, the model can easily incorporate domain attribute information into its domain-invariant preference representation during the learning process, preventing it from truly generalizing across domains. Existing methods (such as OmniMatch and C2DR) attempt to decouple these factors, but in multi-source scenarios, they still struggle to effectively isolate the interference of domain attributes on domain-invariant preferences, leading to a decline in recommendation performance.

[0005] Therefore, providing a multi-source cross-domain recommendation method and system based on causal intervention to solve the above problems is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] To address the aforementioned technical problems, the present invention aims to provide a multi-source cross-domain recommendation method based on causal intervention. This method effectively eliminates domain attribute bias in multi-source scenarios through causal intervention technology, and separates user domain invariance and domain-specific preferences through decoupling learning, significantly improving the accuracy and robustness of cross-domain recommendations.

[0007] The technical solution provided by this invention is as follows: A multi-source cross-domain recommendation method based on causal intervention includes the following steps: Construct a causal graph of user preferences, which is used to represent the causal relationships between domain attributes, user preferences, and user item interactions in multiple source and target domains; Based on the causal graph, identify the user's domain-invariant preferences and domain-specific preferences in the multiple source and target domains; The domain-invariant preferences and domain-specific preferences of the user are extracted from multiple encoders to obtain the user's domain-invariant preference representation and domain-specific preference representation; Based on the causal graph, by backdooring the domain-specific preference representation, the confusion bias of the domain attributes on the domain-invariant preference representation is eliminated; Based on the domain-invariant preference representation and the domain-specific preference representation after the intervention, user recommendation predictions for items are performed in the target domain.

[0008] In the aforementioned multi-source cross-domain recommendation method based on causal intervention, the recommendation object is the product, service, or content recommended to the user.

[0009] Preferably, the present invention is used for product recommendation, that is, a multi-source cross-domain product recommendation method based on causal intervention.

[0010] The target domain is the specific field or platform where the user currently needs to make recommendation predictions, and the source domain is an existing field or platform that is different from the target domain and has a large number of user behavior records.

[0011] The domain attributes are inherent characteristics of different domains (such as e-commerce and video platforms), such as product categories and video tags. These attributes are used to distinguish the differences between domains.

[0012] The user preferences mentioned refer to a user's stable selection tendency for specific items (such as products and videos), which are quantified through data such as click-through rates and purchasing behavior. For example, long-term preferences reflect core needs, while short-term interests may be influenced by promotional activities.

[0013] Items are recommendable entities in a recommendation system, such as e-commerce products and video content. In cross-domain recommendations, items may have different attributes in different domains (e.g., a movie on a video platform and a film review platform).

[0014] Preferably, the backdoor adjustment is achieved using the following formula: ; in, This is an intervention that forcibly sets a user's domain-specific preferences to a specific value. In order to be in A random variable indicating whether interaction occurs between users and items within the domain. To represent the user's domain-specific preferences, For the user's domain-invariant preference representation, To represent the characteristics of the project, For domain attribute representation, This is a summation operation for all the values ​​represented by the domain attributes. For domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant.

[0015] The user's historical interaction data is pre-trained based on the probabilistic matrix factorization model to obtain the user embedding learned from the historical interaction data. Feature extraction is performed on user comment data to obtain user embeddings learned from the comment data; The user embeddings learned from historical interaction data and the user embeddings learned from comment data are concatenated; The concatenated user embedding vector is input into a feature encoder implemented by a three-layer multilayer perceptron to obtain the user's domain-specific preference representation; The parameters of the feature encoder are domain-specific, and the user item interaction data includes the user's historical interaction data and comment data.

[0016] Preferably, after obtaining the domain-specific preference representation, the following steps are further included: Based on the methods of obtaining the user embeddings learned from historical interaction data and the user embeddings learned from comment data, the item embeddings learned from historical interaction data and the item embeddings learned from comment data are obtained accordingly. The item embeddings learned from historical interaction data and the item embeddings learned from comment data are concatenated; The concatenated item embedding vector is input into the item encoder to obtain the item feature representation; The project feature representation is input into the domain encoder to obtain a specific domain attribute representation; The parameters of the domain encoder are domain-specific.

[0017] Preferably, the step of extracting the user's domain-invariant preferences to obtain the user's domain-invariant preference representation includes the following steps: The encoder based on shared parameters extracts the first-domain invariant representation; Set a bias vector to align domain-invariant preferences across multiple domains; After concatenating the first domain-invariant representation with the bias vector, a second domain-invariant representation is obtained through a fully connected layer, which serves as the domain-invariant preference representation.

[0018] Preferably, the step of predicting user recommendations for items in the target domain based on the domain-invariant preference representation after intervention and the domain-specific preference representation specifically involves: The domain-invariant preference representation, domain-specific preference representation, item feature representation, and specific domain attribute representation in the target domain are fused and input into the prediction function to calculate the user's recommendation prediction score for the item. The prediction function is trained by minimizing the total loss, which includes at least a main loss for recommendation prediction used to measure prediction accuracy and a backdoor adjustment loss used to causally intervene in domain-invariant preferences.

[0019] Preferably, the formula for the backdoor adjustment loss is as follows: ; in, Adjusting losses for backdoor purposes Let cross-entropy be the loss function. For the set of all source domains, For sets All domain attributes in the representation The summation operation of the values, To represent, given, domain-invariant preference representations, domain-specific preference representations, item feature representations, and domain attribute representations as Under the given conditions, the predicted probability of user-item interaction occurring. For domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant. To correct the bias in the predicted probability distribution after intervention. This represents the original predicted probability without intervention.

[0020] Preferably, the total loss further includes: domain classification loss; The domain classification loss includes: A specific classification loss is used to force the domain-specific preference representation to be classified into its corresponding domain; An invariant classification loss, combined with a gradient reversal layer, is used to prevent the domain-invariant preference representation after the intervention from being classified into its corresponding domain. Cross-domain invariant loss is used to maximize the similarity of the domain-invariant preference representations after the intervention between different domains; Intra-domain loss, combined with the mutual information upper bound algorithm, is used to ensure the independence between the domain-specific preference representation and the domain-invariant preference representation after intervention.

[0021] Preferably, the formula for the cross-domain invariant loss is as follows: ; in, Represents cosine similarity. and It is the user in the domain and Domain-invariant preference representation after intervention.

[0022] A multi-source cross-domain recommendation system based on causal intervention includes: The causal graph construction module is used to construct a causal graph of user preferences, which is used to represent the causal relationships between domain attributes, user preferences, and user item interactions in multiple source and target domains. The preference identification module is used to identify, based on the causal graph, the user's domain-invariant preferences and domain-specific preferences in the multiple source and target domains; The feature extraction module is used to extract the domain-invariant preferences and the domain-specific preferences from multiple encoders respectively, so as to obtain the user's domain-invariant preference representation and domain-specific preference representation; The backdoor intervention module is used to eliminate the confusion bias of the domain attributes on the domain-invariant preference representation by backdoor adjustment of the domain-specific preference representation based on the causal graph; The recommendation prediction module is used to predict user recommendations for items in the target domain based on the domain-invariant preference representation after the intervention and the domain-specific preference representation.

[0023] This invention discloses a multi-source cross-domain recommendation method based on causal intervention. It constructs a causal graph to represent the causal relationships between domain attributes, user preferences, and user-item interactions in multiple source and target domains. Based on this causal graph, it identifies the user's domain-invariant and domain-specific preferences in multiple source and target domains. Multiple encoders are used to extract the user's domain-invariant and domain-specific preference representations from this graph. A backdoor adjustment is used to intervene in the domain-specific preference representation to eliminate the influence of domain attribute bias on the domain-invariant preference representation. Based on the intervened domain-invariant and domain-specific preference representations, user-item recommendation predictions are made in the target domain.

[0024] Compared to existing technologies, this invention effectively eliminates domain attribute bias in multi-source scenarios through causal intervention technology, and separates user domain invariance and domain-specific preferences through decoupling learning, significantly improving the accuracy and robustness of cross-domain recommendations.

[0025] This invention also discloses a multi-source cross-domain recommendation system, which, since it shares the same technical concept and solves the same technical problem as this method, should have the same beneficial effects, and will not be described in detail here. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of a multi-source cross-domain recommendation method based on causal intervention provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the causal perspective of cross-domain recommendation provided in an embodiment of the present invention; Figure 3 This is a flowchart of obtaining a domain-specific preference representation provided in an embodiment of the present invention; Figure 4 This is a flowchart provided in an embodiment of the present invention after obtaining a domain-specific preference representation; Figure 5 This is a flowchart of obtaining a domain-invariant preference representation provided in an embodiment of the present invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] The embodiments of this invention are written in a progressive manner.

[0030] This invention provides a multi-source cross-domain recommendation method and system based on causal intervention. It primarily addresses the technical problems in existing technologies where domain attribute bias, noise interference, and insufficiently strong relationships between the source and target domains in multi-source scenarios lead to low accuracy and robustness in cross-domain recommendations.

[0031] It's important to note that in real-world multi-source, cross-domain recommendation scenarios, each user's preferences can be deconstructed into two parts: first, domain-specific preferences highly relevant to the current domain; and second, domain-invariant preferences that remain consistent across all domains. Simultaneously, each domain possesses unique domain attribute characteristics, which influence user behavior and recommendation results. Therefore, when constructing the causal graph, domain attributes, user preferences (including both domain-invariant and domain-specific preferences), and user-item interactions are incorporated into a unified causal framework.

[0032] However, accurately extracting domain-invariant preferences from a user's overall preference representation (such as a representation concatenated from PMF and comment features) faces a key challenge: domain-invariant preferences should theoretically be independent of domain attributes, meaning they should remain consistent across all domains. However, in practical modeling, without constraints, the model may mix domain attribute information into the domain-invariant preference representation, preventing it from truly generalizing across domains.

[0033] To address this issue, this invention introduces a backdoor adjustment loss and cross-domain orthogonality constraints (such as mutual information minimization loss) to force domain-invariant preference representations to remain independent of domain attributes. Specifically: Backdoor adjustment loss: By intervening in domain-specific preferences, the confusion effect of domain attributes on domain-invariant preferences is eliminated; Cross-domain invariant loss: enhances cross-domain consistency by maximizing the similarity of domain-invariant preference representations in different domains; Intra-domain independence loss: This is achieved through the mutual information upper bound algorithm, ensuring that domain-invariant preferences and domain-specific preferences are decoupled from each other.

[0034] These loss functions work together to enable the encoder to accurately separate domain-independent, pure, domain-invariant preferences from the user's total preference representation, thereby significantly improving the model's generalization ability and recommendation accuracy in the target domain.

[0035] For ease of description, the symbols used in this embodiment are defined as follows: For domain The domain attribute representation, i.e., the first The inherent attribute features of each domain (source domain or target domain), such as product category, platform style, etc., are represented by a vector. For users in the domain User characteristics representation in the domain, i.e., user in the domain The comprehensive feature representation is extracted from data such as historical interactions and comments; For domain The project feature representation in the data, i.e., the domain Comprehensive feature representation of items (such as products, videos); For the domain A variable indicating whether a user interacts with a project takes the value 0 or 1, representing whether the interaction occurs within the domain. Do users interact with the project through clicks, purchases, or other similar actions? For users in the domain Historical interaction data in the domain, i.e., user interaction data within the domain A collection of historical interaction records between the project and the client; To learn user embedding representations from historical interaction data, models such as Probabilistic Matrix Factorization (PMF) are used to... User latent vectors extracted from; The user embedding representation learned from comment data is the latent vector of the user obtained by feature extraction from the user comment text; To learn the item embedding representation from historical interaction data, the latent vector of the item is extracted from the item interaction history through models such as PMF; The project embedding representation learned from the comment data is obtained by extracting the project latent vector from the project-related comments; For users in the domain The domain-invariant preference representation in the code is a transferable preference vector representation that remains consistent across all domains. It is extracted by a shared encoder and then adjusted and debiased through a backdoor. For users in the domain Domain-specific preferences in the context of a user mean that the user only has preferences within a specific domain. The preference vector representation that is highly correlated with the domain attribute is extracted by a domain-specific encoder. For domain The project characteristics in the domain are represented as follows: The comprehensive feature vector in the data is extracted by the project encoder; For domain Domain attribute representation (same as) ), a vector used to represent domain characteristics, which can be extracted from item features by the domain encoder; For domain Project feature representation (same as) In some formulas, Abbreviated as ; , , , These are the parameters for the domain-specific encoder, the domain-invariant encoder, the project encoder, and the domain encoder, respectively. This is a bias vector used to capture the inherent bias of the domain relative to the global average level.

[0036] like Figure 1 As shown, a multi-source cross-domain recommendation method based on causal intervention includes the following steps: S1. Construct a causal graph of user preferences. The causal graph is used to represent the causal relationships between domain attributes, user preferences, and user item interactions in multiple source and target domains. S2. Based on causal graphs, identify users' domain-invariant and domain-specific preferences in multiple source and target domains; S3. Extract domain-invariant preferences and domain-specific preferences from multiple encoders to obtain the user's domain-invariant preference representation and domain-specific preference representation; S4. Based on causal graphs, the confusion bias of domain attributes on domain-invariant preference representations is eliminated by backdoor adjustment of domain-specific preference representations; S5. Based on the domain-invariant preference representation and domain-specific preference representation after intervention, predict user recommendations for items in the target domain.

[0037] The causal graph in step S1 is a key conceptual model. It uses a directed acyclic graph to formally represent the causal relationships between key variables in a recommendation system. Specifically, the causal graph describes a graphical model of causal assumptions between domain attributes, user preferences, item features, and user-item interactions across multiple source and target domains. It abstracts these entities as nodes and connects them with directed edges, with the arrow direction indicating the assumed causal flow. The source domain refers to one or more existing, relatively data-rich domains or application scenarios used to assist and improve the recommendation effect in the target domain. Domain attributes refer to the essential characteristics or contextual environments used to define, characterize, and distinguish different recommendation domains (source or target domains). It is the fundamental reason for the differences in user behavior and item performance between different domains and is considered a key confounding variable in the causal graph. User preferences refer to the inherent, stable interest and selection tendencies exhibited by users when interacting with items. In cross-domain recommendation, to more accurately model and transfer knowledge, this method further decomposes user preferences into two core components: domain-invariant preferences and domain-specific preferences. Domain-invariant preferences in step S2 refer to deep-seated, universal interests and tastes that remain consistent across multiple different domains (source and target domains). They reflect a user's intrinsic, stable, and fundamental preferences, unaffected by the specific attributes of the domain in which they reside. Domain-specific preferences, on the other hand, refer to localized, contextualized interests and behavioral patterns exhibited by a user within a specific domain, due to the unique attributes of that domain. They are highly dependent on and constrained by the context of the current domain. The domain-invariant preference representation in step S3 is a numerical and vectorized representation of domain-invariant preferences. It is a low-dimensional, dense real-valued vector, learned through a machine learning model, designed to encode and capture users' consistent, deep-seated interest features across domains. Similarly, the domain-specific preference representation is a numerical and vectorized representation of domain-specific preferences. Backdoor adjustment in step S4 is a crucial causal intervention step, the core of the entire method's ability to remove bias and generalize. Specifically, backdoor adjustment is a standard method in causal inference used to accurately estimate the causal effect of one variable (e.g., treatment) on another variable (e.g., outcome) when confounding variables are present. Domain attribute bias refers to the systematic, non-essential differences introduced into user preference representation and recommendation prediction due to different domain attributes between the source and target domains. This bias hinders the model's generalization ability in the target domain, preventing the learned knowledge from being correctly transferred. In step S5, the user's recommendation prediction for an item refers to the model calculating the probability score of a user interacting with an item in a target domain (such as clicking, purchasing, or giving a high rating) by integrating the domain-invariant preference representation that has been intervened and debiased, the domain-specific preference representation that captures details, the item feature representation, and the domain-specific attribute representation. Steps S1 to S5 detail the implementation of a multi-source cross-domain recommendation method based on causal intervention. This method models the system as a causal network using a causal graph, achieving a fundamental shift: the model no longer merely learns "what happened," but attempts to understand "why it happened." This enables the model to distinguish between the true motivations behind user behavior (domain-invariant preferences) and environmentally caused randomness (domain-specific preferences and domain attribute biases), thus making recommendations closer to the user's true intentions, as specifically demonstrated below: The synergistic effect of steps S1 and S2 achieves a refined and structured separation of user preferences. The mixed user preferences are clearly separated into: domain-invariant preferences: serving as a "pure" carrier of transferable knowledge; and domain-specific preferences: used to capture details of a specific domain, ensuring the accuracy of recommendations. Step S4 actively eliminates data bias, achieving true domain generalization, specifically through backdoor adjustments. This simulation addresses the question of "what would happen to the interaction probability if users were forced to have a specific preference in any domain?" It severs the causal influence of domain attributes on specific preferences by summing all domain attributes (the intervention aims to eliminate the confusion caused by domain attributes with domain-invariant preferences). The resulting domain-invariant preference representation is "debiased" and pure, no longer dependent on the context of any specific domain. Therefore, it can be safely and effectively transferred from the source domain to the target domain, greatly improving the model's cold start and generalization capabilities in new domains. By synergistically combining steps S3 and S5, a more comprehensive user model is achieved, balancing generalization and specificity. Specifically, domain-invariant representations ensure the model captures the essence of the user, enabling cross-domain knowledge sharing, while domain-specific representations ensure the model doesn't lose unique and valuable contextual information specific to each domain. In the final prediction, bias-reduced generalized knowledge (intervention-adjusted domain-invariant representations) is combined with precise local knowledge (domain-specific representations, item features, etc.). This ensures that the recommendation results align with both the user's long-term intrinsic interests and the specific context of the current domain. The above scheme has the following beneficial effects: Powerful cross-domain generalization and cold start capabilities: By transferring pure domain-invariant preferences, it can quickly adapt to the target domain, especially when the user behavior data in the target domain is extremely sparse or even zero (pure cold start), and the effect far exceeds that of traditional models.

[0038] Robustness and interpretability of recommendation results: By eliminating spurious associations caused by domain attributes, the reasons for recommendations are closer to the user's true preferences, reducing "strange" recommendation results and making the model's decision-making process clearer (which can be traced through causal graphs).

[0039] Immunity to data bias: The ability to effectively handle the problem of inconsistent distribution between the source and target domains is crucial for building a robust recommendation system that can be deployed in multiple scenarios.

[0040] More efficient knowledge utilization: By deconstructing preferences, knowledge can be extracted more effectively and in a more targeted manner from multiple source domains, avoiding the "negative transfer" problem that may be caused by simple transfer (i.e., knowledge from one domain interferes with knowledge from another domain). Instead of relying on complex neural network structures to fit the data, the above approach introduces causal logical priors to guide the model to learn more stable causal mechanisms behind the data, significantly improving the accuracy and robustness of cross-domain recommendations.

[0041] In one embodiment, taking product recommendation as a specific application scenario, the specific implementation process of steps S1 to S5 is as follows: Step S1: Formalize the mixed dependencies between cross-platform behavioral data User behavior data across e-commerce platforms A (books), B (digital products), and C (apparel) is abstracted into a structured inference model. The core of this model is the identification of "platform style" (such as content depth, parameter orientation, and trend orientation) as a key confounding variable. This variable simultaneously shapes users' "interest tendencies" on specific platforms and directly limits the observable "interaction behaviors" on those platforms. Constructing a causal graph aims to reveal that directly observed cross-platform commonalities of interest can be contaminated or distorted due to differences in platform style (confounding).

[0042] Specifically, the source domain refers to the existing "Bookstore" and "Electronics Store" with a large amount of user historical behavior data, while the target domain refers to the "Apparel Store" (new users or sparse data) where we hope to improve the recommendation effect. Domain attributes (D) refer to the inherent platform characteristics of each e-commerce platform. For example, the product attributes of a book e-commerce platform are categories such as "literature" and "social sciences" and in-depth content descriptions; the attributes of an electronics e-commerce platform are "brand," "parameters," and "performance"; and the attributes of an apparel e-commerce platform are "style," "material," and "season."

[0043] User preferences (U) refer to a user's intrinsic, abstract shopping tendencies, such as "pursuing cost-effectiveness", "emphasizing design", "trusting classic brands", and "liking niche culture".

[0044] User-item interaction (Y) refers to a user's behavior of clicking, purchasing, or adding a specific product to their favorites in an online store.

[0045] Cause-and-effect graph relationships: D → U: A user's behavior on a platform (domain) shapes and reflects their preferences within that platform context. For example, frequently buying science fiction novels in a bookstore reinforces their "science fiction enthusiast" preference; researching high-end graphics cards in an electronics store reinforces their "hardcore tech enthusiast" preference.

[0046] D → Y: Platform characteristics directly affect the products displayed and the interaction methods. For example, if the homepage of an apparel mall is full of the latest seasonal styles, even if a user has a preference for "value for money," they may still be guided to click on trendy clothing.

[0047] U → Y: A user's fundamental preferences determine their final behavior. For example, regardless of the platform, a user who "values ​​practicality" is more likely to choose a product that is highly functional rather than one that is visually appealing.

[0048] The purpose of causal graphs is to formalize the cross-platform recommendation problem and clearly reveal that "platform characteristics" may act as a confounding factor, affecting both the formation of preferences (D→U) and directly influencing user behavior (D→Y), thereby interfering with our identification of the user's true preferences (U).

[0049] Step S2: Decouple the transferable core and scenario-dependent representations of user interests Two interest components were separated from users' multi-platform historical behavior: The core of transferability lies in the fundamental decision-making criteria that remain stable in any consumption scenario (such as "prioritizing cost-effectiveness," "brand loyalty," and "aesthetic style"). This part forms the knowledge foundation for cross-domain recommendations.

[0050] Context-dependent representation: Interest behaviors strongly associated with specific product categories or platform ecosystems (such as "following book authors", "researching hardware parameters", "following fashion trends"), this part is key to adapting to the target domain context.

[0051] Specifically, domain-invariant preferences refer to core shopping tendencies that remain stable across all shopping scenarios. For example, whether buying books, computers, or clothes, users consistently "trust well-known brands" or "prefer minimalist designs." This part of the preference is a "gold mine" for cross-domain migration, possessing the strongest generalization ability.

[0052] Domain-specific preferences refer to preferences that users exhibit only in specific shopping scenarios or on specific platforms, and are highly tied to those platforms. For example, a user might show a preference for translated literature in a bookstore, a preference for the latest models in an electronics store, and a preference for trendy colors in an apparel store. These preferences are highly dependent on the current platform's product attributes and marketing strategies and are not easily transferred directly.

[0053] Step S3: Design a parallel representation learning module to separate the generalization factor of interest from the domain factor. By using two (or more) independent neural network modules, the original user-product interaction data is mapped to two different low-dimensional vector spaces: Generalization factor space: The encoder in this space is trained on data from all domains, learns to extract common interest patterns across domains, and the output vector is used to represent the user's long-term stable preferences.

[0054] Domain factor space: The encoder in this space may be divided by domain and learn to capture interest patterns closely related to specific product attributes (such as book ISBN, mobile phone model, clothing SKU). The output vector is used to represent the user's short-term contextual preferences.

[0055] Specifically, multiple encoders refer to a model that designs two (or more) neural networks, which respectively act as a "general preference analyst" and a "domain expert".

[0056] Domain-invariant preference encoders learn and extract common patterns from users' historical behavior across all online marketplaces (books, digital products, clothing). For example, analysis might reveal that users consistently choose the highest-rated or best-selling items in a category, thus encoding a vector representation of "conformity / trust in popular choice."

[0057] Domain-specific preference encoders refer to learning user behavior patterns unique to each e-commerce platform. For example, in an apparel e-commerce platform, they specifically learn user preference vectors for specific clothing styles such as "Bohemian style" and "office lady style."

[0058] Output: Ultimately, each user is represented as two sets of vectors: a cross-platform "general preference vector" (domain-invariant representation) and a set of "specific preference vectors" (domain-specific representations) corresponding to each platform.

[0059] Step S4: Perform causal intervention to deconfound the user's core interest representation. To prevent the "transferable core preferences" learned from the source domain from retaining inherent biases of the source domain platform (e.g., a "cost-effectiveness" preference learned from a "parameter-oriented" digital platform might be too "hardcore"), a backdoor adjustment technique from causal inference is employed. Essentially, when calculating a user's generalization factor (domain-invariant representation), it is not conditional on any specific platform. Instead, a pure core interest representation stripped of platform bias is estimated by weighted summation over all possible platform contexts, assuming the user is fully active on all platforms.

[0060] Specifically, one problem is that the directly learned "domain-invariant preferences" may still be contaminated by the characteristics (D) of the source domain platform. For example, the user group of the source domain (books, digital products) may be more "rational" as a whole, causing the extracted general preferences to also be biased towards "rationality," while the users of the target domain (clothing) may be more "emotional," causing transfer bias.

[0061] Backdoor adjustment: a causal intervention technique aimed at blocking the influence of confounding factors D. In product recommendation, it can be understood as "hypothetical scenario simulation".

[0062] Specific operation: When calculating general user preferences, instead of directly basing them on "the user's actual behavior in Mall A", a weighted average of all possible platform characteristics (D) is used. That is, it simulates "what would be the stable preferences of a user who has been highly active in the book mall, the digital mall, and the clothing mall".

[0063] For example, to predict user "Xiao Wang's" preference for a coat in an apparel mall (target domain), the model will not rely solely on Xiao Wang's behavior in the source domain (books, digital products). Instead, it will "intervene" in his preferences, integrating common information from various platforms (including the apparel mall itself) to obtain a purer, less distorted "truly" universal preference vector.

[0064] Step S5: Integrate bias-reduced generalized interests with target domain contextual interests for personalized ranking. In target recommendation scenarios (such as an apparel e-commerce platform), the final prediction function considers both: Input 1: A pure, generalized user vector obtained through causal intervention (representing the user's essential cross-domain interests).

[0065] Input 2: Domain-specific user vectors learned or fine-tuned on the target domain data (representing users' special interests in the clothing domain).

[0066] Input 3: Embedded representation of the target domain product (including its attributes and context).

[0067] Operation: The above three factors are integrated and interacted through a predictive model (such as a neural network) to calculate the user's interaction probability (such as click rate and purchase rate) for each candidate product, and the final recommendation list is generated accordingly.

[0068] Specifically, when making recommendations for new users or users with sparse behavior in the target domain (apparel mall): Using the general preference vector obtained after intervention: This represents Xiao Wang's stable and transferable shopping personality (such as "trusting classic styles" and "paying attention to fabric").

[0069] Combined with the specific preference vector of the apparel mall: this represents a special pattern in the apparel consumption scenario (such as "likes Korean style" or "follows bloggers' styles"). For new users, this vector may be initialized to the platform average level or learned quickly through a small amount of interaction.

[0070] Fusion and Prediction: The two preference vectors mentioned above are matched with the vectors of the clothing items to be recommended (including attributes such as style, price, and brand). For example, a "Uniqlo classic cashmere sweater" may match both its general preferences (classic, good fabric) and specific preferences (basic and versatile). Finally, the probability of a user clicking on or purchasing this item is calculated, generating a recommendation list.

[0071] like Figure 2 As shown, in one embodiment, step S1 is implemented as follows: To construct a multi-source, cross-domain recommendation scenario, the source domain and target domain are defined, specifically: , , ..., Represented as the source domain, Represented as the target domain, It refers to the number of domains; in this scenario, a causal graph of user preferences is constructed, in which... and This indicates user and project characteristics. Representative domain domain attributes, Indicates interaction, This represents the user's historical interaction data; and This represents user and project characteristics obtained from user-project interaction history data, while and This represents the features obtained from the comment data; and Represent the user's domain-specific preferences and domain-invariant preferences; for edges, This indicates that users' historical interaction data can influence user preferences and project characteristics; and This indicates that user and project characteristics are influenced by comment data and historical interaction data; This indicates that user functionality affects both domain-specific preferences and domain-invariant preferences. This indicates that users' domain-specific and domain-invariant preferences are influenced by domain attributes; This indicates that domain attributes affect project characteristics; This indicates that interactions are influenced by domain-specific and domain-invariant user preferences, project characteristics, and domain attributes.

[0072] Preferably, the backdoor adjustment is achieved using the following formula: ; in, This is an intervention that forcibly sets a user's domain-specific preferences to a specific value (a mean vector representing the domain-specific preferences of all users in that domain). In order to be in A random variable indicating whether interaction occurs between users and items within the domain. To represent the user's domain-specific preferences, For the user's domain-invariant preference representation, To represent the characteristics of the project, For domain attribute representation, This is a summation operation for all the values ​​represented by the domain attributes. Domain attributes The prior probability distribution is calculated through a fully connected layer or preset as a constant (when the domain attribute distribution is known and stable, it can be preset as a uniform distribution or set as a constant according to the domain sample ratio; when the domain attribute distribution is unknown or dynamically changing, it is represented by a lightweight fully connected layer based on the item features). (Make an estimate).

[0073] The above content is the backdoor adjustment formula in step S4. Part of it is calculating when a user domain-specific preference is represented. When forced to a single value (a mean vector representing the domain-specific preferences of all users in that domain), among all possible domain attributes Interaction results in the environment The average probability, thereby eliminating and Potential backdoor paths The correlation between the two factors makes the final estimate... yes right The pure causal effect eliminates the confusion effect of domain attribute bias, producing a debiased, domain-invariant preference representation; the probability calculated by the formula is related to... The representations after intervention are correlated. Since all domain attributes have been weighted and averaged during the computation, the resulting domain-invariant preference representations are... In subsequent training, it is encouraged to fit this "debiased" probability to achieve strong cross-domain generalization ability; the formula transforms the concept of "intervention" in causal theory into a loss function that can be optimized by the neural network (such as backdoor adjustment loss). This operation allows the error gradient to propagate back through this formula, thereby guiding the parameter update direction of the encoder (especially the encoder with generative domain invariant representation). The backdoor adjustment formula provided by the above solution is not merely a mathematical symbol; it serves as a bridge connecting causal theory with recommender system practice. Its technical effect is to transform an abstract concept of "bias removal" into a concrete, optimizable component that can be embedded into deep learning models. By actively severing obfuscation paths, it forces the model to abandon learning simple but spurious statistical associations and instead explore more stable and fundamental causal relationships between users and items. This is the fundamental reason for its improved generalization performance in recommender systems.

[0074] like Figure 3 As shown, preferably, extracting the user's domain-specific preferences to obtain a domain-specific preference representation includes the following steps: A1. Based on the probabilistic matrix factorization model, the user's historical interaction data is pre-trained to obtain the user embedding learned from the historical interaction data; A2. Extract features from user comment data to obtain user embeddings learned from the comment data; A3. The user embeddings learned from historical interaction data and the user embeddings learned from comment data are concatenated; A4. Input the concatenated user embedding vector into a feature encoder implemented by a three-layer multilayer perceptron to obtain the user's domain-specific preference representation; The parameters of the feature encoder are domain-specific, and the user item interaction data includes the user's historical interaction data and comment data.

[0075] The Probabilistic Matrix Factorization (PMF) model in step A1 is a model that places traditional matrix factorization techniques within a probabilistic framework. It describes the uncertainty in the user-item interaction matrix by introducing probability distributions, thus providing a more robust data foundation and more flexible scalability for recommendation systems. User embedding refers to the process and result of mapping a user (usually represented by an ID) to a low-dimensional, dense real-valued vector. This vector aims to numerically encode and represent the user's potential interests, preferences, and behavioral patterns. The concatenated user embedding vector in step A4 refers to the result of merging two or more user embedding vectors from different data channels or different feature perspectives into a single vector that is more comprehensive and richer in information through a concatenation operation.

[0076] The core purpose of this step is to fuse heterogeneous information to build a more complete user profile. The concatenated user embedding vector in step A4 is obtained through step A3. The feature encoder implemented by the three-layer multilayer perceptron is a neural network module consisting of three fully connected layers stacked sequentially. Its function is to receive the concatenated user embedding vector as input, and through a series of nonlinear transformations, refine, compress, and map it into the domain-specific preference representation required for the final task. Steps A1 to A4 detail the specific implementation of obtaining domain-specific preference representations in step S3. Steps A1 and A2 respectively obtain corresponding behavioral and attitudinal signals from the user's implicit and explicit feedback, serving as user embeddings learned from historical interaction data and comment data, providing effective input features for the subsequent feature encoder. Vector concatenation in step A3 achieves early information fusion, preserving all information from both sources. The feature encoder, implemented using a three-layer multilayer perceptron, performs refined feature extraction on the concatenated vectors. By introducing the parameter domain-specificity feature, independent MLP parameters are used for each domain, essentially equipping each domain with a dedicated "translator." This translator learns how to map general behavioral-textual features to the domain-specific context and semantic space.

[0077] The above scheme extracts high-quality, highly discriminative domain-specific preference representations from user behavior and attitude data through serial feature fusion and domain-specific nonlinear transformation. This not only ensures the accuracy of recommendations within a specific domain, but more importantly, it provides clear and pure intervention variables for subsequent causal bias removal (backdoor adjustment), which is the cornerstone of the success of the entire cross-domain recommendation model.

[0078] In one embodiment, the above process is represented by a function. Specifically, it means: Probabilistic Matrix Factorization (PMF) is used as the backbone model to pre-train user embeddings learned from historical interaction data. Feature extraction is performed on user comment data to obtain user embeddings learned from the comment data. After concatenation, the embeddings are input into the encoder to obtain domain-specific preference representations.

[0079] ; in, Representation of domain-specific preferences, It is an encoder implemented using a three-layer MLP. Representation domain medium encoder The parameters, This represents the vector concatenation operation. and This represents user embeddings learned from comment data and historical interaction data. Indicates the embedding size.

[0080] like Figure 4 As shown, preferably, after obtaining the domain-specific preference representation, the following steps are also included: B1. Based on the acquisition methods of user embeddings learned from historical interaction data and user embeddings learned from comment data, the corresponding item embeddings learned from historical interaction data and item embeddings learned from comment data are obtained; B2. The item embeddings learned from historical interaction data and the item embeddings learned from comment data are concatenated; B3. Input the concatenated item embedding vector into the item encoder to obtain the item feature representation; B4. Input the project feature representation into the domain encoder to obtain the specific domain attribute representation; Among them, the parameters of the domain encoder are domain-specific.

[0081] The item feature representation in step B3 refers to the process and result of mapping an item (item, such as a commodity, movie, or news) to a low-dimensional, dense real-valued vector. This vector aims to encode and represent the core attributes, content, and features of the item in numerical form. The domain-specific attribute representation is a low-dimensional, dense real-valued vector, learned through a neural network, designed to quantitatively and vectorically encode the essential features and context of a specific domain (source or target domain). Steps B1 to B4 are the specific implementation details after obtaining the domain-specific preference representation. The method of obtaining the item feature representation is as follows: Steps B1 to B3 are symmetrical to steps A1 to A3. That is, the item embeddings learned from historical interaction data and the item embeddings learned from comment data are obtained through the pre-training of the probabilistic matrix factorization model. These are then concatenated to obtain the concatenated item embedding vector, which is input into the item encoder to obtain the item feature representation. Then, step B4 inputs the item feature representation into the domain encoder, forcing the model to separate "the contextual features presented by the item in this specific domain" from the item data to obtain the domain-specific attribute representation.

[0082] The above scheme, through dual-source project information fusion and two-level coding, obtains a general representation of the project's essence and a specific domain environment representation, respectively. This not only achieves a comprehensive characterization of the project itself, but more importantly, it explicitly and vectorically separates the inherent attributes of the project from its domain context, providing an indispensable structural foundation for the entire model to achieve accurate cross-domain generalization and bias removal.

[0083] In one embodiment, the above process is used and Specifically, it means: Indicates having parameters The project encoder. Similar to steps A1 to A3, the domain can be obtained from comment data and historical interaction data. Project characteristics ; It is a domain encoder with the following parameters: This represents feature learning of domain attributes. Since domain attributes are reflected through items, item feature embedding is used. To compute domain features ; like Figure 5 As shown, preferably, extracting the user's domain-invariant preferences to obtain the user's domain-invariant preference representation includes the following steps: C1. Encoder based on shared parameters extracts first-domain invariant representation; C2. Set bias vectors to align domain-invariant preferences across multiple domains; C3. After concatenating the first domain-invariant representation with the bias vector, the second domain-invariant representation is obtained through a fully connected layer, which serves as the domain-invariant preference representation.

[0084] The first domain-invariant representation in step C1 is an intermediate, preliminarily refined user vector during the generation of the final domain-invariant preference representation. It is the feature vector output by the encoder with shared parameters after the initial encoding of the fused user data (interactions + comments). The bias vector in step C2 is a learnable parameter vector associated with a domain. It is designed to explicitly capture and compensate for inherent biases between different domains, thereby helping the model to better align and purify domain-invariant preference representations from multiple domains; The second domain-invariant representation in step C3 is the output of the last step in generating the final domain-invariant preference representation. It is the feature vector of the final result obtained by fusing the first domain-invariant representation with the bias vector and then transforming it through a fully connected layer; that is, the domain-invariant preference representation. Steps C1 to C3 are the specific implementation details of extracting domain-invariant preferences and obtaining the domain-invariant preference representation in step S3. Step C1 uses an encoder with parameters shared across all domains to process the user embedding composed of interaction and comment data. Since user data from all domains is transformed using the same set of parameters, this encoder is forced to ignore noise and specificity that cause inter-domain differences, and can only learn user feature patterns common to all domains. The resulting first domain-invariant representation already contains a strong cross-domain consistency signal. Step C2 then... Set a learnable, independent bias vector This bias vector is specifically designed to capture the inherent bias of the domain relative to the global average level. Its purpose is to explicitly isolate domain-specific information and assist the shared encoder in extracting more pure cross-domain consistent user representations. Especially when the correlation between multiple domains is weak, this mechanism can effectively improve the alignment quality of domain-invariant preferences. The technical principle of setting the bias vector is as follows: due to the inherent differences in the distribution of observation data in different domains (such as the different overall behavioral baselines of user groups on different platforms), the first domain-invariant representation extracted by the shared encoder may retain domain-specific baseline noise. The introduced domain-specific bias vector aims to explicitly capture and compensate for this inter-domain baseline difference, so that the corrected representation can more purely reflect the cross-domain consistent user interest components. In particular, in scenarios where multiple domains are weakly correlated, this mechanism can effectively isolate domain-specific information and improve the robustness of domain-invariant preference learning. In step C3, the first domain-invariant representation is concatenated with the bias vector of the corresponding domain and fused through a fully connected layer to output the final second domain-invariant representation.

[0085] The above solution has the following technical effects: Dual guarantee mechanism: This process uses two methods, "shared parameters" (hard constraints) and "bias alignment" (soft compensation), to work together at different levels to learn the domain invariance, forming a dual guarantee to ensure the high purity of the final representation; Balancing Model Capacity and Constraints: If only the shared encoder from step C1 is used, the model may lose its expressive power due to overly strong constraints. Introducing a domain-specific bias vector in step C2 adds a low-cost, controllable flexibility to the model while maintaining the core feature extraction, allowing it to accommodate the inherent properties of the domain, thus achieving a better balance between "invariance" and "expressive power." Laying the foundation for the entire architecture: The high-quality domain-invariant preference representation produced by this process is the core carrier for the entire method to achieve cross-domain generalization.

[0086] In one embodiment, the above process is represented by a function. Specifically, it means: Design an encoder Parameters shared by domain Capture the first field invariant representation, design As a bias vector, it is used to align different domain-invariant preferences across multiple domains. This bias vector explicitly isolates domain-specific information to learn a general representation, which is particularly effective when multiple domains are weakly correlated. A fully connected layer is then applied after concatenating the first domain-invariant representation with the bias vector. To obtain ; ; in, For users In the domain The domain-invariant preference representation, It is a fully connected layer. This is a vector concatenation operation. For encoders with shared parameters, For user embeddings learned from historical interaction data, User embeddings learned from comment data For the model parameters of the shared encoder, With domain The relevant bias vector.

[0087] Preferably, based on the domain-invariant preference representation and domain-specific preference representation after intervention, user recommendation prediction for items is performed in the target domain, specifically as follows: The domain-invariant preference representation, domain-specific preference representation, item feature representation, and domain-specific attribute representation in the target domain are fused and input into the prediction function to calculate the user's recommendation prediction score for the item. The prediction function is trained by minimizing the total loss, which includes at least a main loss for recommendation prediction to measure prediction accuracy and a backdoor adjustment loss for causal intervention on domain-invariant preferences.

[0088] The aforementioned prediction function is the final decision-making component of the recommender system. It is a learnable mathematical model whose function is to integrate all user representations, item representations, and contextual information to calculate the probability score of a user interacting with an item (such as clicking, purchasing, or giving a high rating). The total loss is a composite objective function that combines multiple loss functions with different purposes and constraints through weighted summation to guide the entire model training process. The main loss for recommendation prediction is the most core and fundamental component of the model's total loss. It directly measures the difference between the model's prediction of user-item interaction behavior and the actual situation, and its primary goal is to ensure the accuracy of the recommendation results themselves. The backdoor adjustment loss is a loss function designed based on causal inference theory. It does not directly measure the correctness of the prediction, but rather forces the model to learn a pure user preference representation that has removed the domain attribute confusion effect by comparing the difference between the prediction distribution after backdoor adjustment intervention and the original, biased prediction distribution.

[0089] The above steps are the specific implementation details of step S5. The fusion strategy of "integrating the domain-invariant preference representation, domain-specific preference representation, item feature representation, and domain-specific attribute representation in the target domain after intervention" ensures that the recommendation decision considers all key factors, forming a comprehensive and balanced decision framework. Domain-invariant preference representation after intervention: provides users' stable and unbiased essential interests across domains, which is the core guarantee of generalization ability; Domain-specific preference representation: captures users' unique behaviors and preferences in the target domain, ensuring the accuracy and personalization of recommendations; Project feature representation: It encodes the inherent and relatively unchanging essential attributes of a project, and is the objective basis for matching user interests; Domain-specific attribute representation: provides the environmental context of the current domain, helping the model understand the rules and atmosphere of the current domain; By integrating information from four dimensions—the user's true nature after bias removal, local user behavior, the project's own attributes, and the current domain environment—the recommendation results are comprehensive and balanced. The prediction function is trained by minimizing the total loss, which includes at least a main loss for recommendation prediction to measure accuracy and a backdoor adjustment loss for causal intervention on domain-invariant preferences. This is achieved by designing a composite loss function that simultaneously optimizes multiple mutually constraining objectives. The main loss for recommendation prediction ensures the accuracy of the recommendations. It directly forces the model's predicted output to match real user-item interaction records (such as clicks and ratings), specifically: given real user-item interaction labels... (Typically 0 or 1, indicating no interaction or interaction) and the score predicted by the model. (via the Sigmoid function) Calculate users For the project The predicted score is calculated using the following formula: ; in, Let u be the predicted interaction probability with item i. The sigmoid function maps the output to the interval [0,1]. For learnable weight vectors, (for bias terms) Recommendation optimization is performed using binary cross-entropy loss, with the following formula: ; in, To recommend predicting the main loss, For training batch size, For training batches, For user-project pairs, For real interactive tags, This represents the predicted interaction probability of the model.

[0090] The backdoor-adjusted loss is used to ensure the purity and generalization of the domain-invariant preference representation. This loss function compares two probability distributions: one is the backdoor-adjusted, debiased prediction distribution, and the other is the original, biased prediction distribution. By minimizing the cross-entropy between them, the model is forced to: "regardless of domain attributes..." How it changes, based on domain-invariant preferences "The predictions should remain stable and consistent"; this is equivalent to imposing a regularization constraint on the model, guiding the encoder to produce pure, domain-invariant preference representations that are unaffected by domain attribute confusion. It is the direct driving force for the model to successfully generalize in the target domain.

[0091] Preferably, the formula for the backdoor adjustment loss is as follows: ; in, Adjusting losses for backdoor purposes Let cross-entropy be the loss function. For the set of all source domains, For sets All domain attributes in the representation The summation operation of the values, To represent, given, domain-invariant preference representations, domain-specific preference representations, item feature representations, and domain attribute representations as Under the given conditions, the predicted probability of user-item interaction occurring. Domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant. To correct the bias in the predicted probability distribution after intervention. This represents the original predicted probability without intervention.

[0092] The proposed scheme achieves both accurate and robust recommendation predictions in the target domain by fusing causally modified debiased representations with rich contextual representations and training them within a multi-objective optimization framework guided by a composite loss function. It successfully combines the generalization ability of causal inference with the fitting ability of deep learning models.

[0093] Preferably, the total loss also includes: domain classification loss; Domain classification loss includes: Specific classification loss is used to force a domain-specific preference representation to be classified into its corresponding domain; Invariant classification loss, combined with a gradient reversal layer, is used to prevent the domain-invariant preference representation after intervention from being classified into its corresponding domain. Cross-domain invariant loss is used to maximize the similarity of domain-invariant preference representations after intervention between different domains; Intra-domain loss, combined with the mutual information upper bound algorithm, is used to ensure the independence between domain-specific preference representations and domain-invariant preference representations after intervention.

[0094] The above steps are other constraints designed into the total loss function. Specifically, to ensure that domain-specific preferences capture the unique characteristics of their domain, a specific classification loss is designed, with the following formula: ; in, For specific category loss, Let cross-entropy be the loss function. For domain classifiers, For users In the domain Domain-specific preferences in the representation, Representation of domain attributes; To ensure that domain-invariant preferences are not affected by domain attributes, a gradient inversion layer (GRL) is introduced as an adversarial mechanism to prevent the classifier from classifying the domain-invariant preference representation to its corresponding domain. An invariant classification loss is designed, with the following formula: ; in, For invariant classification loss, For users after intervention In the domain Domain-invariant preference representation in [the text]; Domain classification loss ; To achieve cross-domain alignment domain-invariant preferences and maximize their mutual similarity, a cross-domain invariant loss was designed. Preferably, the formula for the cross-domain invariant loss is as follows: ; in, For cross-domain invariant loss, Represents cosine similarity. and It is the user in the domain and Domain-invariant preference representation after intervention.

[0095] Furthermore, a Contrastive Log-ratio Upper Bound (CLUB) algorithm is introduced to design an intra-domain loss to ensure the independence of domain-specific and domain-invariant preferences. The formula is as follows: ; in, For losses within the domain, To compare the upper bound algorithm of logarithms.

[0096] The formula for total loss is: ; in , 、 、 and It is a hyperparameter that balances different parts of the overall loss function.

[0097] Total loss Synergistic effects can be achieved through multi-objective optimization, as follows: : Eliminate the confusion caused by domain attribute biases on domain invariant preferences by adjusting backdoors; : Ensure the independence between domain-invariant domains and domain-specific preferences; Strengthen the consistency of domain-invariant preferences across different domains; Further separation of domain-invariant and domain-specific information is achieved through adversarial mechanisms; These losses collectively form a structured regularization framework that forces the encoder to learn a clean, transferable, domain-invariant preference representation.

[0098] A multi-source cross-domain recommendation system based on causal intervention includes: The causal graph construction module is used to build causal graphs of user preferences. Causal graphs are used to represent the causal relationships between domain attributes, user preferences, and user item interactions in multiple source and target domains. The preference identification module is used to identify user domain-invariant and domain-specific preferences in multiple source and target domains based on causal graphs. The feature extraction module is used to extract domain-invariant preferences and domain-specific preferences from multiple encoders to obtain the user's domain-invariant preference representation and domain-specific preference representation. The backdoor intervention module is used to eliminate the confusion bias of domain attributes on domain-invariant preference representations by backdooring the domain-specific preference representations based on causal graphs. The recommendation prediction module is used to predict user recommendations for items in the target domain based on the domain-invariant preference representation and the domain-specific preference representation after intervention.

[0099] This invention also discloses a multi-source cross-domain recommendation system based on causal intervention. The system aims to achieve multi-source cross-domain recommendation in a modular manner. A causal graph construction module constructs a causal graph of user preferences; a preference identification module identifies the user's domain-invariant and domain-specific preferences in multiple source and target domains; a feature extraction module extracts domain-invariant and domain-specific preferences from multiple encoders to obtain the user's domain-invariant and domain-specific preference representations; a backdoor intervention module intervenes in the domain-invariant preference representation through backdoor adjustment to eliminate domain attribute bias; and a recommendation prediction module predicts the user's item recommendations in the target domain.

[0100] To further verify the technical effects of the present invention, an experimental verification was designed, and the process is as follows: Amazon's public datasets were used. For cross-domain recommendation research, data from five product categories were utilized: Video Games (VG), Toys and Games (TG), Instant Video (IV), Shoes (SH), and Electronics (EL). When focusing on cross-domain recommendations within a single source domain, data from the target domain was split into training, validation, and testing sets in an 8:1:1 ratio.

[0101] Baselines and Metrics. Baselines are divided into Single Domain Recommendation Models (SDR), including DeepFM and DIN, and CDR models, including EMCDR, PTUPCDR, ACDR, PREREC, and OmniMatch. To evaluate the recommendation performance of CIDM against these baselines, Recall@10 and NDCG@10 are used as evaluation metrics.

[0102] Table 1 Overall performance evaluation results of all models

[0103] Table 2. Assessment Results of the Impact of Different Loss Items

[0104] 1. Performance Analysis: After setting the number of domains used by most cross-domain recommendation models, the model performance on both domains was evaluated. Table 1 shows that CIDM performs best in most scenarios, validating the effectiveness of the proposed decoupling and bias removal strategies. Notably, the performance of the cross-domain recommendation model is significantly better than that of the single-domain recommendation model, indicating the importance of cross-domain information. Furthermore, compared with other cross-domain recommendation models, the cross-domain recommendation models decoupled from user preferences (i.e., PREREC and OmniMatch) show superior performance, demonstrating the effectiveness of decoupling in learning adaptive cross-domain preferences.

[0105] 2. Multi-Source Domain Analysis: The performance of the model was further investigated by varying the number of domains from 2 to 5. With the increase in the number of domains, traditional methods (such as PREREC and OmniMatch) experienced a significant performance decline because they failed to effectively isolate the confounding effects of multi-source domain attributes on domain-invariant preferences. CIDM, however, systematically eliminates multi-source domain attribute bias through a backdoor adjustment and multi-loss collaborative mechanism. Therefore, it maintains a performance improvement trend even in scenarios with 5 domains, demonstrating its unique advantages in complex multi-source recommendation scenarios. Consequently, it outperforms bias-reducing models such as PREREC and OmniMatch in multi-source cross-domain recommendation.

[0106] 3. Ablation Study: An ablation study was conducted using the same settings as in Table 2 to evaluate the impact of different loss terms, and the results are shown in Table 2. The results show that the complete model exhibits optimal performance across different numbers of domains, indicating that the designed losses are crucial for improving model performance. Furthermore, it was observed that when the number of domains is less than 5, eliminating the preference decoupling loss has a greater impact on performance than ignoring the backdoor adjustment loss. However, as the number of domains increases to 5, omitting the backdoor adjustment loss leads to a more significant performance degradation compared to other losses. This suggests that when the number of domains is less than 5, cross-domain interference remains relatively limited, and the preference decoupling loss can effectively distinguish between domain-specific and domain-invariant preferences. When faced with more interference, preference decoupling plays a crucial role, thus more effectively decoupling user preferences in multi-source domain cross-domain recommendation scenarios.

[0107] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the protection scope of this application.

[0108] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, they perform the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0109] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0110] If a flowchart is used in this application, it is used to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.

[0111] The foregoing has provided a detailed description of a multi-source cross-domain recommendation method and system based on causal intervention provided in this application. The above description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A multi-source cross-domain recommendation method based on causal intervention, characterized in that, Includes the following steps: Construct a causal graph of user preferences, which is used to represent the causal relationships between domain attributes, user preferences, and user item interactions in multiple source and target domains; Based on the causal graph, identify the user's domain-invariant preferences and domain-specific preferences in the multiple source and target domains; The domain-invariant preferences and domain-specific preferences of the user are extracted from multiple encoders to obtain the user's domain-invariant preference representation and domain-specific preference representation; Based on the causal graph, by backdooring the domain-specific preference representation, the confusion bias of the domain attributes on the domain-invariant preference representation is eliminated; Based on the domain-invariant preference representation after intervention and the domain-specific preference representation, user recommendation prediction for items is performed in the target domain; The backdoor adjustment is achieved through the following formula: ; in, This is an intervention that forcibly sets a user's domain-specific preferences to a specific value. In order to be in A random variable indicating whether interaction occurs between users and items within the domain. To represent the user's domain-specific preferences, For the user's domain-invariant preference representation, To represent the characteristics of the project, For domain attribute representation, This is a summation operation for all the values ​​represented by the domain attributes. Domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant; Extracting a user's domain-specific preferences to obtain a domain-specific preference representation includes the following steps: The user's historical interaction data is pre-trained based on the probabilistic matrix factorization model to obtain the user embedding learned from the historical interaction. Feature extraction is performed on user comment data to obtain user embeddings learned from the comments; The user embeddings learned from historical interactions and the user embeddings learned from comment data are concatenated; The concatenated user embedding vector is input into a feature encoder implemented by a three-layer multilayer perceptron to obtain the user's domain-specific preference representation; The parameters of the feature encoder are domain-specific, and the user item interaction data includes the user's historical interaction data and comment data. After obtaining the domain-specific preference representation, the following steps are also included: Based on the methods of obtaining the user embeddings learned from historical interactions and the user embeddings learned from comments, the item embeddings learned from historical interactions and the item embeddings learned from comment data are obtained accordingly. The item embeddings learned from historical interactions and the item embeddings learned from comment data are concatenated; The concatenated item embedding vector is input into the item encoder to obtain the item feature representation; The project feature representation is input into the domain encoder to obtain a specific domain attribute representation; The parameters of the domain encoder are domain-specific. Extracting the user's domain-invariant preferences to obtain the user's domain-invariant preference representation includes the following steps: The encoder based on shared parameters extracts the first-domain invariant representation; Set a bias vector to align domain-invariant preferences across multiple domains; After concatenating the first domain-invariant representation with the bias vector, a second domain-invariant representation is obtained through a fully connected layer, which serves as the domain-invariant preference representation. The process of predicting user recommendations for items in the target domain based on the domain-invariant preference representation after the intervention and the domain-specific preference representation specifically involves: The domain-invariant preference representation, domain-specific preference representation, item feature representation, and specific domain attribute representation in the target domain are fused and input into the prediction function to calculate the user's recommendation prediction score for the item. The prediction function is trained by minimizing the total loss, which includes at least a main loss for recommendation prediction used to measure prediction accuracy and a backdoor adjustment loss used to causally intervene in domain-invariant preferences. The formula for the backdoor adjustment loss is as follows: ; in, Adjusting losses for backdoor purposes Let cross-entropy be the loss function. For the set of all source domains, For sets All domain attributes in the representation The summation operation of the values, To represent, given, domain-invariant preference representations, domain-specific preference representations, item feature representations, and domain attribute representations as Under the given conditions, the predicted probability of user-item interaction occurring. Domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant. To correct the bias in the predicted probability distribution after intervention. This represents the original predicted probability without intervention.

2. The multi-source cross-domain recommendation method based on causal intervention as described in claim 1, characterized in that, The total loss also includes: domain classification loss; The domain classification loss includes: A specific classification loss is used to force the domain-specific preference representation to be classified into its corresponding domain; An invariant classification loss, combined with a gradient reversal layer, is used to prevent the domain-invariant preference representation after the intervention from being classified into its corresponding domain. Cross-domain invariant loss is used to maximize the similarity of the domain-invariant preference representations after the intervention between different domains; Intra-domain loss, combined with the mutual information upper bound algorithm, is used to ensure the independence between the domain-specific preference representation and the domain-invariant preference representation after intervention.

3. The multi-source cross-domain recommendation method based on causal intervention as described in claim 2, characterized in that, The formula for the cross-domain invariant loss is as follows: ; in, Represents cosine similarity. and It is the user in the domain and Domain-invariant preference representation after intervention.

4. A multi-source cross-domain recommendation system based on causal intervention, characterized in that, include: The causal graph construction module is used to construct a causal graph of user preferences, which is used to represent the causal relationships between domain attributes, user preferences, and user item interactions in multiple source and target domains. The preference identification module is used to identify, based on the causal graph, the user's domain-invariant preferences and domain-specific preferences in the multiple source and target domains; The feature extraction module is used to extract the domain-invariant preferences and the domain-specific preferences from multiple encoders respectively, so as to obtain the user's domain-invariant preference representation and domain-specific preference representation; The backdoor intervention module is used to eliminate the confusion bias of the domain attributes on the domain-invariant preference representation by backdoor adjustment of the domain-specific preference representation based on the causal graph; The recommendation prediction module is used to predict user recommendations for items in the target domain based on the domain-invariant preference representation after intervention and the domain-specific preference representation. The backdoor adjustment is achieved through the following formula: ; in, This is an intervention that forcibly sets a user's domain-specific preferences to a specific value. In order to be in A random variable indicating whether interaction occurs between users and items within the domain. To represent the user's domain-specific preferences, For the user's domain-invariant preference representation, To represent the characteristics of the project, For domain attribute representation, This is a summation operation for all the values ​​represented by the domain attributes. Domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant; The step of extracting the user's domain-specific preferences to obtain a domain-specific preference representation includes the following steps: The user's historical interaction data is pre-trained based on the probabilistic matrix factorization model to obtain the user embedding learned from the historical interaction. Feature extraction is performed on user comment data to obtain user embeddings learned from the comments; The user embeddings learned from historical interactions and the user embeddings learned from comment data are concatenated; The concatenated user embedding vector is input into a feature encoder implemented by a three-layer multilayer perceptron to obtain the user's domain-specific preference representation; The parameters of the feature encoder are domain-specific, and the user item interaction data includes the user's historical interaction data and comment data. After obtaining the domain-specific preference representation, the following steps are also included: Based on the methods of obtaining the user embeddings learned from historical interactions and the user embeddings learned from comments, the item embeddings learned from historical interactions and the item embeddings learned from comment data are obtained accordingly. The item embeddings learned from historical interactions and the item embeddings learned from comment data are concatenated; The concatenated item embedding vector is input into the item encoder to obtain the item feature representation; The project feature representation is input into the domain encoder to obtain a specific domain attribute representation; The parameters of the domain encoder are domain-specific. The step of extracting the user's domain-invariant preferences to obtain the user's domain-invariant preference representation includes the following steps: The encoder based on shared parameters extracts the first-domain invariant representation; Set a bias vector to align domain-invariant preferences across multiple domains; After concatenating the first domain-invariant representation with the bias vector, a second domain-invariant representation is obtained through a fully connected layer, which serves as the domain-invariant preference representation. The process of predicting user recommendations for items in the target domain based on the domain-invariant preference representation after the intervention and the domain-specific preference representation specifically involves: The domain-invariant preference representation, domain-specific preference representation, item feature representation, and specific domain attribute representation in the target domain are fused and input into the prediction function to calculate the user's recommendation prediction score for the item. The prediction function is trained by minimizing the total loss, which includes at least a main loss for recommendation prediction used to measure prediction accuracy and a backdoor adjustment loss used to causally intervene in domain-invariant preferences. The formula for the backdoor adjustment loss is as follows: ; in, Adjusting losses for backdoor purposes Let cross-entropy be the loss function. For the set of all source domains, For sets All domain attributes in the representation The summation operation of the values, To represent, given, domain-invariant preference representations, domain-specific preference representations, item feature representations, and domain attribute representations as Under the given conditions, the predicted probability of user-item interaction occurring. Domain attributes The prior probability distribution is calculated through the fully connected layer or preset as a constant. To correct the bias in the predicted probability distribution after intervention. This represents the original predicted probability without intervention.