Search

CN-121998100-A - Large language model perception alignment method and device

CN121998100ACN 121998100 ACN121998100 ACN 121998100ACN-121998100-A

Abstract

The present disclosure relates to a large language model perception alignment method and apparatus. The method comprises the steps of obtaining an output text of a large language model aiming at a preset perception task, generating an explicit rule set of the large language model based on the output text, obtaining a human marked perception sample, carrying out semantic clustering and abstract summarization on the human marked perception sample to generate a human perception standard rule base, constructing a perception knowledge graph based on the explicit rule set and the human perception standard rule base, storing triples formed by an analysis main body, perception arguments and discrimination conclusions, searching human perception standard rules related to the input text aiming at the input text of the large language model, and injecting the human perception standard rules into an reasoning process of the large language model, and searching the triples related to the input text in the graph to serve as explicit node/edge evidence to guide the large language model to carry out graphical thinking chain reasoning. Therefore, stability, consistency and interpretability of the large language model in complex text perception and classification tasks are remarkably improved.

Inventors

  • LIU YUFAN
  • LI SHENGXI
  • JIANG LAI
  • CHEN JINGYU
  • HU WEIMING
  • LI BING
  • XU MAI

Assignees

  • 中国科学院自动化研究所

Dates

Publication Date
20260508
Application Date
20260407

Claims (10)

  1. 1. A large language model perceptual alignment method, the large language model perceptual alignment method comprising: acquiring an output text of a large language model aiming at a preset perception task, and generating an explicit rule set of the large language model through semantic vectorization, cluster analysis and rule inversion based on the output text; Obtaining a human-marked perception sample, and carrying out semantic clustering and abstract summarization on the human-marked perception sample to generate a human perception standard rule base; Constructing a perception knowledge graph based on the explicit rule set and the human perception standard rule base, wherein the perception knowledge graph stores triples consisting of an analysis subject, perception arguments and discrimination conclusions; And aiming at the input text of the large language model, retrieving human perception standard rules related to the input text in the human perception standard rule base and injecting the human perception standard rules into an reasoning process of the large language model, and retrieving triples related to the input text in the perception knowledge graph as explicit node/edge evidence to guide the large language model to conduct graphic thinking chain reasoning so as to align a perception discrimination result of the large language model with a preset human standard.
  2. 2. The large language model perceptual alignment method of claim 1, wherein the step of generating an explicit rule set of the large language model based on the output text by semantic vectorization, cluster analysis, and rule inversion comprises: Converting the output text into semantic vectors to form an initial vector set; Carrying out semantic enhancement on vectors in the initial vector set by using an auxiliary semantic model so as to obtain an enhanced feature vector set; Based on a multi-index joint decision strategy, determining the optimal cluster number of the enhanced feature vector set, and carrying out cluster division to obtain a plurality of cluster clusters; selecting a plurality of representative samples close to the center of each cluster in the plurality of clusters, and summarizing a large language model by utilizing rules to summarize the plurality of representative samples so as to generate explicit rules; And generating the explicit rule set based on a plurality of explicit rules corresponding to the plurality of clusters.
  3. 3. The large language model perceptual alignment method of claim 2, wherein the step of determining the optimal cluster number of the enhanced feature vector set based on a multi-index joint decision strategy comprises: And determining a plurality of candidate cluster numbers through multiple experiments, calculating the contour coefficient, the Davies-Bouldin index and the Calinski-Harabasz index of each candidate cluster number in the plurality of candidate cluster numbers, combining the tree structure change of hierarchical clustering and the performance of repeated experiments of cluster stability, and determining the optimal cluster number through a multi-index comprehensive score function.
  4. 4. The large language model perception alignment method of claim 1, wherein the step of retrieving and injecting human perception standard rules related to the input text in the human perception standard rule base into the inference process of the large language model for the input text of the large language model comprises: Vectorizing rules in the input text and the human perception standard rule base respectively through a multi-granularity embedding model to construct a rule vector index; Retrieving a plurality of human perception rules most relevant to the input text from the rule vector index based on vector similarity; and taking the retrieved multiple human perception rules as explicit prompts, and inputting the multiple human perception rules and the input text into the large language model together so as to drive the large language model to carry out reasoning and judgment.
  5. 5. The large language model perceptual alignment method of claim 1, wherein the step of constructing a perceptual knowledge graph based on the explicit rule set and the human perceptual standard rule base comprises: extracting triples comprising an analysis main body, perception arguments and discriminant conclusions from the explicit rule set, the human perception standard rule base and the thinking chain text of the large language model; Taking an analysis main body with occurrence frequency larger than a preset threshold value as a core node, aggregating perception arguments and discrimination conclusions related to the analysis main body to form triples, and clustering the formed triples according to the analysis main body to form a preliminary graph edge set; and converting the preliminary graph edge set into graph structure grammar and storing the graph structure grammar into a graph database to construct the perception knowledge graph.
  6. 6. The large language model perceptual alignment method of claim 1, wherein the step of retrieving relevant triples in the perceptual knowledge-graph as explicit node/edge evidence to guide the large language model to perform graphical mental chain reasoning comprises: converting the triples in the perception knowledge graph into natural language description text and vectorizing to construct a triplet vector index; And retrieving the triple text related to the current context from the triple vector index, and injecting the triple text into the reasoning process of the large language model as explicit node/side evidence to guide the large language model to generate a graphical thinking chain containing the explicit node/side evidence.
  7. 7. The large language model perception alignment method as claimed in claim 6, the large language model perception alignment method is characterized by further comprising the following steps: when a plurality of related triple texts are retrieved, the large language model reversely maps the plurality of related triple texts back to original picture elements, and logic complement and/or conflict detection is carried out based on the association paths of the original picture elements in the perception knowledge graph so as to further restrict the graphic thinking chain reasoning of the large language model.
  8. 8. A large language model perception alignment apparatus, the large language model perception alignment apparatus comprising: The system comprises an explicit rule set generation unit, a rule generation unit and a rule generation unit, wherein the explicit rule set generation unit is configured to acquire output text of a large language model aiming at a preset perception task and generate the explicit rule set of the large language model through semantic vectorization, cluster analysis and rule inversion based on the output text; the human perception standard rule base generation unit is configured to acquire human-marked perception samples, and perform semantic clustering and abstract summarization on the human-marked perception samples to generate a human perception standard rule base; A perception knowledge graph construction unit configured to construct a perception knowledge graph storing triples composed of an analysis subject, a perception argument, and a discriminant conclusion, based on the explicit rule set and the human perception standard rule base; And the reasoning unit is configured to search human perception standard rules related to the input text in the human perception standard rule base and inject the human perception standard rules into the reasoning process of the large language model aiming at the input text of the large language model, and search triples related to the input text in the perception knowledge graph as explicit node/side evidence to guide the large language model to conduct graphic thinking chain reasoning so as to align the perception discrimination result of the large language model with preset human standards.
  9. 9. A computing system comprising at least one computing device and at least one storage device storing instructions that, when executed by the at least one computing device, cause the at least one computing device to perform the large language model aware alignment method of any of claims 1-7.
  10. 10. A computer-readable storage medium storing instructions that, when executed by at least one computing device, cause the at least one computing device to perform the large language model aware alignment method of any of claims 1-7.

