Method and system for implementing a differentially private learning index

By dividing the key space into multiple regions and allocating the privacy budget inversely proportional to sensitivity, training a local CDF prediction model and injecting noise, the problems of privacy leakage and low query efficiency of learned indexes are solved, achieving efficient differential privacy protection and query performance.

CN123178404APending Publication Date: 2026-11-27JIANGSU DAMENG DATABASE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611603626.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-16
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing learning indexes pose a risk of privacy leakage, and differential privacy schemes fail to effectively utilize partition structures for differentiated privacy budget allocation, resulting in low query efficiency.

Method used

The key space is divided into multiple regions. Local sensitivity is calculated based on the number of key values ​​in each region. Privacy budget is allocated inversely proportional to the sensitivity. Local CDF prediction models with differential privacy protection are trained in each region. Noise is injected through Laplace noise or DP-SGD to calculate the extended error bound. Binary search is performed based on this bound during querying.

Benefits of technology

It achieves differentiated privacy budget allocation, reduces the impact of noise in dense areas, improves query efficiency, and ensures the accuracy and efficiency of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178404A_ABST
    Figure CN123178404A_ABST
Patent Text Reader

Abstract

The application discloses a kind of implementation method and system of differential privacy learning type index, key space is divided into several continuous disjoint regions, the local sensitivity of each region is calculated;According to the inverse ratio of sensitivity, the overall privacy budget is distributed to each region, so that the dense area obtains higher privacy budget, less noise;Train local CDF prediction model with differential privacy protection in each region, inject noise by Laplace noise or DP-SGD mode, calculate the extended error bound of each region, the sum of the maximum fitting error of model and the noise compensation term derived according to model parameter gradient and noise injection amount;Receive query key, determine the region to which the query key belongs by top-level routing;Call the DP model of the region of the query key to predict the position;With the extended error bound of each region as search radius, perform binary search, find matching key value, then return corresponding record, otherwise return empty.The application can realize differential allocation of privacy budget based on learning type index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary fields of privacy computing, database indexing, and differential privacy, and particularly to a method and system for implementing a differential privacy learning index. Background Technology

[0002] Learned indexes model database indexing as a regression problem—using machine learning models to fit the cumulative distribution function (CDF) from key values ​​to storage locations, achieving efficient location prediction. The core process involves dividing the key space into several regions, and training a local model for each region. During a query, the system routes to the corresponding region, predicts the approximate location using the model, and then performs a small-scale search within the predicted location for precise localization. Representative works include RMI (Multi-level Recursive Partitioning), PGM-index (Piecewise Geometric Model), and ALEX (Adaptive Node Splitting). All three share the common characteristic of dividing the key space into multiple regions, with each region approximated by a local model using CDF (Content-Derivative-Functional) approximation.

[0003] However, the above solutions pose a privacy risk. Learning-based indexes directly fit the key-value distribution during training, and the model parameters implicitly encode data density information. Attackers can implement: model parameter back-inference (reconstructing the key-value distribution from the model output residuals), query boundary probing (constructing key values ​​to infer record existence), and multi-model joint analysis (comparing cross-layer prediction differences to narrow the key-value range). None of the above three types of existing indexes considered privacy protection in their design.

[0004] Existing work has proposed applying differential privacy to learned indexes by adding Laplace noise to key statistics of the training data (such as data volume and value range), and then constructing an RMI index based on the noisy statistics. However, this approach has unresolved issues: First, it uses fixed partitions and applies the same amount of noise to all regions, failing to utilize the natural partitioning structure of learned indexes to achieve differentiated privacy budget allocation—dense and sparse regions receive the same amount of noise, causing the query efficiency of dense regions to be unnecessarily dragged down; Second, starting with adding noise to the data surface, the propagation path of the noise through model training is not quantitatively analyzed, and the search range during querying relies solely on empirical expansion, lacking error bound derivation based on the gradient of model parameters. Summary of the Invention

[0005] Purpose of the invention: This invention provides a method and system for implementing a differential privacy learning index, which can achieve differentiated allocation of privacy budget based on the learning index.

[0006] Technical solution: The implementation method of the differential privacy learning index of the present invention includes the following steps:

[0007] The bond space is divided into several continuous non-overlapping regions, and the local sensitivity of each region is calculated. The sensitivity is determined based on the number of key values ​​in the region; the more points there are, the lower the sensitivity.

[0008] The overall privacy budget is allocated to each area inversely proportional to sensitivity, so that densely populated areas receive a higher privacy budget and less noise.

