A lightweight privacy-preserving sample alignment method and system for vertical federated learning
By dynamically mapping and adjusting and enhancing unintentional key-value storage encoding, the bottleneck of sample alignment efficiency in vertical federated learning is solved, achieving efficient and secure sample alignment, reducing computational and storage overhead, and improving practicality.
Patent Information
- Application Number
- CN202611377526.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-17
AI Technical Summary
Existing privacy sample alignment methods suffer from efficiency bottlenecks in vertical federated learning scenarios, especially in large-scale data scenarios where computational resources are consumed in large quantities, and uneven hash mapping leads to increased storage space requirements and performance fluctuations.
A novel privacy set intersection protocol is constructed by using dynamic mapping adjustment and enhanced unintentional key-value storage encoding. Sample alignment is achieved through a two-stage encoding mechanism of global peeling and block-local Gaussian elimination, combined with unintentional pseudo-random function interaction.
It effectively reduces the risk of bucket load imbalance and hash bucket storage overhead during the sample hash mapping stage, significantly reduces the solution complexity of sparse linear systems, and improves the efficiency and deployability of sample alignment.
Smart Images

Figure CN123116332A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of federated learning, privacy computing, and information security technology, and specifically relates to a lightweight privacy sample alignment method and system for vertical federated learning. Background Technology
[0002] Vertical Federated Learning (VFL) is an important cross-institutional collaborative modeling approach. This method enables joint training of data belonging to the same group of entities but with different feature dimensions without participants directly sharing the original data. This fully integrates heterogeneous data resources, improving the completeness and accuracy of model training. With the increasing demand for cross-institutional data collaboration in fields such as finance, healthcare, and government, VFL has received growing attention.
[0003] In vertical federated learning scenarios, different participants typically hold different subsets of features corresponding to the same entity set. Therefore, before model training, sample alignment needs to be performed to ensure that features from different participants can be correctly associated with the same entity. Private Sample Alignment (PSA) is a key prerequisite in vertical federated learning, and its goal is to generate a set of intersection samples that can be used for joint training without revealing the original sample information of each party.
[0004] Existing privacy-focused sample alignment methods typically employ cryptographic tools such as Private Set Intersection (PSI) to compute sample intersections without disclosing non-intersecting elements. With ongoing research, sample alignment implementations have significantly improved in terms of protocol security and functional integrity, and are increasingly incorporating technologies such as Oblivious Key-Value Stores (OKVS) to reduce computational and communication overhead and enhance protocol execution efficiency.
[0005] However, existing privacy set intersection protocols still face significant efficiency bottlenecks in practical applications of vertical federated learning scenarios. For example, Jiang Z et al. proposed a private set intersection scheme based on a lightweight oblivious key-value storage structure (Jiang Z, Guo X, Yu T, Zhou H, Wen J, Wu Z. Private Set IntersectionBased on Lightweight Oblivious Key-Value Storage Structure. Symmetry. 2023;15(11):2083. https: / / doi.org / 10.3390 / sym15112083). This scheme maps and organizes data elements by constructing a key-value storage structure to reduce computational and communication overhead during protocol execution. However, since this type of hash-based data organization relies on the uniform distribution of elements in buckets, when the input data has a skewed distribution or the hash mapping is unbalanced, it may lead to concentrated loads in some buckets, increasing local storage space requirements and causing fluctuations in protocol performance. For example, the privacy set intersection protocol designed by Garimella et al. (Garimella, G., Pinkas, B., Rosulek, M., Trieu, N., Yanai, A. (2021). Oblivious Key-Value Stores and Amplification for Private Set Intersection. In: Malkin, T., Peikert, C. (eds) Advances in Cryptology – CRYPTO 2021. CRYPTO 2021. Lecture Notes in ComputerScience(), vol 12826. Springer, Cham. https: / / doi.org / 10.1007 / 978-3-030-84245-1_14) improves the efficiency of sample alignment in vertical federated learning to some extent, but its implementation still relies on solving sparse linear systems. The encoding method of this scheme requires complex Gaussian elimination operations, which leads to long encoding time and high computational resource consumption, especially in large-scale data scenarios. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, the present invention aims to provide a lightweight privacy sample alignment method and system for vertical federated learning. It achieves privacy sample alignment by constructing a novel privacy set intersection protocol through dynamic mapping adjustment and enhanced unintentional key-value storage encoding. It features high efficiency, high security, low computational complexity, and low communication overhead.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A lightweight privacy-preserving sample alignment method for vertical federated learning includes a receiver and a sender participating in sample alignment, and the method includes the following steps: Step 1, the receiver holds a sample set. The sender holds a sample set. The intersection of samples from both parties is calculated using a privacy set intersection protocol; Step 2: Set security parameters. Based on the security parameters, determine the set of public parameters required for the execution of the privacy set intersection protocol, including finite field, hash function, unintentional key-value storage encoding parameters, and parameters related to the lightweight pseudo-random function. Step 3: The receiver and sender respectively perform hash processing on their respective sample sets. A third hash function is constructed by combining two independent hash functions with a lightweight pseudo-random function to complete the bucket mapping. During mapping, the maximum bucket load threshold is calculated based on the bucket load. If the bucket load does not exceed the threshold, the hash mapping continues. Otherwise, a dynamic adjustment mechanism is triggered to restore the bucket load balance. Step 4: The receiver constructs a key-value pair set based on its sample set and the corresponding hash result, and uses the key-value pair set as the encoded input for unintentional key-value storage. Step 5: Represent the sparse linear system corresponding to the encoding process as a bipartite graph structure, use a global peeling algorithm to identify the constraint nodes with a residual unknown degree of 1, iteratively solve the unique unknown variable and perform back-substitution update until peeling can no longer be continued, and output the set of solved variables and the residual 2-core subsystem. Step 6: For the residual 2-core subsystem, identify local connected components, extract the corresponding local subsystems for local connected components that meet the threshold conditions and perform block local Gaussian elimination, substitute the obtained solution back into the constraints related to the local block, and perform secondary peeling; perform final global Gaussian elimination on the residual cores that are still unsolved to obtain the complete encoding result; Step 7: Based on the encoding result, the receiver and the sender execute an unintentional pseudo-random function protocol to construct a set of pseudo-random mapping results corresponding to their samples, and the sender obtains a set of target matching results corresponding to their samples. Step 8: The sender randomly permutes the target matching result set and sends it to the receiver. The receiver matches the pseudo-random mapping result set with the target matching result set sent by the sender, restores the intersection of the two samples, and outputs it as the sample alignment result of vertical federated learning.
[0008] The specific steps of step 2 are as follows: Define security parameters finite field ,in, Prime numbers or prime powers that meet safety requirements; Define the number of buckets as The bucket index space size is The length of the encoded vector is The local block size threshold is The temporary storage area of the bucket is The threshold for the temporary storage area is The system-level failure probability is ; Define two independent hash functions ,in, It is a binary string of arbitrary length. ; Define a lightweight pseudo-random function ; Define a key mapping function for unintentional key-value storage encoding. Public mapping functions and value mapping function ,in, Represents the key space. Representing the sample space, Represents the matching result space, Indicates the output length; The common parameter set is represented as The third hash function in step 3 is represented as follows: in, Represents the elements of the union of the two samples; Define the bucket load vector as ,in, Indicates the first The number of elements stored in each bucket, and the expected load of each bucket. , This represents the total number of elements placed into these buckets; definition The average load constant is represented as follows: The maximum bucket load threshold is represented as follows: .
[0009] The dynamic adjustment mechanism in step 3 is specifically as follows: When there exists a bucket that satisfies When necessary, elements that cannot be placed normally in the intended manner will be written to the temporary storage area. If the size of the temporary storage area meets the requirements If the size of the temporary storage area is sufficient, then the elements in the temporary storage area will be retained and processed later; if the size of the temporary storage area satisfies the condition... If this happens, a rehashing operation is triggered, and the hash mapping is re-executed for the relevant elements to restore bucket load balancing.
[0010] The construction process of the key-value pair set in step 4 is as follows: Calculate any sample element in the receiver's sample set The key represents Then calculate its corresponding value. Thus constructing a set of key-value pairs .
[0011] The specific steps of step 5 include: The unintentional key-value storage encoding process is represented as a sparse linear system. ,in, The coefficient matrix, Let be the encoding vector to be determined. The vector on the right side; The sparse linear system is represented as a bipartite graph. ,in, Represents a set of variable nodes. Represents the set of constraint nodes. Represents the set of edges; Define the algorithm state during the peeling process as follows: ,in, This represents the set of remaining unsolved variable nodes. Represents the set of remaining constraint nodes. Denotes the set of remaining edges. This indicates that the variable and its set of values have been obtained; Initially , , and , Represents the empty set; Define any constraint node The residual unknowns are ,in, Indicates the first Line 1 Column samples .
[0012] In each iteration, identify all that satisfy the condition. constraint nodes and define constraint nodes The node corresponding to the only unknown variable in the corresponding equation is Solving for unknown variables ,in, Indicates the first The right-hand vector elements corresponding to each constraint node Represents the coefficient matrix The Middle line, number Column elements, Indicates the first The solved variable values corresponding to each variable node; The obtained unknown variables Add to the solved set and update the formula as follows: Subsequently, for all nodes... Connected constraint nodes Perform global proxy update , ,in, Indicates the first The right-hand vector elements corresponding to each constraint node Represents the coefficient matrix The Middle line, number Column elements, Indicates the first The solved variable values corresponding to each variable node. Simultaneously, the nodes... From the set of remaining unsolved variable nodes Delete; Until no satisfaction exists constraint nodes At this point, the peeling process ends, and the remaining unsolved portion constitutes a residual 2-core subsystem, denoted as... ,in, This represents the set of remaining unsolved variable nodes in the residual 2-core subsystem. This represents the set of remaining constraint nodes in the residual 2-core subsystem. This represents the set of remaining edges in the residual 2-core subsystem. Output the solution obtained from the first stage of peeling. .
[0013] The specific steps of step 6 include: In the remaining 2-core subsystem Above, from any unprocessed variable node Starting from this point, a locally connected component can be obtained using either breadth-first search or depth-first search. , among which, among which, This represents the set of remaining unsolved variable nodes in a locally connected component. This represents the set of remaining constraint nodes in a locally connected component. This represents the set of remaining edges in a locally connected component. , , ; Extracting local connected components from the residual 2-core subsystem Corresponding local subsystem ,in, For the reason Corresponding rows and The submatrix formed by the corresponding columns, For a vector of locally unknown variables, This is the local right-hand vector obtained by incorporating the corresponding terms of the known variables; Set local connectivity threshold If the locally connected components satisfy For the local subsystem Perform local Gaussian elimination on the block to obtain the exact solution for the locally connected component. ; exact solution The value is substituted back into the constraints associated with that local block, and another round of peeling process is executed; For locally connected components satisfy Furthermore, for the remaining core that remains unsolved even after secondary peeling, the final residual system is constructed. ,in, For the submatrix in the residual system, Let the vector of local unknown variables be in the residual system. This is the local right-hand vector obtained after incorporating the corresponding terms of the known variables into the residual system. Global Gaussian elimination is then performed to obtain the solution for the remaining variables. ; The solution obtained from the first stage of peeling Exact solutions for locally connected components and the solution of the remaining variables Merge the results to obtain the complete encoding. .
[0014] The specific steps of step 7 include: Recipient According to the query key corresponding value For the encoding result Perform the decoding operation, and then obtain the decoded value corresponding to the sample. ; In the construction of the unintentional pseudo-random function based on the aforementioned unintentional key-value storage, the receiver With sample set As input, combine the key-value pair set and encoding results To restore the median value corresponding to each sample; sender With the recipient Execute the unintentional pseudo-random function protocol and define the sender. Holding a pseudo-random function key The corresponding pseudo-random function is denoted as ; Recipient According to the decoded value And the results of protocol interaction, to recover any sample The corresponding pseudo-random function output ; sender Directly calculate any sample The corresponding pseudo-random function output ; During the unintentional execution of the pseudo-random function protocol, the receiver... Generate random mask sender Generate random mask And let both sides use random mask combinations. ; Recipient Based on its pseudo-random function output Construct a set of pseudo-random mapping results: sender Based on its sample set Public mapping functions Value mapping function and random mask combinations for both parties Construct a set of target matching results: in, Indicates the sample The decoding result, Indicates that the sample The key represents the value vector obtained by mapping. This indicates the relevant parameters generated during the protocol interaction process. This represents a random mask combination between the two parties.
[0015] The specific steps of step 8 include: sender Set of target matching results Perform random permutations The result set after random permutation is obtained. ; Subsequently, the sender The result set after random permutation Send to the recipient ; Recipient Using pseudo-random mapping result set With the sender The set of random permutation results sent Perform item-by-item matching; If any sample satisfy Determine the sample This is an intersection between the two parties, the receiving party The intersection of the recovered samples is represented as follows: when hour , ; Recipient The final restored set That is, the intersection of the two samples. .
[0016] Recipient Output sample intersection This data is then used as the sample alignment result before vertical federated learning training to establish a one-to-one correspondence between the feature data of different participants.
[0017] A lightweight privacy-preserving sample alignment system for vertical federated learning includes: The sample alignment and initialization module calculates the set of samples held by the receiver using a privacy set intersection protocol. With the sender holding the sample set The sample intersection; and set security parameters, and determine the set of public parameters required for the execution of the privacy set intersection protocol based on the security parameters, including finite field, hash function, unintentional key-value storage encoding parameters and lightweight pseudo-random function related parameters; The hash mapping module involves the receiver and sender performing hash processing on their respective sample sets. A third hash function, constructed using two independent hash functions combined with a lightweight pseudo-random function, is used to complete the bucket mapping. The maximum bucket load threshold is calculated based on the bucket load. If the bucket load does not exceed the threshold, hash mapping continues. If the bucket load exceeds the threshold, a dynamic adjustment mechanism is triggered to restore bucket load balance. The key-value generation module allows the receiver to construct a set of key-value pairs based on its sample set and the corresponding hash results, and to use the set of key-value pairs as the encoded input for unintentional key-value storage. The encoding module represents the sparse linear system corresponding to the encoding process as a bipartite graph structure. It uses a global peeling algorithm to identify constraint nodes with a residual unknown degree of 1, iteratively solves the unique unknown variable and performs back-substitution updates until peeling can no longer be performed, and outputs the set of solved variables and the residual 2-core subsystem. For the residual 2-core subsystem, it identifies local connected components, extracts the corresponding local subsystems for local connected components that meet the threshold conditions and performs block local Gaussian elimination, substitutes the obtained solution back into the constraints related to the local block, and performs a second peeling. For the remaining unsolved residual cores, it performs a final global Gaussian elimination to obtain the complete encoding result. The pseudo-random function interaction module allows the receiver to construct a set of pseudo-random mapping results corresponding to its sample based on the encoded result and the sender to execute an unintentional pseudo-random function protocol. The sender then obtains a set of target matching results corresponding to its sample. The privacy sample alignment module involves the sender randomly permuting the target matching result set and sending it to the receiver. The receiver then matches the pseudo-random mapping result set with the target matching result set sent by the sender to restore the intersection of the two samples, and outputs it as the sample alignment result of vertical federated learning.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention effectively reduces the risk of bucket load imbalance and hash bucket storage overhead during the sample hash mapping stage by introducing a dynamic adjustment strategy; 2. By constructing a two-stage unintentional key-value storage encoding mechanism that includes global peeling and block-local Gaussian elimination, the computational complexity of solving sparse linear systems is significantly reduced and the encoding efficiency is improved; 3. By further combining unintentional pseudo-random function interaction computation, privacy sample alignment is achieved without revealing information about non-intersecting samples, thereby improving the practicality and deployability of sample alignment in vertical federated learning scenarios.
[0019] In summary, this invention can effectively reduce the storage and computational overhead in the sample mapping and unintentional key-value storage encoding process while ensuring the privacy of sample alignment, thereby improving the overall efficiency of privacy sample alignment and possessing good scalability and engineering deployment value. Attached Figure Description
[0020] Figure 1 A schematic diagram illustrating the intersection relationship between vertical federated learning and privacy sets.
[0021] Figure 2 This is a block diagram of the present invention. Detailed Implementation
[0022] The relevant technologies of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0023] This embodiment provides a lightweight privacy-preserving sample alignment method for vertical federated learning, suitable for aligning data belonging to the same entity but with different feature dimensions without directly sharing the original sample data. The method is based on a privacy set intersection protocol and reduces communication overhead, computational complexity, and storage burden during the sample alignment stage through dynamic adjustment strategies and an enhanced inadvertent key-value storage encoding mechanism. The specific implementation of this method is described below: Step 1: Construct a privacy sample alignment scenario; In this embodiment, the two parties involved in sample alignment include the receiver. and the sender The receiver Holding sample set The sender Holding sample set .
[0024] In a vertical federated learning scenario, the sample set is used to characterize whether data from different participants belong to the same entity. To obtain a jointly trainable sample set without revealing information about non-intersecting samples from both parties, a privacy-preserving set intersection protocol is used to calculate the intersection of the samples from both parties. .
[0025] like Figure 1 As shown, the sample intersection This serves as the sample alignment result before training the subsequent vertical federated learning model.
[0026] Step 2: System initialization and generation of common parameters; After the privacy sample alignment scenario is constructed in step 1, during the system initialization phase, the security parameters required for the privacy set intersection protocol to run are set. And according to the security parameters Determine the finite field, hash function, unintentional key-value storage encoding parameters, and pseudo-random function parameters required during the execution of the privacy set intersection protocol.
[0027] The domain is set as ,in, To satisfy the safety requirements, use prime numbers or prime powers; let the number of buckets be . The bucket index space size is The length of the encoded vector is The local block size threshold is The temporary storage area of the bucket is The threshold for the temporary storage area is The system-level failure probability is .
[0028] Furthermore, two independent hash functions are selected. ,in, It is a binary string of arbitrary length. Select a lightweight pseudo-random function Selecting a key mapping function for unintentional key-value storage encoding and public mapping functions .in, Represents the key space. Representing the sample space, Represents the matching result space, Indicates the output length.
[0029] At the same time, define a value mapping function for unintentional key-value storage encoding. Therefore, the set of common parameters in this embodiment is represented as follows: The common parameters are shared by both parties to the protocol and are used for subsequent sample mapping, encoding, decoding, and pseudo-random function interaction calculations.
[0030] Step 3: Perform sample hash mapping based on a dynamically adjusted strategy; Based on the parameters set in step 2, the receiver... and the sender Perform a hash mapping on the elements in each of their respective sample sets. For any element in the union of the two sample sets... Two independent hash functions are used. and And construct a third hash function. Complete the bucket mapping. The third hash function is defined as follows: With the above construction, each sample element has three candidate bucket positions, thereby reducing the overhead of additional hash storage while maintaining sufficient randomness and bucket load balancing.
[0031] Let the bucket load vector be denoted as ,in, Indicates the first The number of elements stored in each bucket. The expected load of each bucket is... , This represents the total number of elements placed into these buckets. Let... Let represent the average load constant. To avoid overloaded buckets, based on the probabilistic upper bound analysis of bucket load distribution, the maximum bucket load threshold is defined as: When all buckets are satisfied If so, the hash mapping will continue according to the predetermined process. If a bucket satisfies... If an overload occurs, an overload bucket is identified, triggering a dynamic adjustment mechanism. This dynamic adjustment mechanism specifically includes: Step 3.1: When an overload bucket exists, write elements that cannot be placed normally in the predetermined manner to the temporary storage area. If the size of the temporary storage area meets the requirements If so, the elements in the temporary storage area will be retained and processed later; Step 3.2: If the temporary storage area size meets the requirements If this happens, a rehashing operation is triggered, and the hash mapping is re-executed for the relevant elements to restore bucket load balancing.
[0032] By employing the aforementioned dynamic adjustment strategy, the storage pressure on the hash bucket and the risk of performance fluctuations during the sample mapping stage can be reduced without significantly increasing the encoding length.
[0033] Step 4: Construct an encoded input based on an enhanced unintentional key-value store; Recipient Based on its sample set and the corresponding hash result calculated in step 3, the input for the unintentional key-value store is constructed. For any sample First, calculate its key representation. Then calculate the corresponding value to represent Thus, we obtain the key-value pair set. .
[0034] The key-value pair set It serves as the encoded input for an enhanced unintentional key-value store, used to construct encoded data structures.
[0035] Step 5: Perform the first stage of encoding for unintentional key-value storage; For linear unintentional key-value stores, the encoding function can be viewed as generating the solution to the system of linear equations: In this embodiment, for convenience, the unintentional key-value storage encoding process in step 4 is represented as a sparse linear system. ,in, The coefficient matrix, Let be the encoding vector to be determined. This is the vector on the right side.
[0036] Furthermore, the sparse linear system is represented as a bipartite graph. ,in, Represents a set of variable nodes. Represents the set of constraint nodes. Represents the set of edges.
[0037] Step 5.1: Define the algorithm state during the peeling process; Define the algorithm state during the peeling process as follows: ,in, This represents the set of remaining unsolved variable nodes. Represents the set of remaining constraint nodes. Denotes the set of remaining edges. This indicates that the variable and its set of values have been obtained.
[0038] Initially there was , , and , This represents the empty set.
[0039] Step 5.2: Calculate the residual unknowns and identify peelable constraints; Define any constraint node The residual unknowns are ,in, Indicates the first Line 1 Column samples .
[0040] In each iteration, identify all that satisfy the condition. The constraint node. For any constraint node that satisfies this condition. The corresponding equation contains only one unknown variable and can be solved directly.
[0041] Step 5.3: Solve for the unique unknown variable and perform a back-substitution update; Set constraint nodes The node corresponding to the only unknown variable in the middle is Solving for unknown variables ,in, Indicates the first The right-hand vector elements corresponding to each constraint node Represents the coefficient matrix The Middle line, number Column elements, Indicates the first The solved variable values corresponding to each variable node.
[0042] Add the obtained unknown variables to the solved set and update the formula as follows: Subsequently, for all nodes... Connected constraint nodes Perform global proxy update , ,in, Indicates the first The right-hand vector elements corresponding to each constraint node Represents the coefficient matrix The Middle line, number Column elements, Indicates the first The solved variable values corresponding to each variable node. Simultaneously, the nodes... Remove from the set of remaining unsolved variable nodes, i.e. Step 5.4: Conflict Detection and 2-core Output; If a certain constraint node Satisfies after the update and If a contradiction occurs during the encoding process, the encoding fails. When no longer satisfying the condition, the system will be considered to have encountered a problem. When the constraint node is reached, the peeling process ends. At this point, the remaining unsolved part constitutes the residual 2-core subsystem, denoted as . in, This represents the set of remaining unsolved variable nodes in the residual 2-core subsystem. This represents the set of remaining constraint nodes in the residual 2-core subsystem. This represents the set of remaining edges in the residual 2-core subsystem. Output the solution obtained from the first stage of peeling. .
[0043] Step 6: Perform the second stage of encoding for the unintentional key-value storage; For the residual 2-core subsystem obtained after the first stage in step 5, continue to perform block local Gaussian elimination.
[0044] Step 6.1: Construct the residual core factor graph and local connected components; In the remaining 2-core subsystem Above, from any unprocessed variable node Starting from this point, a locally connected component can be obtained using either breadth-first search or depth-first search. ,in, This represents the set of remaining unsolved variable nodes in a locally connected component. This represents the set of remaining constraint nodes in a locally connected component. This represents the set of remaining edges in a locally connected component. , , .
[0045] Step 6.2: Extract local subsystems; For any locally connected component Extract the corresponding local subsystem from the residual 2-core subsystem. ,in, For the reason Corresponding rows and The submatrix formed by the corresponding columns, For a vector of locally unknown variables, This is the local right-hand vector obtained by incorporating the corresponding terms of the known variables.
[0046] Step 6.3: Threshold-based block local Gaussian elimination; Preset local connectivity threshold If the locally connected components satisfy For the local subsystem Perform local Gaussian elimination on the block to obtain the exact solution for the locally connected component. .
[0047] If the locally connected components satisfy If the condition is not met, it will not be processed in this stage, but will be retained until the final residual core stage for unified solution.
[0048] Step 6.4: Back-substitution update and secondary peeling after local solution; exact solution The value is then substituted back into the constraints associated with that local connected component.
[0049] After the back substitution is completed, another round of peeling is performed to eliminate the newly generated directly solvable variables due to local solutions. This process is called secondary peeling.
[0050] Step 6.5: Final residual core solution and reconstruction of complete encoding results; For the residual cores that remain unsolved after local solutions and secondary peeling, construct the final residual system. ,in, For the submatrix in the residual system, Let the vector of local unknown variables be in the residual system. This is the local right-hand vector obtained after incorporating the corresponding terms of the known variables into the residual system.
[0051] Perform global Gaussian elimination on it to obtain the solution of the remaining variables. .
[0052] Finally, the portion obtained from the first stage of skinning was dissected. Partial solutions obtained by local Gaussian elimination of blocks and the solution of the remaining variables Merge the results to obtain the complete encoding. The final result is the sum of the peeling result, the block local Gaussian elimination result, and the residual core global Gaussian elimination result.
[0053] Step 7: Perform unintentional key-value storage decoding and interactive calculation of pseudo-random functions based on the encoded results; Obtain the complete encoding result in step 6. Afterwards, the recipient With the sender Based on the encoding result, perform unintentional key-value storage decoding and unintentional pseudo-random function interaction calculation to obtain matching results for recovering sample intersection.
[0054] Step 7.1: Recipient Unintentionally decode key-value stores; For any sample Recipient According to the query key corresponding value For the encoding result Perform the decoding operation, and then obtain the decoded value corresponding to the sample. .
[0055] Furthermore, in the construction of the unintentional pseudo-random function based on the aforementioned unintentional key-value storage, the receiver... With sample set As input, combine with the key-value pair set obtained in step 4. and the encoding result obtained in step 6 This recovers the intermediate values corresponding to each sample, providing a basis for recovering the output of the subsequent unintentional pseudo-random function.
[0056] Step 7.2: Both parties execute the unintentional pseudo-random function protocol; Assume the sender Holding a pseudo-random function key The corresponding pseudo-random function is denoted as .
[0057] For the recipient any sample Recipient Based on the decoded value obtained in step 7.1 And the protocol interaction results, recovering the corresponding pseudo-random function output. .
[0058] For the sender any sample sender Directly calculate the output of its corresponding pseudo-random function. .
[0059] During the execution of the agreement, the receiving party and the sender Generate random masks respectively and And let both sides use random mask combinations. .
[0060] The random mask is used to hide intermediate results and complete protocol consistency verification.
[0061] Step 7.3: Construct the receiver Output set and sender Target matching result set; Recipient Construct a set of pseudo-random mapping results based on its pseudo-random function output: sender Based on its sample set Public mapping functions Value mapping function and random mask combinations for both parties Construct a set of target matching results: in, Indicates the sample The decoding result, Indicates that the sample The key represents the value vector obtained by mapping. This indicates the relevant parameters generated during the protocol interaction process. This represents a random mask combination between the two parties. Through the above construction, if and only if the receiver... and the sender When the input elements correspond to the same sample, the mapping results obtained by both parties are consistent.
[0062] Step 8: Restore the intersection of samples and output the alignment result; After completing the unintentional pseudo-random function interaction in step 7, the sender Send the generated target matching result set to the recipient. The receiver then uses this information to reconstruct the intersection of the samples from both sides and outputs the sample alignment result.
[0063] Step 8.1: Sender Perform a random permutation and send the result set; To further conceal the sender The original order of the elements in the set, sent by Set of target matching results Perform random permutations The result set after random permutation is obtained. Only the order was changed; the result of the set was not affected.
[0064] Subsequently, the sender The result set after random permutation Send to the recipient .
[0065] Step 8.2: Recipient Perform matching and restore the intersection; Recipient Using the pseudo-random mapping result set constructed in step 7.3 With the sender The set of random permutation results sent Perform item-by-item matching.
[0066] For any sample If satisfied Then the sample is judged This falls within the intersection of both parties' interests. Therefore, the receiving party... The intersection of the recovered samples is represented as follows: Because if and only if From time to time Therefore, there is further Therefore, it can be concluded that the recipient The final restored set That is, the intersection of the two samples. .
[0067] Step 8.3: Output the sample alignment results; Recipient Output sample intersection This data is then used as the sample alignment result before vertical federated learning training to establish a one-to-one correspondence between the feature data of different participants.
[0068] During this process, the recipient Only obtain the intersection information of the samples from both parties, without disclosing the sender's information. Non-intersection sample information; sender Nor will the recipient be obtained In addition to the necessary information for interaction, additional data is used to meet the security requirements for privacy sample alignment.
[0069] A lightweight privacy-preserving sample alignment system for vertical federated learning includes: The sample alignment and initialization module calculates the set of samples held by the receiver using a privacy set intersection protocol. With the sender holding the sample set The sample intersection is obtained, and security parameters are set. Based on the security parameters, the set of common parameters required for the execution of the privacy set intersection protocol is determined, including finite field, hash function, unintentional key-value storage encoding parameters and lightweight pseudo-random function related parameters, which are used to implement steps 1 and 2 of the present invention. The hash mapping module allows the receiver and sender to perform hash processing on their respective sample sets. A third hash function, constructed using two independent hash functions combined with a lightweight pseudo-random function, is used to complete the bucket mapping. The module calculates the maximum bucket load threshold based on the bucket load. If the bucket load does not exceed the threshold, the hash mapping continues. If the bucket load exceeds the threshold, a dynamic adjustment mechanism is triggered to restore the bucket load balance, thus implementing step 3 of the present invention. The key-value generation module allows the receiver to construct a set of key-value pairs based on its sample set and the corresponding hash results, and to use the set of key-value pairs as the encoding input for unintentional key-value storage, in order to implement step 4 of the present invention. The encoding module represents the sparse linear system corresponding to the encoding process as a bipartite graph structure. It uses a global peeling algorithm to identify constraint nodes with a residual unknown degree of 1, iteratively solves the unique unknown variable and performs back-substitution update until peeling can no longer be performed, and outputs the set of solved variables and the residual 2-core subsystem. For the residual 2-core subsystem, it identifies local connected components, extracts the corresponding local subsystems for local connected components that meet the threshold conditions and performs block local Gaussian elimination, and performs secondary peeling. For the remaining unsolved residual cores, it performs final global Gaussian elimination to obtain the complete encoding result, which is used to implement steps 5 and 6 of the present invention. The pseudo-random function interaction module allows the receiver to construct a set of pseudo-random mapping results corresponding to its sample based on the encoding result and the sender to execute an unintentional pseudo-random function protocol. The sender then obtains a set of target matching results corresponding to its sample, which is used to implement step 7 of the present invention. The privacy sample alignment module involves the sender randomly permuting the target matching result set and sending it to the receiver. The receiver then matches the pseudo-random mapping result set with the target matching result set sent by the sender to restore the intersection of the samples and outputs the intersection as the sample alignment result of vertical federated learning, thus implementing step 8 of the present invention.
[0070] In summary, such as Figure 2As shown, this invention effectively reduces the complexity of solving sparse linear systems by introducing a dynamic adjustment strategy in the sample mapping stage and employing a two-stage encoding mechanism in the unintentional key-value storage encoding stage, including global peeling, block-local Gaussian elimination, quadratic peeling, and final residual core solving. Furthermore, by using an unintentional pseudo-random function protocol and a privacy set intersection process based on the encoding results, the intersection of samples from both sides is restored without revealing the information of non-intersection samples, thereby improving the efficiency and practicality of vertical federated learning sample alignment.
[0071] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A lightweight privacy-preserving sample alignment method for vertical federated learning, comprising a receiver and a sender participating in sample alignment, characterized in that, The method includes the following steps: Step 1: Calculate the sample set held by the recipient. With the sender holding the sample set The intersection of samples, and the set of common parameters required for the execution of the intersection protocol to determine the privacy set based on the set security parameters; Step 2: The receiver and sender respectively perform hash processing on their respective sample sets, and complete the bucket mapping by using a third hash function constructed by combining two independent hashes of the common parameter set with a lightweight pseudo-random function. Step 3: The receiver constructs a key-value pair set based on its sample set and the corresponding hash result, and uses the key-value pair set as the encoded input for unintentional key-value storage; Step 4: Represent the sparse linear system corresponding to the encoding process as a bipartite graph structure, use a global peeling algorithm to identify the constraint nodes with a residual unknown degree of 1, iteratively solve the unique unknown variable and perform back-substitution update until peeling can no longer be continued, and output the set of solved variables and the residual 2-core subsystem. Step 5: For the residual 2-core subsystem, identify local connected components, extract the corresponding local subsystems for local connected components that meet the threshold conditions and perform block local Gaussian elimination, substitute the obtained solution back into the constraints related to the local block, and perform secondary peeling; perform final global Gaussian elimination on the residual cores that are still unsolved to obtain the complete encoding result; Step 6: Based on the encoding result, the receiver and the sender execute an unintentional pseudo-random function protocol to construct a set of pseudo-random mapping results corresponding to their samples, and the sender obtains a set of target matching results corresponding to their samples. Step 7: The sender randomly permutes the target matching result set and sends it to the receiver. The receiver matches the pseudo-random mapping result set with the target matching result set sent by the sender, restores the intersection of the two samples, and outputs it as the sample alignment result of vertical federated learning.
2. The method according to claim 1, characterized in that, In step 1, the process of setting the common parameter set is as follows: Define security parameters finite field ,in, Prime numbers or prime powers that meet safety requirements; Define the number of buckets as The bucket index space size is The length of the encoded vector is The local block size threshold is The temporary storage area of the bucket is The threshold for the temporary storage area is The system-level failure probability is ; Define two independent hash functions ,in, It is a binary string of arbitrary length. ; Define a lightweight pseudo-random function ; Define a key mapping function for unintentional key-value storage encoding. Public mapping functions and value mapping function ,in, Represents the key space. Representing the sample space, Represents the matching result space, Indicates the output length; The common parameter set is represented as .
3. The method according to claim 2, characterized in that, The third hash function in step 2 is represented as follows: in, Represents the elements of the union of the two samples; Define the bucket load vector as ,in, Indicates the first The number of elements stored in each bucket, and the expected load of each bucket. , This represents the total number of elements placed into these buckets; definition The average load constant is represented as follows: The maximum bucket load threshold is represented as follows: 。 4. The method according to claim 3, characterized in that, When performing the mapping in step 2, the maximum bucket load threshold is calculated based on the bucket load. If the bucket load does not exceed the threshold, the hash mapping continues. Otherwise, the dynamic adjustment mechanism is triggered to restore the bucket load balance. The dynamic adjustment mechanism is specifically as follows: When there exists a bucket that satisfies When necessary, elements that cannot be placed normally in the intended manner will be written to the temporary storage area. If the size of the temporary storage area meets the requirements If the size of the temporary storage area is sufficient, then the elements in the temporary storage area will be retained and processed later; if the size of the temporary storage area satisfies the condition... If this happens, a rehashing operation is triggered, and the hash mapping is re-executed for the relevant elements to restore bucket load balancing.
5. The method according to claim 4, characterized in that, The construction process of the key-value pair set in step 3 is as follows: Calculate any sample element in the receiver's sample set The key represents Then calculate its corresponding value. Thus constructing a set of key-value pairs .
6. The method according to claim 5, characterized in that, The specific steps of step 4 include: The unintentional key-value storage encoding process is represented as a sparse linear system. ,in, The coefficient matrix, Let be the encoding vector to be determined. The vector on the right side; The sparse linear system is represented as a bipartite graph. ,in, Represents a set of variable nodes. Represents the set of constraint nodes. Represents the set of edges; Define the algorithm state during the peeling process as follows: ,in, This represents the set of remaining unsolved variable nodes. Represents the set of remaining constraint nodes. Denotes the set of remaining edges. This indicates that the variable and its set of values have been obtained; Initially , , and , Indicates the empty set; Define any constraint node The residual unknowns are ,in, Indicates the first Line number Column samples ; In each iteration, identify all that satisfy the condition. constraint nodes and define constraint nodes The node corresponding to the only unknown variable in the corresponding equation is Solving for unknown variables ,in, Indicates the first The right-hand vector elements corresponding to each constraint node Represents the coefficient matrix The Middle line, number Column elements, Indicates the first The solved variable values corresponding to each variable node; The obtained unknown variables Add to the solved set and update the formula as follows: Subsequently, for all nodes... Connected constraint nodes Perform global proxy update , ,in, Indicates the first The right-hand vector elements corresponding to each constraint node Represents the coefficient matrix The Middle line, number Column elements, Indicates the first The solved variable values corresponding to each variable node; at the same time, the nodes From the set of remaining unsolved variable nodes Delete; Until no satisfaction exists constraint nodes At this point, the peeling process ends, and the remaining unsolved portion constitutes a residual 2-core subsystem, denoted as... ,in, This represents the set of remaining unsolved variable nodes in the residual 2-core subsystem. This represents the set of remaining constraint nodes in the residual 2-core subsystem. Represents the set of remaining edges in the residual 2-core subsystem, and outputs the solution obtained from the first stage of peeling. .
7. The method according to claim 6, characterized in that, The specific steps of step 5 include: In the remaining 2-core subsystem Above, from any unprocessed variable node Starting from this point, a locally connected component can be obtained using either breadth-first search or depth-first search. , among which, among which, This represents the set of remaining unsolved variable nodes in a locally connected component. This represents the set of remaining constraint nodes in a locally connected component. This represents the set of remaining edges in a locally connected component. , , ; Extracting local connected components from the residual 2-core subsystem Corresponding local subsystem ,in, For the reason Corresponding rows and The submatrix formed by the corresponding columns, For a vector of locally unknown variables, This is the local right-hand vector obtained by incorporating the corresponding terms of the known variables; Set local connectivity threshold If the locally connected components satisfy For the local subsystem Perform local Gaussian elimination on the block to obtain the exact solution for the locally connected component. ; exact solution The value is substituted back into the constraints associated with that local block, and another round of peeling process is executed; For locally connected components satisfy Furthermore, for the remaining core that remains unsolved even after secondary peeling, the final residual system is constructed. ,in, For the submatrix in the residual system, Let the vector of local unknown variables be in the residual system. To obtain the local right-hand vector obtained by incorporating the corresponding terms of the known variables into the residual system, and then performing global Gaussian elimination, the solution for the remaining variables is obtained. ; The solution obtained from the first stage of peeling Exact solutions for locally connected components and the solution of the remaining variables Merge the results to obtain the complete encoding. .
8. The method according to claim 7, characterized in that, The specific steps of step 6 include: Recipient According to the query key corresponding value For the encoding result Perform the decoding operation, and then obtain the decoded value corresponding to the sample. ; In the construction of the unintentional pseudo-random function based on the aforementioned unintentional key-value storage, the receiver With sample set As input, combine the key-value pair set and encoding results To restore the median value corresponding to each sample; sender With the recipient Execute the unintentional pseudo-random function protocol and define the sender. Holding a pseudo-random function key The corresponding pseudo-random function is denoted as ; Recipient According to the decoded value And the results of protocol interaction, to recover any sample The corresponding pseudo-random function output ; sender Directly calculate any sample The corresponding pseudo-random function output ; During the unintentional execution of the pseudo-random function protocol, the receiver... Generate random mask sender Generate random mask And let both sides use random mask combinations. ; Recipient Based on its pseudo-random function output Construct a set of pseudo-random mapping results: sender Based on its sample set Public mapping functions Value mapping function and random mask combinations for both sides Construct a set of target matching results: in, Indicates the sample The decoding result, Indicates the sample The key represents the value vector obtained by mapping. This indicates the relevant parameters generated during the protocol interaction process. This represents a random mask combination between the two parties.
9. The method according to claim 8, characterized in that, The specific steps of step 7 include: sender Set of target matching results Perform random permutations The result set after random permutation is obtained. ; Subsequently, the sender The result set after random permutation Send to the recipient ; Recipient Using pseudo-random mapping result set With the sender The set of random permutation results sent Perform item-by-item matching; If any sample satisfy Determine the sample This is an intersection between the two parties, the receiving party The intersection of the recovered samples is represented as: when hour , ; Recipient The final restored set That is, the intersection of the two samples. ; Recipient Output sample intersection This data is then used as the sample alignment result before vertical federated learning training to establish a one-to-one correspondence between the feature data of different participants.
10. A lightweight privacy-preserving sample alignment system for vertical federated learning, characterized in that, Implemented by the method described in any one of claims 1-9, comprising: The sample alignment and initialization module calculates the set of samples held by the receiver. With the sender holding the sample set The intersection of samples, and the set of common parameters required for the execution of the intersection protocol to determine the privacy set based on the set security parameters; The hash mapping module involves the receiver and sender performing hash processing on their respective sample sets, and using a third hash function constructed by combining two independent hash functions with a lightweight pseudo-random function to complete the bucket mapping. The key-value generation module allows the receiver to construct a set of key-value pairs based on its sample set and the corresponding hash results, and to use the set of key-value pairs as the encoded input for unintentional key-value storage. The encoding module represents the sparse linear system corresponding to the encoding process as a bipartite graph structure. It uses a global peeling algorithm to identify constraint nodes with a residual unknown degree of 1, iteratively solves the unique unknown variable and performs back-substitution updates until peeling can no longer be performed, and outputs the set of solved variables and the residual 2-core subsystem. For the residual 2-core subsystem, it identifies local connected components, extracts the corresponding local subsystems for local connected components that meet the threshold conditions and performs block local Gaussian elimination, substitutes the obtained solution back into the constraints related to the local block, and performs a second peeling. For the remaining unsolved residual cores, it performs a final global Gaussian elimination to obtain the complete encoding result. The pseudo-random function interaction module allows the receiver to construct a set of pseudo-random mapping results corresponding to its sample based on the encoded result and the sender to execute an unintentional pseudo-random function protocol. The sender then obtains a set of target matching results corresponding to its sample. The privacy sample alignment module involves the sender randomly permuting the target matching result set and sending it to the receiver. The receiver then matches the pseudo-random mapping result set with the target matching result set sent by the sender to restore the intersection of the two samples and output it as the sample alignment result of vertical federated learning.