Description

Large language model perception alignment method and device Technical Field The disclosure relates to the technical fields of text risk recognition, emotion tendency analysis, content category judgment and the like, and more particularly relates to a large language model perception alignment method and device. Background The current large language model has robust objective information processing capability and text generation capability after instruction fine adjustment and reinforcement learning, and has strong universality in a wide practical task. However, for high-order perception tasks related to text risk recognition, emotion tendency analysis, content category judgment and the like, the existing method still mainly relies on manual feedback of an external rewarding model or a general system, and hidden deviations in complex semantic perception inside the model are difficult to directly, efficiently and stably extract and correct. At present, a systematic and structured method is lacking to directly analyze the inherent sensing mode and discrimination logic in the model and calibrate the consistency of the sensing mode and discrimination logic with the specific sensing standard of the target scene. Particularly when a user or an enterprise has specific content wind control requirements (such as bad content identification rules, industry classification specifications and enterprise compliance manuals), the stable performance of the model in complex tasks such as hidden risk processing and polysemous word emotion judgment processing is difficult to ensure only by virtue of fine adjustment of general instructions. Disclosure of Invention In order to solve the above problems, the present disclosure proposes a large language model perceptual alignment method and apparatus, a computing system, and a computer readable storage medium. According to one aspect of the disclosure, a large language model perception alignment method is provided, and comprises the steps of obtaining output text of a large language model aiming at a preset perception task, generating an explicit rule set of the large language model based on the output text through semantic vectorization, cluster analysis and rule inversion, obtaining a human-marked perception sample, carrying out semantic clustering and abstract summarization on the human-marked perception sample to generate a human perception standard rule base, constructing a perception knowledge graph based on the explicit rule set and the human perception standard rule base, wherein the perception knowledge graph stores triples formed by an analysis main body, perception arguments and discrimination results, searching human perception standard rules related to the input text in the human perception standard rule base aiming at the input text of the large language model, and searching triples related to the input text in the perception knowledge graph as explicit nodes/edges to guide the large language model to carry out a graphical thinking chain so as to align the large language model with the human discrimination results of the preset language model. The method comprises the steps of generating an explicit rule set of a large language model through semantic vectorization, cluster analysis and rule inversion on the basis of an output text, converting the output text into semantic vectors to form an initial vector set, conducting semantic enhancement on vectors in the initial vector set by utilizing an auxiliary semantic model to obtain an enhanced feature vector set, determining the optimal cluster number of the enhanced feature vector set on the basis of a multi-index joint decision strategy, conducting cluster division to obtain a plurality of cluster clusters, selecting a plurality of representative samples close to the center of the cluster for each cluster in the plurality of cluster clusters, conducting induction on the plurality of representative samples by utilizing a rule summarization large language model to generate an explicit rule, and generating the explicit rule set on the basis of a plurality of explicit rules corresponding to the plurality of cluster clusters. Optionally, the step of determining the optimal cluster number of the enhanced feature vector set based on a multi-index joint decision strategy comprises determining a plurality of candidate cluster numbers through multiple experiments, calculating the contour coefficient, davies-Bouldin index and Calinski-Harabasz index of each candidate cluster number in the plurality of candidate cluster numbers, and determining the optimal cluster number through a multi-index comprehensive score function by combining the tree structure change of hierarchical clusters and the performance of repeated experiments of cluster stability. Optionally, the step of retrieving and injecting human perception standard rules related to the input text in the human perception standard rule base into the large language model comprise