[0009] In each region, a local CDF prediction model with differential privacy protection is trained. Noise is injected through Laplace noise or DP-SGD. The extended error bound of each region is calculated as the sum of the maximum fitting error of the model and the noise compensation term derived from the model parameter gradient and the amount of noise injection.

[0010] Receive the query key and determine the region to which the query key belongs through the top-level route;

[0011] The DP model of the region to which the query key belongs is called to predict the position. The DP model is a local CDF prediction model trained in each region with differential privacy protection, which is used to predict the position of the query key in the original ordered data array.

[0012] Perform a binary search with the extended error bound of each region as the search radius. If a matching key value is found, return the corresponding record; otherwise, return empty.

[0013] Furthermore, the region partitioning method can be equal-key range partitioning, equal-key quantity partitioning, or adaptive recursive partitioning.

[0014] Furthermore, for each region, the local sensitivity is calculated as the reciprocal of the number of key values ​​within the region.

[0015] Furthermore, the overall privacy budget is allocated to different regions in inverse proportion to their level of sensitivity. ,make sure Furthermore, regions with lower sensitivity are allocated more ε, meaning less noise. For the first Privacy budgets for each region For the overall privacy budget, and The first The and the first Local sensitivity of each region , For area code, This indicates summation over the entire region.

[0016] Furthermore, injecting noise via Laplace noise or DP-SGD specifically involves: when using the Laplace mechanism, adding Laplace noise with a scale equal to the ratio of parameter sensitivity to the region privacy budget to the model parameters whose sensitivity has been pruned and limited; when using DP-SGD, pruning single-sample gradients to a threshold value. The standard deviation is added to the batch gradient aggregation values. Gaussian noise was detected, and privacy loss was calculated using a privacy accountant.

[0017] Furthermore, local CDF prediction models are trained as linear regression models or shallow neural network models in each region, and Laplace noise is applied to the model parameters. , This is the parameter vector of the model without noise. This is the model parameter vector after adding noise. Indicates the first Privacy budgets in each region, Given the maximum privacy budget for each region, and assuming that the data from each region are mutually exclusive, the overall index satisfies the parallel combination theorem. -Differential privacy; because Therefore, it also satisfies - Differential privacy.

[0018] Furthermore, the formula for calculating the noise compensation term is as follows: ,in For slope parameter sensitivity, Here, δ represents the sensitivity of the intercept parameter, and δ represents the confidence parameter. For the first Noise compensation items for each area, The maximum absolute value of the input keys within this region. This is the area code.

[0019] Furthermore, if only a single DP model is used, the return value here is the final prediction; if ensemble is enabled, the regional budget will be used. Assigned to Each sub-model uses data from the same region and independently samples Laplace noise, and each sub-model obtains... According to the order combination theorem, the total privacy loss in this area does not exceed the budget. When querying, take the median of the predicted positions of each sub-model. , For the first The predicted locations of each DP sub-model are used to reduce the impact of individual extreme noise samples on the results.

[0020] Furthermore, using the pre-calculated extended error bounds for each region as the search radius, in the original data array... Perform a binary search within a range that contains the target's actual storage location with probability (1-δ). If a matching key is found, return the corresponding record; otherwise, return null. For query key, For DP model targeting query key The predicted position of the original data array.

[0021] Correspondingly, an implementation system for a differential privacy learning index includes: a partition sensitivity calculation module, which divides the key space into multiple regions and calculates the local sensitivity of each region based on the number of key values; a privacy budget allocation module, which allocates the privacy budget of each region inversely proportional to the sensitivity; a differential privacy model training module, which trains a local CDF prediction model with differential privacy protection in each region; a noise-aware error bound calculation module, which calculates the extended error bound including model error and noise compensation terms based on the model parameter gradient and noise injection amount; a query execution module, which receives the query key, routes to the region, obtains the prediction position, and returns the result with the extended error bound as the search range; and a private model integration module, which manages multiple independent DP sub-models and performs median ensemble prediction during queries.

[0022] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) Under the constraint of the total privacy budget, the budget of each region is allocated inversely proportional to the sensitivity. Dense regions therefore obtain more privacy budget, i.e., less noise, while sparse regions obtain less budget, i.e., more noise. This differentiated strategy concentrates the scarce privacy budget in the region with the largest query volume, realizing the on-demand delivery of noise; (2) The upper bound of the prediction offset caused by noise is derived, and then the extended error bound is obtained. When querying, the extended error bound is used as the search range to ensure that the target record is correctly hit with a certain probability, ensuring the necessary correctness of DP after adding noise. It is neither a simple expansion of the range nor empirical parameter tuning, but a quantitative compensation based on sensitivity and noise amount; (3) Training in the same region Each sub-model has a DP sub-model, and each sub-model independently samples Laplace noise and uses it separately. Privacy budget; according to the order combination theorem, the cumulative privacy loss in this area does not exceed When querying, the median of each predicted position is taken to reduce the impact of a single extreme noise sample on the result. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the system architecture of the present invention.

