Construction method and equipment of voting predictor based on hypergraph and large language model, medium and product
By constructing a voting predictor based on hypergraphs and large language models, the problem of low accuracy in the prior art voting predictor when dealing with complex social relationships and text information is solved, and higher voting prediction accuracy is achieved.
Patent Information
- Application Number
- CN202510204679.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-08-01
AI Technical Summary
Existing voting predictors have low accuracy when dealing with complex social relationships and text information, making it difficult to fully integrate the social influence and understanding of motion information of voters.
A voting predictor based on hypergraph and large language models is built. By obtaining personnel data sets and motion data sets, an initial hypergraph association matrix is constructed and updated, structured instruction embedding is generated, and a multi-layer perceptron is used to adjust the prediction training results to improve the accuracy of the voting predictor.
It improves the accuracy of voting prediction results, can better handle complex social relationships and text information, and improves the overall prediction effect of voting predictors.
Smart Images

Figure CN120408057A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and particularly relates to a method for constructing a voting predictor based on a hypergraph and a large language model, an electronic device, a storage medium, and a computer product. Background Art
[0002] With the rapid development of the Internet, accurately predicting the roll call voting results based on social network systems has become a research hotspot.
[0003] In related technologies, technicians usually use a graph neural network model or a long short-term memory network model to model voting matters to predict voting results. However, the graph neural network model or the long short-term memory network model usually can only model the point-to-point relationship between voters. Thus, once there are more complex social relationships among the voters participating in the vote, the existing neural network models are difficult to comprehensively integrate the social influence of each voter, and thus the accuracy of the obtained voting prediction results will be relatively low. In addition, in the process of predicting voting results, the existing voting predictors do not introduce a powerful large language model, resulting in insufficient processing of relatively complex text information by the voting predictors. Furthermore, it is difficult for the voting predictors to integrate voter and motion information for understanding and reasoning, further reducing the accuracy of the obtained voting prediction results. Summary of the Invention
[0004] The main purpose of the present application is to provide a method for constructing a voting predictor based on a hypergraph and a large language model, an electronic device, a storage medium, and a computer product, aiming to solve the technical problem of relatively low accuracy of voting prediction results in related technologies.
[0005] To achieve the above purpose, the present application proposes a method for constructing a voting predictor based on a hypergraph and a large language model, and the method includes:
[0006] Obtain a personnel dataset, a motion dataset, and a proposal dataset, and read the voter characteristics included in the personnel dataset;
[0007] Construct an initial representation of voters based on the voter characteristics, and construct an initial hypergraph adjacency matrix based on the personnel dataset and the proposal dataset;
[0008] Update the initial hypergraph adjacency matrix to obtain an enhanced hypergraph adjacency matrix, and update the initial representation of voters according to the enhanced hypergraph adjacency matrix to obtain a target representation of voters;
[0009] Perform dimension update and semantic update on the target representation of voters through a linear layer to obtain a first hypergraph embedding of voters;
[0010] Generate structured instructions based on the motion dataset and the prediction task, and perform word segmentation on the structured instructions to obtain instruction embeddings;
[0011] Update the first hypergraph embedding of the voter through the instruction embedding to obtain the second hypergraph embedding of the voter, and splice the instruction embedding and the second hypergraph embedding of the voter and input them into a preset vote predictor to obtain each vote prediction training result;
[0012] Adjust the preset vote predictor according to each vote prediction training result to obtain a target vote predictor.
[0013] In one embodiment, the step of constructing an initial representation of a voter based on the voter characteristics includes:
[0014] Read the categorical features and continuous features included in the voter characteristics;
[0015] Map the categorical features to potential embeddings matching the preset vote predictor through one-hot vectors;
[0016] Encode the continuous features through the multi-layer perceptron of the preset vote predictor;
[0017] Splice the categorical features mapped to the potential embeddings and the encoded continuous features to construct an initial representation of the voter.
[0018] In one embodiment, the step of constructing an initial hypergraph incidence matrix based on the personnel dataset and the proposal dataset includes:
[0019] Read each voter included in the personnel dataset, and determine a set of hypergraph nodes according to each voter;
[0020] Read each vote sponsor included in the proposal dataset, and determine a set of hyperedges according to each vote sponsor;
[0021] Construct an initial hypergraph incidence matrix based on the set of hypergraph nodes and the set of hyperedges.
[0022] In one embodiment, the step of updating the initial hypergraph incidence matrix to obtain an enhanced hypergraph incidence matrix includes:
[0023] Read the associated nodes corresponding to each hyperedge included in the initial hypergraph incidence matrix, and construct a set of associated nodes according to each associated node;
[0024] Perform an averaging process on the set of associated nodes to determine attention scores, and update the initial hypergraph incidence matrix based on the attention scores to obtain an enhanced hypergraph incidence matrix.
[0025] In one embodiment, the step of dimensionally updating and semantically updating the target representation of the voter to obtain the first hypergraph embedding of the voter through a linear layer includes:
[0026] Dimensionally updating the target representation of the voter through the linear layer of a preset vote predictor to project the target representation of the voter to a matching embedding dimension;
[0027] Reading the large language model vocabulary corresponding to the preset vote predictor and determining the learning coefficients respectively matching each token embedding included in the large language model vocabulary and the target representation of the voter;
[0028] Aggregating each token embedding and the target representation of the voter based on each learning coefficient, thereby performing semantic update to obtain the first hypergraph embedding of the voter.
[0029] In one embodiment, the step of generating a structured instruction based on the bill dataset and the prediction task and performing word segmentation processing on the structured instruction to obtain an instruction embedding includes:
[0030] Receiving a prediction task matching the bill dataset and reading the voting text information included in the bill dataset;
[0031] Generating a structured instruction according to the voting text information and the prediction task, and performing word segmentation processing on the structured instruction through the word segmenter and token embedding layer of the preset vote predictor to obtain an instruction embedding.
[0032] In one embodiment, the step of concatenating the instruction embedding and the second hypergraph embedding of the voter and inputting the concatenated result into a preset vote predictor to obtain each vote prediction training result includes:
[0033] Concatenating the instruction embedding and the second hypergraph embedding of the voter to obtain target prediction information;
[0034] Passing the target prediction information through the large language model of the preset vote predictor, and inputting the output of the large language model into a multi-layer perceptron, so that the multi-layer perceptron obtains each vote prediction training result based on the output of the large language model.
[0035] In addition, to achieve the above object, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the method for constructing a vote predictor based on a hypergraph and a large language model as described above.
[0036] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for constructing a voting predictor based on a hypergraph and a large language model as described above are implemented.
[0037] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the method for constructing a voting predictor based on a hypergraph and a large language model as described above are implemented.
[0038] The method for constructing a voting predictor based on a hypergraph and a large language model provided by the embodiments of the present application includes: obtaining a personnel dataset, a motion dataset, and a proposal dataset, and reading the voting personnel features included in the personnel dataset; constructing an initial representation of the voting personnel based on the voting personnel features, and constructing an initial hypergraph association matrix based on the personnel dataset and the proposal dataset; updating the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix, and updating the initial representation of the voting personnel according to the enhanced hypergraph association matrix to obtain a target representation of the voting personnel; performing dimension update and semantic update on the target representation of the voting personnel through a linear layer to obtain a first hypergraph embedding of the voting personnel; generating a structured instruction based on the motion dataset and a prediction task, and performing word segmentation processing on the structured instruction to obtain an instruction embedding; updating the first hypergraph embedding of the voting personnel through the instruction embedding to obtain a second hypergraph embedding of the voting personnel, and splicing the instruction embedding and the second hypergraph embedding of the voting personnel and inputting them into a preset voting predictor to obtain various voting prediction training results; adjusting the preset voting predictor according to each of the voting prediction training results to obtain a target voting predictor.
[0039] Thus, in this application, the characteristics of the voting personnel in the personnel dataset are constructed into the initial representation of the voting personnel, and a hypergraph association matrix is constructed to update the initial representation of the voting personnel. Then, the updated initial representation of the voting personnel is projected into the embedding dimension and semantic alignment matched by the large language model in the voting predictor to construct the hypergraph embedding of the voting personnel. At the same time, structured instructions are generated through the motion dataset and the prediction tasks to be executed, and the structured instructions are processed to obtain instruction embeddings. Then, the instruction embeddings are used to update the hypergraph embedding of the voting personnel, so that the hypergraph embedding of the voting personnel can carry the text information contained in the motion dataset. Furthermore, the instruction embeddings and the hypergraph embedding of the voting personnel carrying the text information are input into the large language model, and the output of the large language model is input into the multi-layer perceptron. The multi-layer perceptron predicts the output embedding of the large language model to obtain the prediction training result, and adjusts the preset voting predictor according to the prediction training result. During the training process, the preset voting predictor can fully consider the complex social relationships generated among multiple voting personnel by constructing the hypergraph association matrix, and fully combine the text information in the prediction matter with the graph embedding of the voting personnel, so that the large language model in the preset voting predictor can fully understand the association between the graph embedding of the voting personnel and the text information of the prediction matter. Thus, the technical problem of low accuracy of voting prediction results in the related technology is solved, and the technical effect of improving the accuracy of the voting prediction results obtained by the voting predictor is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0041] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the construction method of the voting predictor based on hypergraph and large language model of the present application;
[0043] Figure 2 It is a detailed flowchart involved in an embodiment of the construction method of the voting predictor based on hypergraph and large language model of the present application;
[0044] Figure 3 It is a schematic diagram of semantic alignment involved in an embodiment of the construction method of the voting predictor based on hypergraph and large language model of the present application;
[0045] Figure 4Schematic diagram of the module structure of the construction device of the voting predictor based on hypergraph and large language model in the embodiments of the present application;
[0046] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the construction method of the voting predictor based on hypergraph and large language model in the embodiments of the present application.
[0047] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] To better understand the technical solutions of the present application, the following will be described in detail with reference to the accompanying drawings of the specification and specific implementation manners.
[0050] In this embodiment, for the convenience of description, the following takes an electronic device internally configured with a model training module, or a mobile terminal, a data storage control terminal, a PC and other terminals connected to an electronic control unit sleeved with the electronic device as the execution subject for elaboration. It should be noted that a preset voting predictor is provided in the model training module, wherein the voting predictor is composed of a hypergraph convolutional network and a large language model.
[0051] Based on the above-mentioned electronic device, the overall concept of the construction method of the voting predictor based on hypergraph and large language model in the present application is proposed here.
[0052] With the rapid development of the Internet, accurately predicting the roll call voting results based on social network systems has become a research hotspot. In related technologies, technicians usually use a graph neural network model or a long short-term memory network model to model voting matters to predict voting results. However, the graph neural network model or the long short-term memory network model usually can only model the point-to-point relationship between voters. In this way, once there are more complex social relationships among the voters participating in the vote, the existing neural network models are difficult to comprehensively integrate the social influence of each voter, and thus the accuracy of the obtained voting prediction results will be relatively low. In addition, in the process of predicting voting results, the existing voting predictors do not introduce a powerful large language model, resulting in insufficient processing of relatively complex text information by the voting predictors. As a result, it is difficult for the voting predictors to integrate voter and bill information for understanding and reasoning, further reducing the accuracy of the obtained voting prediction results.
[0053] In view of the above phenomena, the present application provides a method for constructing a voting predictor based on a hypergraph and a large language model. By obtaining a personnel dataset, a motion dataset, and a proposal dataset, and reading the voting personnel features included in the personnel dataset; constructing an initial representation of the voting personnel based on the voting personnel features, and constructing an initial hypergraph association matrix based on the personnel dataset and the proposal dataset; updating the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix, and updating the initial representation of the voting personnel according to the enhanced hypergraph association matrix to obtain a target representation of the voting personnel; performing dimension update and semantic update on the target representation of the voting personnel through a linear layer to obtain a first hypergraph embedding of the voting personnel; generating a structured instruction based on the motion dataset and a prediction task, and performing word segmentation processing on the structured instruction to obtain an instruction embedding; updating the first hypergraph embedding of the voting personnel through the instruction embedding to obtain a second hypergraph embedding of the voting personnel, and splicing the instruction embedding and the second hypergraph embedding of the voting personnel and inputting them into a preset voting predictor to obtain various voting prediction training results; adjusting the preset voting predictor according to each of the voting prediction training results to obtain a target voting predictor.
[0054] In this way, the present application constructs the voting personnel features in the personnel dataset into an initial representation of the voting personnel, and constructs a hypergraph association matrix to update the initial representation of the voting personnel, so as to project the updated initial representation of the voting personnel to the embedding dimension and semantic alignment matched by the large language model in the voting predictor to construct a hypergraph embedding of the voting personnel. At the same time, a structured instruction is generated based on the motion dataset and the prediction task to be performed, and the structured instruction is processed to obtain an instruction embedding, so as to update the hypergraph embedding of the voting personnel through the instruction embedding, so that the hypergraph embedding of the voting personnel can carry the text information included in the motion dataset. Furthermore, the instruction embedding and the hypergraph embedding of the voting personnel carrying the text information are input into the large language model, and the output of the large language model is input into a multi-layer perceptron. The multi-layer perceptron predicts the output embedding of the large language model to obtain a prediction training result, and adjusts the preset voting predictor according to the prediction training result, so that during the training process of the preset voting predictor, the complex social relationships generated among multiple voting personnel can be fully considered in the way of constructing the hypergraph association matrix, and the text information in the prediction matter and the graph embedding of the voting personnel can be fully combined, so that the large language model in the preset voting predictor can fully understand the association between the graph embedding of the voting personnel and the text information of the prediction matter, thereby solving the technical problem of low accuracy of voting prediction results in the related art and achieving the technical effect of improving the accuracy of the voting prediction results obtained by the voting predictor.
[0055] Based on the overall concept of the construction method of the voting predictor based on hypergraphs and large language models in this application, an embodiment of this application provides a construction method of a voting predictor based on hypergraphs and large language models. Referring to Figure 1 , Figure 1 is a schematic flowchart of the first embodiment of the construction method of the voting predictor based on hypergraphs and large language models in this application. In this embodiment, the construction method of the voting predictor based on hypergraphs and large language models includes steps S10 to S70:
[0056] Step S10: Obtain a personnel dataset, a motion dataset, and a proposal dataset, and read the voting personnel characteristics included in the personnel dataset;
[0057] Step S20: Construct an initial representation of the voting personnel based on the voting personnel characteristics, and construct an initial hypergraph association matrix based on the personnel dataset and the proposal dataset;
[0058] Step S30: Update the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix, and update the initial representation of the voting personnel according to the enhanced hypergraph association matrix to obtain a target representation of the voting personnel;
[0059] Step S40: Perform dimension update and semantic update on the target representation of the voting personnel through a linear layer to obtain a first hypergraph embedding of the voting personnel;
[0060] Step S50: Generate a structured instruction based on the motion dataset and the prediction task, and perform word segmentation processing on the structured instruction to obtain an instruction embedding;
[0061] Step S60: Update the first hypergraph embedding of the voting personnel through the instruction embedding to obtain a second hypergraph embedding of the voting personnel, and splice the instruction embedding and the second hypergraph embedding of the voting personnel and input them into a preset voting predictor to obtain various voting prediction training results;
[0062] Step S70: Adjust the preset voting predictor according to each voting prediction training result to obtain a target voting predictor.
[0063] It should be noted that the personnel dataset is a dataset containing the characteristics of each voting personnel who votes on the motion. It can be understood that the voting personnel can specifically be senators The voting personnel characteristics can specifically be the respective corresponding factions representative states ideology scores and leadership scores In addition, the proposal dataset Resolutions written and proposed by senators, proposal dataset It also includes the co-sponsors corresponding to each resolution, that is, for a certain point in time Resolution p proposed w Co-sponsors
[0064] Each bill m j The corresponding text information includes "title" and description, expressed as Each bill m j It also includes the matching bill type And faction tendency Among them, the bill type Includes bill topics, nominations, amendments and other information, expressed as It can be understood that in the bill type bill is the bill topic, nomination is the nomination, amendment is the amendment, and other is other; in addition, the faction tendency Includes the faction background in the bill content, expressed as: It can be understood that in the faction background R is the first faction, D is the second faction, I is the non-faction, Mix is the mixed faction, and other is other. In addition, each of the above resolutions p w And each bill m j The corresponding roll call vote results Among them, the roll call vote results include three results: "for" ('yeas', expressed as +), "against" ('nays', expressed as -) and "not voted" ('not vote', expressed as d), that is, Among them, For senator s i For the matter bill m j The voting result
[0065] In this embodiment, when the electronic device is running, it first reads the storage module configured in itself to obtain the personnel dataset, the proposal dataset, and the bill data, and inputs the personnel dataset, the proposal dataset, and the bill dataset into the model training module configured in itself. The model training module first reads the personnel dataset to obtain the respective voting personnel characteristics corresponding to each voting personnel for training, maps each voting personnel characteristic to a latent embedding, and constructs an initial hypergraph association matrix that can reflect the influence effect among multiple voting personnel based on the personnel dataset and the proposal dataset. Then, the model training module updates the initial hypergraph association matrix through the hypergraph attention mechanism configured in the preset voting predictor to obtain an enhanced hypergraph association matrix, and updates the initial representation of the voting personnel through the enhanced hypergraph association matrix to obtain the target representation of the voting personnel. Then, the model training module takes the target representation of the voting personnel as input, and through a linear layer, aligns the target representation of the voting personnel with the dimension and semantics of the large language model to obtain the first hypergraph embedding of the voting personnel. At the same time, the model training module reads the bill text information included in the bill dataset, generates a structured instruction according to the bill text information and the prediction task, and processes the structured instruction through the tokenizer and the token embedding layer in the large language model to obtain an instruction embedding. The model training module updates the first hypergraph embedding of the voting personnel based on the instruction embedding to obtain the second hypergraph embedding of the voting personnel. Then, the model training module inputs the second hypergraph embedding of the voting personnel and the instruction embedding into the large language model, and inputs the output of the large language model into the multi-layer perceptron again. The multi-layer perceptron predicts the output embedding of the large language model to obtain the voting prediction training results corresponding to each bill and proposal in the bill dataset. Finally, the model training module determines the weighted cross entropy as the loss function of the preset voting predictor according to each voting prediction training result, and adjusts the model parameters of the preset voting predictor based on this loss function to obtain the target voting predictor.
[0066] Exemplarily, for example, please refer to Figure 2 , Figure 2 which is a detailed process schematic diagram related to an embodiment of the construction method of the voting predictor based on the hypergraph and the large language model in this application. As Figure 2 shown, when the electronic device is running, it first reads the storage module configured in itself to obtain the personnel dataset, the proposal dataset, and the bill dataset, and inputs the personnel dataset, the proposal dataset, and the bill dataset into the model training module configured in itself. The model training module reads the personnel dataset to obtain the respective party represented state ideology score and leadership score and other voting personnel characteristics of each senator. After that, for each senator's respective party Representative state Categorical features such as, and the ideological scores corresponding to each senator and leadership scores are processed to obtain the initial representation x of each senator i = 1,..., n in the personnel dataset i as follows:
[0067]
[0068] Meanwhile, the model training module reads the proposal dataset and determines the proposal dataset containing each proposal p w co-sponsor set Based on the co-sponsor set each hyperedge of the hypergraph H is defined to obtain the hyperedge set and each senator in the personnel dataset is used as a node of the hypergraph H to obtain the node set Furthermore, according to the hyperedge set and each node, the initial hypergraph incidence matrix H corresponding to the hypergraph is constructed:
[0069] where
[0070] After that, the model training module extracts the set of associated nodes V of each associated node corresponding to the hyperedge e in the initial hypergraph incidence matrix H k and performs average aggregation processing on the set of associated nodes V k to obtain the vector representation z of the hyperedge e k : k z k = Agg({x
[0071] z k | i ∈ V i}) where x k is the vector representation of the node v i in the hypergraph; k <U+ <U+
[0072] Furthermore, the vector representation z k is processed to obtain the attention score a i,k :
[0073] where W0 and W1 are trainable parameter matrices, and sim(·) is a similarity function defined as:
[0074] where a T is the weight vector of the output scalar similarity;
[0075] The model training module then updates the initial hypergraph incidence matrix H based on the attention score a i,k to obtain an enhanced hypergraph incidence matrix
[0076] where,
[0077] The model training module thus captures the group interactions among the voters through the enhanced hypergraph incidence matrix to integrate the initial representation x of the voters i as the input to the hypergraph convolutional network:
[0078] X (0) =[x1; x2;...; x n
[0079] Thus, the initial representation x of the voters is updated through the enhanced hypergraph incidence matrix as follows: i where,
[0080] represents the d-dimensional representation of the l-th layer of the hypergraph,<000032nd]] is a diagonal matrix, each of whose elements represents the degree of a node in the hypergraph, is another diagonal matrix, each of whose elements corresponds to the degree of a hyperedge in the hypergraph, where, represents the trainable matrix parameter of the (l + 1)-th layer, and σ is a non-linear activation function;
[0081] Then, the target representation X of the voters is obtained i :
[0082]
[0083] Then, the model training module calls the linear layer configured in the preset vote predictor to convert the embedding dimension i of the target representation X of the voters to a specific dimension under the large language model to complete the dimension update process, obtaining the dimension-updated hypergraph embedding X i ' of the voters:
[0084] X i ' = W2·X i + b2, where, d LLM is the dimension of the token embedding in the representation space where the large language model is located, is the trainable parameter matrix of the linear layer, is the trainable bias term;
[0085] Align the graph information with the LLM dimension d LLM After alignment, we still need to complete semantic integration to bridge the gap between the voter representation and the semantic understanding of the large language model. At this time, perform the following steps: Extend the voter hypergraph embedding X' to the LLM vocabulary, and then learn the weight coefficients based on the extended vocabulary (including the original LLM token embeddings and the voter hypergraph embeddings) to generate the new first voter hypergraph embedding X'':
[0086] where E(C) is the original LLM token embedding, W align is the trainable parameter matrix for the alignment process, b align is the trainable bias term, X' is the set of X i ', where X' is the set of voter hypergraph embeddings with updated dimensions, and X i ' is a single voter hypergraph embedding with updated dimensions. Similarly, X'' is the set of X i '', where X'' is the set of first voter hypergraph embeddings, and X i '' is a single first voter hypergraph embedding.
[0087] Meanwhile, the model training module reads the bill types included in the bill dataset and determines the prediction tasks corresponding to the bill dataset. The model training module obtains the respective bill text information and prediction tasks for each bill m based on the topics, nominations, amendments, and other information included in the bill type j to generate structured instructions and processes the structured instructions through the tokenizer and the token embedding layer to obtain the instruction embedding The model then uses the Cross-Attention mechanism to optimize the first voter hypergraph embedding X '' through the instruction embedding i to obtain the attention weights β i,t :
[0088] where W Q and W K are both trainable parameter matrices;
[0089] The model training module optimizes the updated first voter hypergraph embedding X i,t '' according to the attention weights β i to obtain the second voter hypergraph embedding
[0090]
[0091] Finally, the model training module embeds the second hypergraph of the voting personnel and the instruction embedding obtained from the motion dataset to splice and obtain the target prediction input H final :
[0092]
[0093] Input the target prediction input H final into the large language model, and then input the output of the large language model into the MLP. The MLP processes the target prediction input H final and obtains the voting prediction training result: Based on the voting prediction training result, obtain the probabilities of the voting personnel s j voting in favor of, against, or abstaining from the motion m j The model training module then performs weighted cross-entropy based on the voting prediction result to obtain the loss function L B :
[0094] where B is the size of the training batch, represents the weights of different voting categories. The model training module then adjusts the parameters of the preset voting predictor according to the loss function L B to obtain the target voting predictor.
[0095] Thus, in this application, the voting person characteristics in the personnel dataset are constructed into the initial representation of the voting person, and a hypergraph association matrix is constructed to update the initial representation of the voting person. Then, the updated initial representation of the voting person is projected into the embedding dimension and semantic alignment matched by the large language model in the voting predictor to construct the hypergraph embedding of the voting person. At the same time, structured instructions are generated through the bill dataset and the prediction tasks to be executed, and the structured instructions are processed to obtain instruction embeddings. Then, the instruction embeddings are used to update the hypergraph embedding of the voting person, so that the hypergraph embedding of the voting person can carry the text information contained in the bill dataset. Furthermore, the instruction embeddings and the hypergraph embedding of the voting person carrying the text information are input into the large language model, and the output of the large language model is input into the multi-layer perceptron. The multi-layer perceptron predicts the output embedding of the large language model to obtain the prediction training result, and adjusts the preset voting predictor according to the prediction training result. During the training process, the preset voting predictor can fully consider the complex social relationships generated among multiple voting persons by constructing the hypergraph association matrix, and fully combine the text information in the prediction matter with the graph embedding of the voting person, so that the large language model in the preset voting predictor can fully understand the association between the graph embedding of the voting person and the text information of the prediction matter. Thus, the technical problem of low accuracy of voting prediction results in the related art is solved, and the technical effect of improving the accuracy of the voting prediction results obtained by the voting predictor is achieved.
[0096] In a feasible implementation manner, the step of "constructing the initial representation of the voting person based on the voting person characteristics" in the above step S20 may specifically include steps S201 to S204:
[0097] Step S201: Read the categorical features and continuous features included in the voting person characteristics;
[0098] Step S202: Map the categorical features to the latent embeddings matching the preset voting predictor through one-hot vectors;
[0099] Step S203: Encode the continuous features through the multi-layer perceptron of the preset voting predictor;
[0100] Step S204: Concatenate the categorical features mapped to the latent embeddings and the encoded continuous features to construct the initial representation of the voting person.
[0101] Exemplarily, for example, after the model training module inputs the personnel dataset into the preset voting predictor, the preset voting predictor reads the personnel dataset to obtain the categorical features Faction Representative state corresponding to each senator respectively, and reads the continuous feature ideological score and leadership scores After that, the preset vote predictor maps the one-hot vectors corresponding to the respective categories of each senator, such as faction represented state to potential embeddings, and encodes the ideological scores and leadership scores and other continuous features through a multi-layer perceptron in the preset vote predictor. Finally, the vote predictor concatenates the category features mapped to potential embeddings and the continuous features after encoding processing to obtain the initial representation x of each senator i = 1,..., n in the personnel dataset i as:
[0102]
[0103] In this way, during the model training process, the electronic device can encode the features of the voting personnel into a preset latent space, so that the hypergraph attention network can more effectively capture the interaction effects generated among the voting personnel and determine the internal relationships generated among the voting personnel.
[0104] In a feasible implementation manner, the step of "constructing an initial hypergraph association matrix based on the personnel dataset and the proposal dataset" in the above step S20 may specifically include steps S205 to S207:
[0105] Step S205: Read each voting personnel included in the personnel dataset, and determine a hypergraph node set according to each voting personnel;
[0106] Step S206: Read each voting sponsor included in the proposal dataset, and determine a hyperedge set according to each voting sponsor;
[0107] Step S207: Construct an initial hypergraph association matrix based on the hypergraph node set and the hyperedge set.
[0108] Exemplarily, for example, after the preset vote predictor determines the initial representation x of the voting personnel i it can also read each senator in the personnel dataset and use each senator as a node of the hypergraph H to obtain a node set At the same time, the preset vote predictor reads the proposal dataset containing each proposal p w co-sponsor set to define each hyperedge of the hypergraph H based on the co-sponsor set to obtain a hyperedge set Finally, the preset vote predictor constructs an initial hypergraph association matrix according to the hyperedge set The initial hypergraph association matrix H corresponding to the hypergraph constructed with each node:
[0109] in,
[0110] In this way, electronic devices can capture the potential discussion process of each voter before jointly proposing and voting by constructing a hypergraph association matrix, and determine the influence that each voter may try to exert on each other, so as to more accurately infer the exchange of opinions between each other and further improve the accuracy of the voting prediction results.
[0111] In a feasible implementation, the step of "updating the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix" in the above step S30 may specifically include steps S301 to S302:
[0112] Step S301: reading the associated nodes corresponding to the respective hyperedges contained in the initial hypergraph association matrix, and constructing an associated node set according to the associated nodes;
[0113] Step S302: performing an average process on the associated node set to determine an attention score, and updating the initial hypergraph association matrix based on the attention score to obtain an enhanced hypergraph association matrix.
[0114] For example, after the voting predictor constructs the initial hypergraph association matrix H, although it can capture the interaction content between multiple voters, it cannot consider the differences in the influence of senators on different groups (for example, senators who focus on public health issues are more likely to influence or be influenced by other senators who also focus on such proposals). Therefore, the voting predictor extracts the hyperedge e in the initial hypergraph association matrix H. k The corresponding associated node set V of each associated node k , and the associated node set V k Perform average aggregation to obtain the hyperedge e k The vector representation z k :
[0115] z k =Agg({x i |i∈V k}), where x i is a node v in the hypergraph k Vector representation of ;
[0116] Then the vector z is represented k Processing to obtain the attention score a i,k :
[0117] Among them, W0 and W1 are trainable parameter matrices, and sim(·) is a similarity function, which is defined as:
[0118] a T is the weight vector for outputting scalar similarity;
[0119] The voting predictor then updates the initial hypergraph incidence matrix H based on the attention score a i,k to obtain an enhanced hypergraph incidence matrix
[0120] where
[0121] In this way, the electronic device can enhance the hypergraph incidence matrix to ensure that the voting predictor fully considers the influence differences of different voters on different groups, thereby further improving the accuracy of the obtained prediction results.
[0122] In a feasible implementation manner, the above step S40 may specifically include steps S401 to S403:
[0123] Step S401: Update the dimension of the voter target representation through the linear layer of the preset voting predictor to project the voter target representation to a matching embedding dimension;
[0124] Step S402: Read the large language model vocabulary corresponding to the preset voting predictor, and determine the learning coefficients respectively matching each token embedding included in the large language model vocabulary and the voter target representation;
[0125] Step S403: Aggregate each token embedding and the voter target representation based on each learning coefficient, thereby performing semantic update to obtain the first hypergraph embedding of the voter.
[0126] Exemplarily, for example, please refer to Figure 3 , Figure 3 which is a schematic diagram of semantic alignment involved in an embodiment of the method for constructing a voting predictor based on a hypergraph and a large language model in this application. As Figure 3 shown, after the model training model determines the enhanced hypergraph incidence matrix and updates to obtain the voter target representation, it can also use the voter target representation X i as input, and perform a dimension update operation through the linear layer to convert the embedding dimension i of the voter target representation X to a specific dimension under the large language model, obtaining the dimension-updated hypergraph embedding X i ' of the voter:
[0127] X i ' = W2·X i + b2, where d LLM is the dimension of the token embedding in the representation space where the large language model is located, is the trainable parameter matrix of the linear layer, is the trainable bias term;
[0128] After that, read the preset vocabulary table matching the model, and determine all the token embeddings and the vote person hypergraph embeddings with the converted dimensions included in the vocabulary table, and assign learnable coefficients to all the token embeddings and the vote person hypergraph embeddings with the converted dimensions. Finally, aggregate each token embedding and the vote person hypergraph embedding with the converted dimensions through each learnable system to complete the semantic update operation, so as to align the vocabulary table embeddings E1(C),..., E n (C) and the vote person hypergraph embedding X' after dimension update, make up for the gap between the vote person representation and the semantic understanding of the large language model, and obtain the first vote person hypergraph embedding X":
[0129] where E(C) is the original LLM token embedding, W align is the trainable parameter matrix of the alignment process, b align is the trainable bias term.
[0130] In this way, it can align the vote person hypergraph embedding after dimension update with the representation space dimension of the large language model, and effectively make up for the gap between the senator representation and the semantic understanding of the large language model.
[0131] In a feasible implementation manner, the above step S50 may specifically include steps S501 to S502:
[0132] Step S501: Receive a prediction task matching the bill dataset, and read the voting text information included in the bill dataset;
[0133] Step S502: Generate a structured instruction according to the voting text information and the prediction task, and perform tokenization processing on the structured instruction through the tokenizer and token embedding layer of the preset vote predictor to obtain an instruction embedding.
[0134] Exemplarily, for example, after the hypergraph convolutional neural network determines the first vote person hypergraph embedding X i ", it can also read the bill type faction tendency bill description included in the bill dataset, so as to according to the bill type faction tendency The bill description determines the corresponding theme, nomination, amendment, and other text information of the bill, so as to generate structured instructions according to each text information and prediction tasks. And the structured instructions Call the text conversion instruction "The bill titled "{bill title}", classified as "{bill type}" with the description {bill description}", was introduced by a senator from the "{bill faction tendency}" party. Can you predict how the senator will vote on this bill?" through the tokenizer and the token embedding layer to generate an instruction embedding representation that matches the structured instructions. And use the instruction embedding representation through the Cross-Attention mechanism Optimize the first hypergraph embedding X of the voter i " to obtain the attention weight β i,t :
[0135] Among them, W Q and W K are both trainable parameter matrices;
[0136] The model training module optimizes the first hypergraph embedding X of the voter according to the attention weight β i,t to obtain the second hypergraph embedding of the voter i "
[0137]
[0138] In this way, by adopting the Cross-Attention mechanism, the hypergraph embedding of the voter can be dynamically adjusted to more accurately capture the correlation between the hypergraph embedding of the voter and the instruction embedding representation, more flexibly extract the key information in the instruction embedding representation, and thus more effectively support the execution of the vote prediction task.
[0139] In a feasible implementation manner, the step of "performing prediction processing on the second hypergraph embedding of the voter through a preset vote predictor to obtain each vote prediction training result" in the above step S60 may specifically include steps S601 to S602:
[0140] Step S601: Concatenate the instruction embedding and the second hypergraph embedding of the voter to obtain target prediction information;
[0141] Step S602: Pass the target prediction information through the large language model of the preset voting predictor, and input the output of the large language model into a multi-layer perceptron, so that the multi-layer perceptron obtains each voting prediction training result based on the output of the large language model.
[0142] Exemplarily, for example, the model training module embeds the second hypergraph of the voter and the instruction embedding obtained based on the motion dataset to splice and obtain the target prediction input H final :
[0143]
[0144] After that, the model training module inputs the target prediction input H final into the large language model of the preset voting predictor, and outputs the output of the large language model to the multi-layer perceptron, and the multi-layer perceptron makes result predictions:
[0145] z 0 = H final ;
[0146] z (1) = σ(z (0) ·W (1) + b (1) );
[0147] z (l-1) = σ(z (l-2) ·W (l-1) + b (l-1) );
[0148]
[0149] As a result, the probability that the voter s j votes in favor of, against, or abstains from the motion m j is obtained.
[0150] In this way, the electronic device further improves the accuracy of the obtained prediction results by using the multi-layer perceptron in the large language model to predict the instruction carrying the hypergraph embedding and instruction embedding of the voter.
[0151] The present application also provides a construction device for a voting predictor based on a hypergraph and a large language model. Please refer to Figure 4 , and the construction device for the voting predictor based on the hypergraph and the large language model includes:
[0152] A feature extraction module 10, configured to obtain a personnel dataset, a motion dataset, and a proposal dataset, and read the voter features included in the personnel dataset;
[0153] The matrix construction module 20 is used to construct an initial representation of the voters based on the voter characteristics, and construct an initial hypergraph association matrix based on the personnel dataset and the proposal dataset;
[0154] The feature update module 30 is used to update the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix, and update the initial representation of the voters according to the enhanced hypergraph association matrix to obtain a target representation of the voters;
[0155] The dimension update module 40 is used to perform dimension update and semantic update on the target representation of the voters through a linear layer to obtain a first hypergraph embedding of the voters;
[0156] The instruction extraction module 50 is used to generate structured instructions based on the motion dataset and the prediction task, and perform word segmentation processing on the structured instructions to obtain instruction embeddings;
[0157] The fusion prediction module 60 is used to update the first hypergraph embedding of the voters through the instruction embeddings to obtain a second hypergraph embedding of the voters, and splice the instruction embeddings and the second hypergraph embedding of the voters and input them into a preset vote predictor to obtain various vote prediction training results;
[0158] The parameter adjustment module 70 is used to adjust the preset vote predictor according to each of the vote prediction training results to obtain a target vote predictor.
[0159] In a feasible implementation manner, the above matrix construction module 20 is further used for:
[0160] Read the categorical features and continuous features included in the voter characteristics;
[0161] Map the categorical features to potential embeddings matching the preset vote predictor through one-hot vectors;
[0162] Encode the continuous features through the multi-layer perceptron of the preset vote predictor;
[0163] Splice the categorical features mapped to the potential embeddings and the encoded continuous features to construct an initial representation of the voters.
[0164] In a feasible implementation manner, the above matrix construction module 20 is further used for:
[0165] Read each voter included in the personnel dataset, and determine a hypergraph node set according to each voter;
[0166] Read each vote sponsor included in the proposal dataset, and determine a hyperedge set according to each vote sponsor;
[0167] Construct an initial hypergraph incidence matrix based on the hypergraph node set and the hyperedge set.
[0168] In a feasible implementation manner, the above-mentioned feature update module 30 is further configured to:
[0169] Read the associated nodes corresponding to each hyperedge included in the initial hypergraph incidence matrix, and construct an associated node set according to each of the associated nodes;
[0170] Perform an averaging process on the associated node set to determine an attention score, and update the initial hypergraph incidence matrix based on the attention score to obtain an enhanced hypergraph incidence matrix.
[0171] In a feasible implementation manner, the above-mentioned dimension update module 40 is further configured to:
[0172] Update the dimension of the voting person's target representation through the linear layer of a preset voting predictor to project the voting person's target representation to a matching embedding dimension;
[0173] Read the large language model vocabulary corresponding to the preset voting predictor, and determine the learning coefficients that match each token embedding included in the large language model vocabulary and the voting person's target representation respectively;
[0174] Aggregate each token embedding and the voting person's target representation based on each of the learning coefficients, thereby performing semantic update to obtain the first hypergraph embedding of the voting person.
[0175] In a feasible implementation manner, the above-mentioned instruction extraction module 50 is further configured to:
[0176] Receive a prediction task that matches the motion dataset, and read the voting text information included in the motion dataset;
[0177] Generate a structured instruction according to the voting text information and the prediction task, and perform tokenization processing on the structured instruction through the tokenizer and token embedding layer of the preset voting predictor to obtain an instruction embedding.
[0178] In a feasible implementation manner, the above-mentioned fusion prediction module 60 is further configured to:
[0179] Concatenate the instruction embedding and the second hypergraph embedding of the voting person to obtain target prediction information;
[0180] Pass the target prediction information through the large language model of the preset voting predictor, and input the output of the large language model into a multi-layer perceptron, so that the multi-layer perceptron obtains each voting prediction training result based on the output of the large language model.
[0181] The construction device of the voting predictor based on hypergraph and large language model provided by this application adopts the construction method of the voting predictor based on hypergraph and large language model in the above embodiment, and can solve the technical problem of low accuracy of voting prediction results in the related art. Compared with the prior art, the beneficial effects of the construction device of the voting predictor based on hypergraph and large language model provided by this application are the same as those of the construction method of the voting predictor based on hypergraph and large language model provided by the above embodiment, and other technical features in the construction device of the voting predictor based on hypergraph and large language model are the same as the features disclosed in the method of the above embodiment, which will not be elaborated here.
[0182] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the construction method of the voting predictor based on hypergraph and large language model in the first embodiment above.
[0183] Next, refer to Figure 5 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.
[0184] As Figure 5As shown, the electronic device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in the read-only memory 1002 or a program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or had alternatively.
[0185] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart may be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiments disclosed in the present application are executed.
[0186] The electronic device provided by the present application, adopting the construction method of the voting predictor based on the hypergraph and the large language model in the above embodiments, can solve the technical problem of relatively low accuracy of the voting prediction result in the related art. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as those of the construction method of the voting predictor based on the hypergraph and the large language model provided in the above embodiments, and other technical features in the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0187] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0188] As mentioned above, this is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0189] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for constructing a voting predictor based on a hypergraph and a large language model in the above embodiments.
[0190] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0191] The above computer-readable storage medium can be included in an electronic device; it can also exist separately without being assembled into the electronic device.
[0192] The above computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: obtain a personnel data set, a motion data set, and a proposal data set, and read the voter characteristics included in the personnel data set; construct an initial representation of the voter based on the voter characteristics, and construct an initial hypergraph association matrix based on the personnel data set and the proposal data set; update the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix, and update the initial representation of the voter according to the enhanced hypergraph association matrix to obtain a target representation of the voter; perform dimensionality update and semantic update on the target representation of the voter through a linear layer to obtain a first hypergraph embedding of the voter; generate a structured instruction based on the motion data set and a prediction task, and perform word segmentation on the structured instruction to obtain an instruction embedding; update the first hypergraph embedding of the voter through the instruction embedding to obtain a second hypergraph embedding of the voter, and splice the instruction embedding and the second hypergraph embedding of the voter and input them into a preset vote predictor to obtain various vote prediction training results; adjust the preset vote predictor according to each of the vote prediction training results to obtain a target vote predictor.
[0193] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0194] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0195] The modules described in the embodiments of the present application can be implemented in software or in hardware. Wherein, the name of the module does not constitute a limitation on the unit itself in some cases.
[0196] The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for constructing a vote predictor based on a hypergraph and a large language model, which can solve the technical problem of low accuracy of vote prediction results in the related art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the method for constructing a vote predictor based on a hypergraph and a large language model provided in the above embodiments, and will not be elaborated here.
[0197] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the method for constructing a vote predictor based on a hypergraph and a large language model as described above.
[0198] The computer program product provided by the present application can solve the technical problem of low accuracy of vote prediction results in the related art. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the method for constructing a vote predictor based on a hypergraph and a large language model provided in the above embodiments, and will not be elaborated here.
[0199] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A construction method of a voting predictor based on a hypergraph and a large language model, characterized in that, The construction method of the voting predictor based on the hypergraph and the large language model includes: Obtain a personnel dataset, a motion dataset, and a proposal dataset, and read the voting personnel features included in the personnel dataset; Construct an initial representation of the voting personnel based on the voting personnel features, and construct an initial hypergraph association matrix based on the personnel dataset and the proposal dataset; Update the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix, and update the initial representation of the voting personnel according to the enhanced hypergraph association matrix to obtain a target representation of the voting personnel; Perform dimension update and semantic update on the target representation of the voting personnel through a linear layer to obtain a first hypergraph embedding of the voting personnel; Generate a structured instruction based on the motion dataset and the prediction task, and perform word segmentation on the structured instruction to obtain an instruction embedding; Update the first hypergraph embedding of the voting personnel through the instruction embedding to obtain a second hypergraph embedding of the voting personnel, and splice the instruction embedding and the second hypergraph embedding of the voting personnel and input them into a preset voting predictor to obtain various voting prediction training results; Adjust the preset voting predictor according to each of the voting prediction training results to obtain a target voting predictor.
2. The construction method of the voting predictor based on hypergraph and large language model according to claim 1, characterized in that, The step of constructing an initial representation of the voting personnel based on the voting personnel features includes: Read the categorical features and continuous features included in the voting personnel features; Map the categorical features to a latent embedding matching the preset voting predictor through a one-hot vector; Encode the continuous features through a multi-layer perceptron of the preset voting predictor; Splice the categorical features mapped to the latent embedding and the encoded continuous features to construct an initial representation of the voting personnel.
3. The construction method of the voting predictor based on the hypergraph and the large language model according to claim 1, wherein The step of constructing an initial hypergraph association matrix based on the personnel dataset and the proposal dataset includes: Read each voting personnel included in the personnel dataset, and determine a hypergraph node set according to each voting personnel; Read each voting sponsor included in the proposal dataset, and determine a hyperedge set according to each voting sponsor; Construct an initial hypergraph association matrix based on the hypergraph node set and the hyperedge set.
4. The construction method of the voting predictor based on hypergraph and large language model according to claim 1, characterized in that, The step of updating the initial hypergraph association matrix to obtain an enhanced hypergraph association matrix includes: Read the associated nodes corresponding to each hyperedge included in the initial hypergraph association matrix, and construct an associated node set according to each associated node; Perform an average process on the associated node set to determine an attention score, and update the initial hypergraph association matrix based on the attention score to obtain an enhanced hypergraph association matrix.
5. The construction method of the voting predictor based on hypergraph and large language model according to claim 1, characterized in that The step of performing dimension update and semantic update on the target representation of the voting personnel through a linear layer to obtain a first hypergraph embedding of the voting personnel includes: Perform dimension update on the target representation of the voting personnel through a linear layer of the preset voting predictor to project the target representation of the voting personnel to a matching embedding dimension; Read the large language model vocabulary corresponding to the preset voting predictor, and determine the learning coefficients matching each token embedding included in the large language model vocabulary and the target representation of the voting personnel; Aggregate each of the token embeddings and the target representation of the voter based on each of the learning coefficients, thereby performing semantic update to obtain the first hypergraph embedding of the voter.
6. The construction method of the voting predictor based on the hypergraph and the large language model according to claim 1, characterized in that, The step of generating a structured instruction based on the motion dataset and the prediction task, and performing word segmentation processing on the structured instruction to obtain an instruction embedding includes: Receiving a prediction task that matches the motion dataset, and reading the voting text information included in the motion dataset; Generating a structured instruction according to the voting text information and the prediction task, and performing word segmentation processing on the structured instruction through the word segmenter and the token embedding layer of the preset voting predictor to obtain an instruction embedding.
7. The construction method of the voting predictor based on the hypergraph and the large language model according to claim 6, characterized in that, The step of concatenating the instruction embedding and the second hypergraph embedding of the voter and inputting them into a preset voting predictor to obtain each voting prediction training result includes: Concatenating the instruction embedding and the second hypergraph embedding of the voter to obtain target prediction information; Passing the target prediction information through the large language model of the preset voting predictor, and inputting the output of the large language model into a multi-layer perceptron, so that the multi-layer perceptron obtains each voting prediction training result based on the output of the large language model.
8. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the method for constructing a voting predictor based on a hypergraph and a large language model according to any one of claims 1 to 7.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the method for constructing a voting predictor based on a hypergraph and a large language model according to any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method for constructing a voting predictor based on a hypergraph and a large language model according to any one of claims 1 to 7.