The invention requests to protect a defect severity prediction method based on multi-
modal comparative learning, which comprises the following steps of: firstly, performing
standardization processing on a defect report through Prompt and a guide large
language model, generating explainable defect level description, and then extracting semantic features by using a text
encoder of CLIP. Secondly, constructing a symbol-level
hypergraph structure corresponding to the
source code, and designing an improved
hypergraph neural network to capture an advanced structure dependency relationship in the
source code so as to obtain structural
modal features; then, source codes related to the defects are visualized into images, and visual
semantic information of the source codes is extracted through a CLIP visual
encoder; and finally, fusing the structure representation of the code with the visual features, carrying out comparative learning alignment with text
modal features, modeling multi-modal association through a shared
semantic space, and realizing accurate prediction of the
severity level of the defect report. According to the method, the intelligence level and accuracy of defect severity prediction are remarkably improved.