The invention relates to a
graph model fine tuning method based on graph prompt learning, and aims to solve the problem that a
graph model pre-training task is inconsistent with a downstream task target and improve the performance of tasks such as node classification and
graph classification. The method comprises the following steps of: firstly, sampling graph data by restarting random walk, and learning a pre-training model through graph-level contrast to fully mine graph representation capability; secondly, aiming at a downstream node classification task, extracting a two-hop neighborhood construction induction graph for each target node, and selecting the most representative dominating node based on the minimum
dominating set; further, in order to enhance hierarchy and discrimination of the graph structure, a corresponding sub-graph-level node is introduced for each dominating node, a global graph-level node is added, and a unified prompt graph is constructed by connecting the dominating nodes with the corresponding sub-graph-level nodes and connecting all the sub-graph-level nodes to the graph-level nodes. And then, in a representation generation stage, fusing information of different granularities through a multi-level
graph embedding aggregation strategy, and weighting to obtain final graph-level embedding representation. And finally, performing similarity calculation on the graph representation and a predefined class prototype, and selecting a class with the highest similarity as a target node prediction result, thereby converting a node classification task into a
graph classification task. According to the method, the performance is excellent when upstream and downstream task targets are unified, the pre-training
encoder is frozen during fine adjustment, and only relevant parameters of the prompt weight are updated, so that the model performance, the adaptability and the practical value are remarkably improved.