A hyperspectral image field generalization method based on a causal flow model
By employing an introspective causal prototype learning and purification mechanism in the causal flow model, the domain offset problem of hyperspectral image classification models during cross-domain deployment is solved, achieving pure restoration and characterization purification of causal factors, thereby improving the model's generalization performance and robustness.
Patent Information
- Application Number
- CN202511491291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-18
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-10-18
AI Technical Summary
Existing hyperspectral image classification models suffer significant performance degradation when deployed across domains due to domain bias. Existing data augmentation and knowledge anchoring methods fail to effectively decouple causal and non-causal representations, thus failing to improve the model's domain generalization ability.
By adopting a causal flow model, an unbiased causal prototype independent of data instances is constructed through introspective causal prototype learning, causal flow matching learning, and inference and purification processes. A parameterized conditional velocity field is learned, and the representation is purified through ordinary differential equations to achieve the mapping from the contaminated initial representation to the causal prototype.
It significantly improves the model's generalization ability and robustness in unknown domains, solves the anchor point confusion problem, achieves active stripping and precise purification of non-causal factors, and enhances the model's adaptability to changes in complex domains.
Smart Images

Figure CN120976589B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pattern recognition, and particularly relates to a hyperspectral image field generalization method based on a causal flow model. BACKGROUND
[0002] Hyperspectral image classification, as an application of deep learning and remote sensing technology, provides key technical support in precision agriculture, environmental monitoring and geophysical exploration. This technology analyzes the rich spatial and spectral information in the image to achieve intelligent identification of ground object categories. However, when a deep learning model trained in a single scene (source domain) is directly deployed to a new scene (target domain), its classification performance often decreases significantly.
[0003] The core of this problem is the domain shift phenomenon, that is, the differences in physical acquisition factors such as lighting conditions, atmospheric conditions and sensor characteristics cause the data distribution of the source domain and the target domain to be inconsistent, forming a "domain gap" and seriously weakening the cross-domain generalization ability of the model. From the perspective of causal inference, the root cause lies in the empirical risk minimization (empirical risk minimization) principle followed by traditional models. Hyperspectral image data is essentially a mixture of two types of potential factors: one is the invariant causal factor that defines the ground object category and remains stable across domains (such as the inherent spectral absorption characteristics of materials); the other is the non-causal factor that changes with the observation condition (such as sensor noise and lighting artifacts). The empirical risk minimization principle cannot distinguish between these two factors, leading the model to learn the false statistical correlation between the non-causal factor and the class label in the source domain, resulting in a "shortcut learning" phenomenon. When the model is deployed to a new domain where the distribution of the non-causal factor has changed, the "shortcut" fails, and the performance drops sharply.
[0004] To address this challenge, existing domain generalization research mainly follows two paradigms, but both have limitations: Data augmentation paradigm: This method simulates domain changes by applying perturbations such as brightness and noise, intending to force the model to learn invariance. However, the effectiveness of this method is limited by the completeness of the preset transformation, which cannot exhaust the complex and diverse domain differences in the real world, and there is a risk of incomplete intervention. More seriously, the unknown structure perturbation in the data space may inadvertently destroy or distort the core causal information that defines the category, causing causal factor erosion. Knowledge anchoring paradigm: This method attempts to define a stable causal prototype for each category as an anchor to guide model learning. However, it faces the dilemma of obtaining a pure anchor. If external knowledge (such as text embedding) is used, it will introduce a modal gap and semantic bias, making it difficult to apply to fine-grained spectral classification tasks. If experience anchors are aggregated from training data themselves (such as calculating the average representation within the class), the resulting anchors will inevitably be contaminated by the statistical bias of the source domain, leading to the anchor contamination problem, i.e. the purification target itself is a biased and contaminated suboptimal anchor.
[0005] In summary, neither the external simulation intervention of data augmentation nor the biased prior guidance of knowledge anchoring can effectively decouple causal representations and non-causal representations. Therefore, there is an urgent need for a method that can go beyond the dependence on incomplete priors or biased data, actively separate and restore pure causal factors from mixed observed data through an internal and structured purification mechanism, to fundamentally improve the domain generalization ability of hyperspectral image classification models. SUMMARY
[0006] To make up for the shortcomings of the prior art, the present application proposes a causal representation purification method and system for hyperspectral image domain generalization. The domain generalization problem is reconstructed as a solvable causal inverse problem, and through an internal and introspective purification mechanism, the pure and invariant causal factors are actively restored from the observed representations contaminated by non-causal factors, thereby fundamentally improving the generalization ability and robustness of the model in unknown domains.
[0007] To solve the above technical problems, the present application provides the following technical solutions: A hyperspectral image domain generalization method based on a causal flow model, comprising the following steps: Step A: Introspective Causal Prototype Learning (IPCL). This stage aims to construct an unbiased and pure causal prototype for each ground object class, independent of any data instance, as the target endpoint of the subsequent purification process.
[0008] Step B: Causal Flow Matching Learning. This stage learns a conditional velocity field parameterized by a neural network, which defines a deterministic mapping path from an arbitrary contaminated initial representation to its corresponding class causal prototype.
[0009] Step C: Inference and Purification. For test samples from unknown domains, their initial representations are used as initial conditions. By solving an ordinary differential equation defined by the learned velocity field, the representations are driven to evolve along the optimal purification trajectory to a pure state. Finally, the purified representations are used for classification.
[0010] Furthermore, step A specifically includes: Step A1: The goal is to train an invariant classifier whose parameters will be used for subsequent representation inversion. This stage transforms the invariance penalty term in the invariant risk minimization theory into a geometric constraint that is easy to optimize in practice. Specifically, invariant risk minimization provides a solid theoretical foundation for learning causal representations with out-of-distribution generalization ability; however, it relies on multiple accessible domains. In single-source domain generalization tasks, its original form is often difficult to directly optimize in practice. Therefore, starting from the objective function of invariant risk minimization, an invariant prototype classification loss that is efficient and feasible in practice is derived.
[0011] A feature extractor and a classifier are jointly optimized by minimizing an invariant prototype classification loss. The invariant prototype classification loss consists of a cross-entropy loss term and a prototype contrast loss term.
[0012] Invariant risk minimization aims to jointly optimize a classifier. and a feature extractor : ,in, It is the environment Risks on The penalty factor is the invariant penalty term. Defined as: The theoretical goal of this penalty term is to find a feature extractor. This makes a single classifier This representation applies to all training environments. Achieving optimal performance simultaneously.
[0013] When a single classifier When the solution is optimal in all environments, its decision boundary must be conditional on the distribution caused by environmental changes. The perturbation is insensitive. A fundamental and necessary condition for achieving this goal is that the conditional expectation of the class remains invariant across environments. Formally, a representation that satisfies the ideal condition of minimizing invariant risk is... Must meet: If the class center drifts with the environment, the optimal decision boundary will also change, which directly violates the goal of invariance risk minimization. Therefore, the invariance of class center assumption constitutes the geometric essence pursued by the invariance penalty term of invariance risk minimization.
[0014] It is not feasible to directly enforce the above-mentioned cross-environmental expectation equality in the optimization process, because it requires integration over unknown distributions. Proto-contrast learning provides a feasible and powerful proxy for this purpose. The objective function of proto-contrast learning imposes a more stringent geometric constraint than “class center invariance”: it not only requires class center invariance, but also requires all intra-class sample representations to converge to the unique, fixed prototype of the class , whose objective can be expressed as: By minimizing , the model is motivated to learn a that can actively map all intra-class samples (regardless of their source environment) to a compact region in the representation space, the center of which is the class prototype If all samples of a class are pulled towards the same point, their conditional expectations are naturally equal and constant. Therefore, minimizing is a sufficient condition for achieving the geometric constraint of invariance of class center. In this way, the abstract, gradient-based invariance penalty term in invariance risk minimization can be transformed into a specific regularization term aimed at shaping the geometry of the representation space.
[0015] Next, the first term in the invariance risk minimization objective, the average risk term , is handled. This term corresponds to the traditional empirical risk minimization principle, which aims to maximize the accuracy of predictions on the entire training set. In classification problems, the most natural instantiation of this risk term is the cross-entropy loss.
[0016] The feature extractor encodes the input into a feature vector, while the classifier adopts a nonlinear classification head built by multiple layers of perceptrons, which maps the representation vector to a class prediction. The cross-entropy loss calculated based on this class prediction directly instantiates the average risk term: By integrating the above two parts, the invariance proto-classification loss can be constructed from invariance risk minimization: where serves as a structured regularization term to build causal invariance at the representation layer; part serves as a supervisory signal to ensure the discriminative ability of the model at the output layer.
[0017] Step A2: After the training converges, the parameters of the fixed classifier are frozen. For each class, an optimal feature vector is solved in the feature space by a representation inversion. This process is independent of any training data, and its optimization goal is to maximize the confidence of the fixed classifier on this class while imposing a regularization constraint on the norm of this vector. The representation inversion aims to decode the causal prototype from the learned and fixed classifier. For each class , its causal prototype is defined as the solution of an optimization problem: This goal is a Bayesian maximum a posteriori estimation: solving the most probable feature vector given the class . It is equivalent to minimizing the negative log posterior probability . The negative log likelihood term represents the causal understanding of the model, while the regularization term corresponds to the negative log of a zero-mean Gaussian prior reflecting the prior understanding of the feature structure. is the optimal feature representation that satisfies both high likelihood and high prior probability.
[0018] This optimization is solved by gradient descent, and it converges to the pure causal prototype because the invariance risk minimization training imposes structural constraints on the Jacobian matrix of the classifier. Assume that the feature space can be orthogonally decomposed into the direct sum of a causal subspace and a pseudo-correlation subspace: The causal subspace is composed of causal features that truly determine the class . The non-causal subspace is composed of features that only have domain-specific pseudo-correlations with . The invariance risk minimization training forces the classifier to be insensitive to the variation of , i.e., for any where , satisfies . This means that the partial derivative of the output of with respect to should tend to zero. This directly affects the structure of the Jacobian matrix of the classifier . Specifically, the Jacobian matrix must be approximately orthogonal to the non-causal subspace . Therefore, the row space of the Jacobian matrix is approximately contained in the causal subspace .
[0019] The update rule of the gradient descent is . The core part of the gradient, i.e., the likelihood gradient, is: where . This gradient term is the transpose of the Jacobian matrix acting on the semantic error vector . Algebraically, the column space of the transpose of the Jacobian is identical to the row space of the original Jacobian.
[0020] Consider that the row space of the Jacobian is approximately contained in the causal subspace . Therefore, the column space of its transpose is also approximately contained in . This means that the likelihood gradient , as a linear combination of the column vectors of , is itself approximately located in the causal subspace . This indicates that the update driving force is structurally constrained within the causal subspace.
[0021] Consider the entire gradient . Starting from a random initial point , each step of gradient descent updates can be decomposed into two subspaces.
[0022] On , the update is determined by both the likelihood gradient and the regularization term, driving to move towards the direction of maximizing the class likelihood. On , the likelihood gradient component . Therefore, the update is mainly driven by the regularization term: . This is a pure decay term that constantly compresses the acausal component towards the origin. When the optimization converges to a fixed point , the gradient is zero: . This means: , the left side of the equation, is a vector located in the causal subspace . In order for the equation to hold, the right side of the equation must also be located in . Since , this directly requires that the final convergence point must itself be a vector that is almost entirely located in the causal subspace , with its projection onto the acausal subspace tending to zero.
[0023] Therefore, the gradient descent process that characterizes the inversion, constrained by the Jacobian matrix shaped by the invariance risk minimization training of its likelihood gradient within the causal subspace of the feature space, and with the regularization term actively decaying the acausal component, ultimately ensures that the convergence point is structurally pure, containing no acausal component.
[0024] Furthermore, step B specifically includes: the starting point of the causal flow in the causal flow model is an initial feature distribution generated by a feature extractor, carrying non-causal factors. The endpoint is the target distribution. It is configured as a mixed Dirac distribution composed of causal prototypes of various categories: ,in, Representative category The prior probability, It is the corresponding causal prototype, and It's the Dirac function. (For connection...) and This invention introduces a time-varying... Probability density of continuous evolution . arrive The evolution is described by the continuity equation: In this equation It is a time-varying velocity field, which is precisely defined in The direction and velocity of the probabilistic mass flow. Equivalently, eigenvectors can be tracked. The trajectory of its movement. Follows a velocity field The ordinary differential equation of control: , The solution to this ordinary differential equation Define a starting point To the finish line The mapping thus realizes the distribution arrive The transformation. Therefore, the core task of learning this mapping is to learn a parameterized neural network. To approximate the real velocity field .
[0025] An ideal optimization objective is to minimize the mean square error between the two along the entire trajectory, i.e., the marginal flow matching loss: However, this loss function is often difficult to optimize directly in practice: First, It is the initial distribution In an unknown velocity field The result of evolution under the influence of [the environment / mechanism]. Due to [the influence / mechanism]... It is something that needs to be learned. The lack of a closed-form solution makes it impossible to sample from it to compute the expectation. Secondly, the supervision objective in the loss function... It is unknown. Finally, expectations... Integration still needs to be performed on a high-dimensional representation space, which is computationally infeasible.
[0026] To overcome these obstacles, flow matching introduces a paradigm shift: from modeling intractable marginal flows to modeling artificially defined, tractable conditional flows. The specific steps to achieve this shift are as follows: first, define a joint distribution over a start-end pair . For any data sample , the pair of endpoints is deterministically defined as .
[0027] Next, construct a linear interpolation path between the pair of endpoints: This deterministic path represents a conditional probability flow that is a Dirac distribution at any time , concentrating all its mass at the interpolation point : Taking the direct time derivative of this path equation gives the conditional velocity field corresponding to the conditional path , a constant vector independent of time and location: At this point, a known, tractable conditional velocity field is obtained.
[0028] Minimizing the conditional flow matching loss with respect to is equivalent to minimizing the original, intractable marginal loss on the gradient: The resulting causal flow matching loss can be expressed as: Next, substitute the previously derived conditional flow and conditional velocity field. Since the inner expectation is taken with respect to a Dirac distribution , the expectation degenerates, such that the variable in the integrand is deterministically replaced by : The simplified loss function can be expressed as: .
[0029] This form is fully computable. In practice, integrals and expectations can be approximated using Monte Carlo methods. Specifically, sample a data sample from the data distribution to determine the pair of endpoints and , and sample a time from a uniform distribution. Then construct the interpolation point . Finally, obtain a causal flow loss that can be optimized end-to-end: The causal flow loss transforms the complex distribution matching problem into a standard supervised regression problem: train to predict the value of at the connection start and end points When the training converges and satisfies the Lipschitz continuity condition, the corresponding ODE has a unique solution. Starting from an arbitrary initial point along the learned vector field to whose trajectory end point will converge to the target causal prototype .
[0030] Further, the step C (inference and purification phase) specifically comprises: step C1: for a test sample from an unknown domain, first obtain its contaminated initial representation through a feature extractor.
[0031] Step C2: take the contaminated initial representation as the initial condition of an ordinary differential equation, and solve it using the velocity field network learned in step B.
[0032] Step C3: solve the integral of the above equation on the time interval [0, 1] by numerical integration method to obtain the final purified representation.
[0033] Step C4: input the obtained purified representation into the classifier to obtain the final class prediction result.
[0034] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The domain generalization is reshaped from the traditional statistical pattern matching problem to the signal source separation problem of recovering the invariant causal factor from the contaminated observation, providing a new framework for solving the generalization challenge.
[0035] 2. The anchor point mixing problem is solved. Through the representation inversion mechanism, the pure causal prototype is directly decoded from the trained invariant classifier parameters, and this process does not depend on any data instance, fundamentally avoiding the anchor point pollution problem caused by the statistical deviation of the training data, providing a stable and reliable target for the purification process.
[0036] 3. Accurate representation purification is achieved: by learning a deterministic flow from any contaminated point to its corresponding causal prototype, non-causal factors can be actively, continuously and accurately stripped, rather than relying on limited and pre-set data augmentation transformations, thereby more effectively dealing with complex unknown domain changes in the real world.
[0037] 4. Improve the generalization performance of the model: by actively purifying the representation before classification, it ensures that the classification decision is strictly based on the pure causal factor, significantly enhancing the adaptability and robustness of the model to unknown domain changes. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 This is a schematic diagram of the overall principle of the present invention. Detailed Implementation
[0039] The technical solutions in the embodiments of the present invention will be clearly and completely described below. 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0040] like Figure 1 As shown, a hyperspectral image domain generalization method based on a causal flow model is described in detail below. Figure 1 As shown, step 1 aims to train an invariant classifier whose parameters will be used for subsequent representation inversion. This stage transforms the invariance penalty term in the invariant risk minimization theory into a geometric constraint that is easily optimized in practice. Specifically, invariant risk minimization aims to jointly optimize a classifier. and a feature extractor : ,in, It is the environment Risks on The penalty factor is the invariant penalty term. Defined as: The theoretical goal of this penalty term is to find a feature extractor. This makes a single classifier This representation applies to all training environments. Achieving optimal performance simultaneously.
[0041] When a single classifier When the solution is optimal in all environments, its decision boundary must be conditional on the distribution caused by environmental changes. It is not sensitive to disturbances.
[0042] A fundamental and necessary condition for achieving this goal is that the conditional expectation of a category remains invariant across environments. Formally, this is represented by an ideal condition that satisfies the minimization of invariant risk. Must meet: Directly forcing the equality of expectations across environments during the optimization process is not feasible because it requires integrating over unknown distributions. Prototype contrastive learning provides a feasible and powerful surrogate for this. The objective function of prototype contrastive learning imposes a stricter geometric constraint than "class center invariance": it not only requires class centers to remain unchanged, but also requires that all sample representations within a class converge to a unique, fixed prototype for that class. Its objective can be expressed as: , by minimizing , the model is encouraged to learn a , which actively maps all intra-class samples (regardless of their origin) to a compact region in the representation space, with the center of the region being the class prototype . If all samples of a class are pulled towards the same point, their conditional expectation naturally equals and is constant. Therefore, minimizing is a sufficient condition for enforcing the geometric constraint of invariant class centers. In this way, the abstract, gradient-based invariance penalty term in invariance risk minimization is transformed into a concrete regularization term that aims to shape the geometry of the representation space.
[0043] Next, we address the first term in the invariance risk minimization objective, the average risk term . This term corresponds to the classical empirical risk minimization principle, which aims to maximize the prediction accuracy on the entire training set. In classification problems, the most natural instantiation of this risk term is the cross-entropy loss.
[0044] The feature extractor encodes the input into a feature vector, while the classifier is a nonlinear classification head built from multiple layers of perceptrons that maps the representation vector to a class prediction. The cross-entropy loss computed based on this class prediction directly instantiates the average risk term: By integrating the two parts, we construct the invariance prototype classification loss from invariance risk minimization: where serves as a structured regularization term that enforces causal invariance at the representation level; part serves as a supervisory signal that ensures the discriminative ability of the model at the output level.
[0045] Step 2: For each class, we solve an optimal feature vector in the feature space via representation inversion. This process does not rely on any training data, and its optimization objective is to maximize the confidence of the fixed classifier for the class while imposing a regularization constraint on the norm of the vector. Representation inversion aims to decode the causal prototype from the learned and fixed classifier. For each class , its causal prototype is defined as the solution to the optimization problem , which is a Bayesian maximum a posteriori estimation: solving the most probable feature vector given the class . This is equivalent to minimizing the negative log posterior . The negative log-likelihood term characterizes the causal understanding of the model, while the regularization term Corresponding to a zero-mean Gaussian prior The negative logarithm reflects prior knowledge of the feature structure. It is the optimal feature representation that simultaneously satisfies high likelihood and high prior probability.
[0046] The gradient descent process, characterized by inversion, is constrained by the Jacobian matrix shaped by invariant risk minimization training within the causal subspace of the feature space due to its likelihood gradient. Simultaneously, the regularization term actively decays non-causal components, ultimately ensuring the convergence point. It is structurally pure and does not contain non-causal factors.
[0047] Step 3: After obtaining the causal prototype, the causal flow in the causal flow model can be constructed. The starting point of the causal flow is an initial feature distribution generated by the feature extractor, carrying non-causal factors. The endpoint is the target distribution. It is configured as a mixed Dirac distribution composed of causal prototypes of various categories: ,in, Representative category The prior probability, It is the corresponding causal prototype, and It's the Dirac function. (For connection...) and This invention introduces a time-varying... Probability density of continuous evolution . arrive The evolution is described by the continuity equation: In this equation It is a time-varying velocity field, which is precisely defined in The direction and velocity of the probabilistic mass flow. Equivalently, eigenvectors can be tracked. The trajectory of its movement. Follows a velocity field The ordinary differential equation of control: , The solution to this ordinary differential equation Define a starting point To the finish line The mapping thus realizes the distribution arrive The transformation. Therefore, the core task of learning this mapping is to learn a parameterized neural network. To approximate the real velocity field .
[0048] An ideal optimization objective is to minimize the mean squared error of both over the entire trajectory, i.e., the marginal flow matching loss: .
[0049] However, this loss function is usually difficult to directly optimize in practice: first, is the initial distribution evolved under the unknown velocity field . Since itself is to be learned, there is no closed-form solution, making it infeasible to sample from to compute the expectation. Second, the supervised objective in the loss function is unknown. Finally, the expectation still needs to be integrated over the high-dimensional representation space, which is computationally infeasible.
[0050] To overcome these obstacles, a paradigm shift is introduced: from modeling the intractable marginal flow to modeling an artificially defined, tractable conditional flow. The specific steps to achieve this shift are as follows: first, define a joint distribution over a start-end pair . For any data sample , this pair of endpoints is deterministically defined as . Next, construct a linear interpolation path between this pair of endpoints: This deterministic path represents a conditional probability flow that is a Dirac distribution at any time , concentrating all its mass at the interpolation point : . Taking the derivative of this path equation directly with respect to time yields the conditional velocity field corresponding to this conditional path, a constant vector independent of time and location: .
[0051] At this point, a known, tractable conditional velocity field is obtained. Minimizing the conditional flow matching loss with as the objective is equivalent to minimizing the original, intractable marginal loss in the gradient.
[0052] The resulting causal flow matching loss can be expressed as: .
[0053] Next, the conditional flow and conditional velocity field derived earlier can be substituted in.
[0054] Since the inner expectation is with respect to a Dirac distribution The expectation is then degraded, so that the variable in the integrand is deterministically replaced by : .
[0055] The simplified loss function can be expressed as: which is already fully computable. In practice, the integrals and expectations can be approximated by Monte Carlo methods. Specifically, a sample is drawn from the data distribution and a time is sampled from a uniform distribution. .
[0056] An interpolation point is then constructed. Finally, an end-to-end optimizable causal flow loss is obtained: .
[0057] The causal flow loss turns the complex distribution matching problem into a standard supervised regression problem: train to accurately predict the constant displacement vector connecting the start and end points at any given interpolation point . When the training converges and satisfies the Lipschitz continuity condition, the corresponding ODE has a unique solution. Starting from any initial point , integrating along the learned vector field leads to , whose trajectory endpoint will converge to the target causal prototype .
[0058] Step 4: For a test sample from the unknown domain, first obtain its contaminated initial representation through the feature extractor. Then, use the contaminated initial representation as the initial condition of the ordinary differential equation and solve it using the velocity field network learned in Step B: solve the above equation by numerical integration method to obtain the final purified representation in the time interval [0, 1]. Finally, input the obtained purified representation into the classifier to obtain the final class prediction result.
[0059] It is apparent for a person skilled in the art that the present application is not limited to the details of the above exemplary embodiments, but can be implemented in other concrete forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all respects as illustrative and not restrictive, the scope of the present application being defined by the appended claims rather than the above description, and it is intended to embrace all changes and modifications that fall within the meaning and scope of equivalents of the claims.
[0060] Furthermore, it should be understood that although the description is made according to the embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity, and the person skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment have been properly combined to form other embodiments which are easily understood by the person skilled in the art.
Claims
1. A hyperspectral image domain generalization method based on a causal flow model, characterized in that, Includes the following steps: Step A, Causal Prototype Learning Phase: For each land cover category, learn and generate a pure causal prototype that is independent of the statistical bias of the training data. This prototype serves as the target for the subsequent purification process. Step A specifically includes: Step A1: Using the invariant risk minimization criterion, train a feature extractor and a classifier on the source domain data to learn an approximately invariant causal feature subspace; Step A2: Fix the parameters of the trained classifier. For each category, solve for an optimal vector in the feature space that maximizes the confidence of the classifier through representation inversion, and define the vector as the pure causal prototype of this category. Step B, Causal Flow Matching Learning Phase: Learn a velocity field parameterized by a neural network, which defines a deterministic mapping from any contaminated initial representation to its corresponding class causal prototype; Step C, Reasoning and Purification Stage: For test samples from unknown domains, their initial representations are used as initial conditions. By solving the ordinary differential equations defined by the velocity field, the purified representations are obtained and input into the classifier for classification.
2. The hyperspectral image domain generalization method based on a causal flow model according to claim 1, characterized in that, The representation inversion is an optimization process independent of any data instance, designed to decode the model’s abstract understanding of the nature of categories from the classifier’s parameters.
3. The hyperspectral image domain generalization method based on a causal flow model according to claim 2, characterized in that, Step B, based on the continuous-time flow matching theory, specifically includes: Step B1: For any sample in the training set, define the initial representation obtained by the feature extractor as the starting point of the flow path, and define the pure causal prototype of its corresponding category as the ending point of the flow path. Step B2: Construct a predefined, computable conditional path between the starting point and the ending point, and obtain the constant conditional velocity field corresponding to the path by taking the derivative; Step B3: Train a neural network to approximate the conditional velocity field. Its optimization objective is to minimize a supervised regression loss, i.e., causal flow loss, so that the network can accurately predict the displacement vector from the starting point to the ending point at any interpolation point on the path.
4. The hyperspectral image domain generalization method based on a causal flow model according to claim 3, characterized in that, The conditional path is a linear interpolated path connecting the starting point and the ending point.
5. The hyperspectral image domain generalization method based on a causal flow model according to claim 4, characterized in that, Step C is a dynamic adaptation process that requires no additional training, specifically including: Step C1: Use the initial representation of the test sample obtained by the feature extractor as the initial condition for the ordinary differential equation; Step C2: Solve the ordinary differential equation defined by the learned velocity field using numerical integration methods, integrating over a unit time interval to drive the initial representation to evolve along the optimal purification trajectory; Step C3: Use the vector obtained from the integration endpoint as the purified causal representation and input it into the trained classifier to obtain the final class prediction result.
6. A hyperspectral image neighborhood generalization system based on a causal flow model, used to implement the hyperspectral image neighborhood generalization method based on a causal flow model as described in any one of claims 1-5, characterized in that, include: The causal prototype learning module is used to generate pure causal prototypes for each category; The causal flow learning module is used to train a velocity field network; The characterization, purification, and classification module is used for online purification and classification of new samples.
Citation Information
Patent Citations
Hyperspectral image classification method based on causal cross-domain small sample learning
CN117132804A
Fine-grained classification method and system based on essential causal reasoning
CN117611883A