[0024] Figure 2 This is a schematic diagram illustrating the regional sensitivity weighting of the present invention.

[0025] Figure 3 This is a schematic diagram of the private model integration process of the present invention. Detailed Implementation

[0026] An implementation method for a differential privacy-preserving learning index includes the following steps:

[0027] Step 1: Partitioning and Sensitivity, dividing the key space Divide into m consecutive non-overlapping regions The partitioning method can be selected from equal-key range, equal-key number, or adaptive recursion. For each region... Calculate local sensitivity ,in This represents the number of key-value pairs within the region. Sensitivity here measures the number of key-value pairs within the region. The maximum impact of adding or deleting any record on the CDF prediction function. Larger dense regions (nk) → weak marginal impact of a single record → Small; sparse region nk small → a single record is of paramount importance → big.

[0028] When using fixed-width / equal-key partitioning, the partition boundaries are based on and (The publicly available global scope of the key space) or the target number of keys (independent of specific data values) should not expose any data distribution information. If adaptive recursive partitioning (dynamically splitting based on model error within the region) is required, differential privacy quantiles or Laplacian noise thresholds should be used to ensure that the partition boundaries themselves do not leak privacy.

[0029] Step 2: Privacy budget allocation. Under the constraint of the overall privacy budget ε_total, allocate the budget to each region inversely proportional to sensitivity: This formula ensures Furthermore, regions with lower sensitivity receive more ε (less noise). Intuitively: smaller dense regions S → larger 1 / S → Larger S indicates lower noise; sparse region S large → 1 / S small → Smaller → Larger noise. If uniform distribution is used ( If the privacy budget is wasted in dense areas and insufficient in sparse areas, then the differential allocation of this invention is superior to uniform allocation.

[0030] Step 3: DP training and error bound compensation in each region Internally trained local CDF prediction model (linear regression) (Or a shallow neural network). Apply Laplace noise to the model parameters: Ensure the model meets - Local differential privacy. Since the data in each region are non-overlapping, according to the parallel combination theorem of differential privacy, the overall index satisfies... .

[0031] Noise injection causes the model parameters to deviate from the true values, resulting in a shift in the predicted position. To quantify this shift, a first-order Taylor expansion is performed on the model output: Prediction Shift. Substitute the parameter sensitivity and We derive the upper bound of the prediction error caused by noise: , where δ = Confidence parameters. Extended total error bound. .

[0032] Step 4: Routing. Receive the query key k and determine the region to which k belongs using the top-level routing function. .

[0033] Step 5: Prediction, calling the region The DP model is used to calculate the predicted location. If only a single DP model is used, the return value here is the final prediction. If ensemble is enabled (optional), the regional budget will be used. Assigned to Each sub-model uses data from the same region and independently samples Laplace noise, and each sub-model obtains... The budget; according to the order combination theorem, the cumulative privacy loss in this area does not exceed The query retrieves the median of the predicted locations from each sub-model. This is to reduce the impact of a single extreme noise sample on the results.

[0034] Step Six: Search and Return, based on the pre-calculated results in Step Three. The search radius is the radius of the original data array. Perform a binary search within the specified range. Because... The noise compensation term is already included, and this range contains the target's true storage location with probability (1-δ). If a matching key value is found, the corresponding record is returned; otherwise, an empty string is returned.

[0035] Experimental environment: 100,000 skewed key values, normalized to [0, 1], divided into 5 non-overlapping, non-equal-width key range regions according to the boundaries listed in Table 1, encoded as Z0–Z4; comparison baselines: Plain (no DP), NaiveDP (ε-uniform distribution), DP-Learned (sensitivity-weighted according to this scheme), and DP-Learned + Ensemble (T=5 median ensemble). Unless otherwise specified, the query scale was 5,000 random point queries.

[0036] Example 1: Construction and querying of differential privacy learning index;

[0037] This embodiment demonstrates the complete implementation process of density-sensitivity coupling allocation and error boundary compensation, such as Figure 1 and Figure 2 As shown.

[0038] Step 1: Partitioning and Sensitivity. Divide the bond space [0, 1] into 5 non-equal-width bond range regions according to the boundaries listed in Table 1, and calculate the sensitivity of each region. (nk represents the number of keys within the partition). Partition parameters and sensitivity values ​​are shown in Table 1:

[0039] Table 1 Partitioning parameters and sensitivity values

[0040]

[0041] The interval width and number of bonds of Z0 and Z4 differ by about 10 times, while the bond density within a unit bond range is approximately the same.

[0042] Step Two: Allocate the privacy budget, according to the formula. distribute. hour:

[0043] Table 2 Privacy Budget Allocation

[0044]

[0045] Z0 received a privacy budget 4.00 times the average of the other four regions (0.500 vs. average 0.125), corresponding to Figure 2 Vertical axis.

[0046] Step 3: DP training and error bound compensation, training the linear regression model within each region. Laplace noise is applied to the parameters: ,in , Z0 intercept noise scale Z4 is The difference is approximately 10 times. Simultaneously, the error limits for each region are calculated:

[0047] Table 3 Error boundaries for each region

[0048]

[0049] The noise ratio is 5.24 (Z0 vs sparse region mean).

[0050] Items exceeding This is an inherent bias in linear models; using neural networks can significantly reduce this bias. To become dominant.

[0051] Step 4: Routing, query key k to route to the region.

[0052] Step 5: Prediction, call the DP model for this area to calculate the predicted location. .

[0053] Step Six: Search and Return Use a binary search within the search range to return matching results.

[0054] Performance data – Comparison of search range under multiple ε levels (5,000 queries):

[0055] Table 4 Comparison of Search Scope

[0056]

[0057] Plain baseline: error 35.3, search range 97.6. DP-Learned outperforms NaiveDP across all ε values; success rate is 100% for all solutions.

[0058] Performance data – Search range quantiles (ε=0.1, 5,000 queries):

[0059] Table 5. Search Range Quantiles

[0060]

[0061] DP-Learned concentrates its privacy budget on dense areas, reducing the search range of the most common 50% of queries (P50) from 797.4 in NaiveDP to 382.9 (a 52% reduction). The search range for queries above P75 that fall in sparse areas is correspondingly increased. This is a necessary trade-off in differentiated targeting—increasing the search overhead of a small number of sparse area queries in exchange for a significant acceleration of the majority of dense area queries. The overall mean is still better than NaiveDP.

[0062] Ablation Comparison – The Necessity of Error Boundary Compensation (ε=0.1, 3,000 queries):

[0063] Table 6. Necessity of Error Boundary Compensation

[0064]

[0065] Without compensation, nearly one-fifth of queries were missed, indicating that under the experimental setup, error boundary compensation can reduce the missed query rate after adding noise to the DP.

[0066] Example 2: Denoising through private model integration;

[0067] like Figure 3 As shown, in step three of Example 1, instead of generating a single DP model for each region, five sets of Laplace noise are independently sampled to generate five sub-models with different parameters. During the query, the key value is fed into the five sub-models of the same region for prediction, and the median is taken as the final position. The search range is the maximum value of the error bound of each sub-model.

[0068] Ablation Comparison – Ensemble vs. Single Model (ε=0.1, 3,000 queries):

[0069] Table 7 Ablation Comparison

[0070]

[0071] The median's suppression effect on the Laplace thick-tailed distribution is most significant at P95 (1.359 times improvement), consistent with the theoretical analysis, as indicated by the bottom label in Figure 3.

[0072] A summary of the integration effects under multiple ε levels:

[0073] Table 8 Overview of Integration Effects under Multiple ε

[0074]

[0075] The stronger the privacy protection (the smaller the ε), the greater the integration gain; at high ε, the noise is already very weak, and the integration gain becomes zero—consistent with expectations. (Integration in progress) Each sub-model uses data from the same region, and each sub-model is allocated... Privacy budget; according to the order combination theorem, the cumulative privacy loss in this area does not exceed Tables 7 and 8 can only be compared with a single model with the same total budget if each sub-model actually uses the above budget.

[0076] Correspondingly, an implementation system for a differential privacy learning index includes: a partition sensitivity calculation module, which divides the key space into multiple regions and calculates the local sensitivity of each region based on the number of key values; a privacy budget allocation module, which allocates the privacy budget of each region inversely proportional to the sensitivity; a differential privacy model training module, which trains a local CDF prediction model with differential privacy protection in each region; a noise-aware error bound calculation module, which calculates the extended error bound including model error and noise compensation terms based on the model parameter gradient and noise injection amount; a query execution module, which receives the query key, routes to the region, obtains the prediction position, and returns the result with the extended error bound as the search range; and a private model integration module, which manages multiple independent DP sub-models and performs median ensemble prediction during queries.

Claims

1. A method for implementing a differential privacy learning index, characterized in that, Includes the following steps: The bond space is divided into several continuous non-overlapping regions, and the local sensitivity of each region is calculated. The sensitivity is determined based on the number of key values ​​in the region. The more points there are, the lower the sensitivity. The overall privacy budget is allocated to each area inversely proportional to sensitivity, so that densely populated areas receive a higher privacy budget and less noise. In each region, a local CDF prediction model with differential privacy protection is trained. Noise is injected through Laplace noise or DP-SGD. The extended error bound of each region is calculated as the sum of the maximum fitting error of the model and the noise compensation term derived from the model parameter gradient and the amount of noise injection. Receive the query key and determine the region to which the query key belongs through the top-level route; The DP model of the region to which the query key belongs is called to predict the position. The DP model is a local CDF prediction model trained in each region with differential privacy protection, which is used to predict the position of the query key in the original ordered data array. Perform a binary search with the extended error bound of each region as the search radius. If a matching key value is found, return the corresponding record; otherwise, return empty.

2. The implementation method of the differential privacy learning index as described in claim 1, characterized in that, The region partitioning method can be equal-key range partitioning, equal-key quantity partitioning, or adaptive recursive partitioning.

3. The implementation method of the differential privacy learning index as described in claim 1, characterized in that, For each region, the local sensitivity is calculated as the reciprocal of the number of key values ​​within the region.

4. The implementation method of the differential privacy learning index as described in claim 1, characterized in that, The overall privacy budget is allocated to each region inversely proportional to its sensitivity. ,make sure Furthermore, regions with lower sensitivity are allocated more ε, meaning less noise. For the first Privacy budgets for each region For the overall privacy budget, and The first The and the first Local sensitivity of each region , For area code, This indicates summation over the entire region.

5. The implementation method of the differential privacy learning index as described in claim 1, characterized in that, Injecting noise via Laplace noise or DP-SGD specifically involves: when using the Laplace mechanism, adding Laplace noise with a scale equal to the ratio of parameter sensitivity to the region privacy budget to the model parameters after sensitivity limitation by pruning; when using DP-SGD, pruning single-sample gradients to a threshold. The standard deviation is added to the batch gradient aggregation values. Gaussian noise was detected, and privacy loss was calculated using a privacy accountant.

6. The implementation method of the differential privacy learning index as described in claim 1, characterized in that, In each region, local CDF prediction models are trained as either linear regression models or shallow neural network models, and Laplace noise is applied to the model parameters. , This is the parameter vector of the model without noise. This is the model parameter vector after adding noise. For the first Local sensitivity of each region Indicates the first Privacy budgets in each region, Given the maximum privacy budget for each region, and assuming that the data from each region are mutually exclusive, the overall index satisfies the parallel combination theorem. - Differential privacy; because Therefore, it also satisfies - Differential privacy.

7. The implementation method of the differential privacy learning index as described in claim 1, characterized in that, The formula for calculating the noise compensation term is: ,in For slope parameter sensitivity, Indicates the first Privacy budgets for each region Here, δ represents the sensitivity of the intercept parameter, and δ represents the confidence parameter. For the first Noise compensation items for each area, The maximum absolute value of the input keys within this region. This is the area code.

8. The method for implementing a differential privacy learning index as described in claim 1, characterized in that, If only a single DP model is used, the return value here is the final prediction; if ensemble is enabled, the regional budget will be used. Assigned to Each sub-model uses data from the same region and independently samples Laplace noise, and each sub-model obtains... The budget for this area is limited to a cumulative privacy loss of no more than [amount missing]. When querying, take the median of the predicted positions of each sub-model. , For the first The predicted location of each DP sub-model.

9. The method for implementing a differential privacy learning index as described in claim 1, characterized in that, Using the pre-calculated extended error bounds of each region as the search radius, in the original data array... Perform a binary search within a range that contains the target's actual storage location with probability (1-δ). If a matching key is found, return the corresponding record; otherwise, return null. For query key, For DP model targeting query key The predicted position of the original data array.

10. A system for implementing the differential privacy learning index method as described in claim 1, characterized in that, include: The module for calculating the sensitivity of a partition divides the key space into multiple regions and calculates the local sensitivity of each region based on the number of key values; the module for allocating the privacy budget to each region inversely proportional to the sensitivity; the module for training the differential privacy model to train a local CDF prediction model with differential privacy protection in each region; and the module for calculating the noise-aware error bound to calculate the extended error bound that includes model error and noise compensation terms based on the gradient of the model parameters and the amount of noise injection. The query execution module receives the query key, routes it to the region, obtains the prediction location, and returns the result with the extended error bound as the search range; the private model integration module manages multiple independent DP sub-models and performs median integrated prediction during the query.