The invention discloses a hierarchical contrast anti-fact learning method and
system for a visual question and answer model. The method comprises the steps of obtaining original image data and
question text data, constructing multi-
modal joint
tensor data, calculating probability distribution based on a projection matrix, screening samples and dynamically adjusting weights. Constructing a multi-
modal graph structure, performing
modal alignment based on the feature enhancement matrix, and executing
dynamic feature fusion; establishing a multi-level probability
knowledge structure, generating an anti-fact sample, and executing knowledge fusion operation; constructing a multi-level
distance measurement system, executing adaptive weight optimization, and performing
spectral clustering optimization and boundary adjustment; and constructing a multi-dimensional evaluation
index system, executing stability analysis and dynamic performance tracking, and obtaining final performance evaluation index data. According to the method, the performance of the visual question and answer model is improved through a hierarchical comparison anti-fact learning framework, and optimization of feature representation, dynamic adjustment of a
knowledge structure and accurate evaluation of the model performance are realized.