Manuscript Offprint
arXiv:2611.04776Differentially Oblivious Priority Queues with Sublogarithmic Cost
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
In this paper, we study exact online integer priority queues under differential obliviousness in the balls-and-bins model. Given a public upper bound on the number of operations and assuming that the priorities are bounded by a polynomial in , we construct an -differentially oblivious priority queue supporting insertion and minimum extraction, which requires polylog() private memory. For constant and , our construction incurs expected amortized total work per operation, which breaks the barrier for fully oblivious priority queues [Jacob et al., SODA'2019]. Further, we prove a matching lower bound for -differentially oblivious priority queues with and , which indicates that our construction is asymptotically optimal in terms of total work.
1 Introduction
Priority queues (or heaps) are fundamental data structures in the design of algorithms. They support insertion and extraction of a minimum-priority record and are central to algorithms for shortest paths and minimum spanning trees [1]. Starting from an empty queue, for an online sequence of at most operations, an ordinary heap (e.g., binary heap, Fibonacci heap) supports both operations in runtime [2]. This logarithmic cost is optimal in the comparison-based model, since insertions followed by minimum extractions sort the inserted records.
In commonly used constructions, the memory access traces on RAM induced by operations depend on the stored priorities. Observing these memory accesses may therefore reveal information about the priorities even when the records themselves are encrypted. Full obliviousness [3] protects against this leakage by requiring access patterns to be indistinguishable for operation sequences with the same public parameters. Shi's Path Oblivious Heap [4] and the bandwidth-optimal heap by Jafargholi, Larsen, and Simkin [5] give elegant oblivious priority queues with amortized word transfers per operation. Their per-operation cost matches the optimal runtime of non-oblivious comparison-based priority queues.
For polynomially bounded integer priorities, non-oblivious priority queues can achieve amortized operation time. Integer priority queues [6] exploit word operations beyond comparisons. With priorities bounded by and -bit words, radix sort sorts priorities in time, bypassing the barrier for comparison sorting. Thorup's reduction from priority queues to sorting then yields the constant amortized bound [7]. However, this improvement does not extend to full obliviousness. In the standard online model with observable call boundaries, Jacob, Larsen, and Nielsen [8] prove an expected amortized probe lower bound, even for polynomially bounded integer priorities and polylogarithmic private memory.
†Authors are listed in lexicographical order. Zhechen Li is the corresponding author.
This gap motivates us to consider differential obliviousness (DO), which relaxes full obliviousness by requiring -differential privacy [9] for the access patterns of neighboring inputs [10, 11]. Chan et al. [10] show that DO can improve asymptotic complexity over full obliviousness with constant and negligible . For example, they give stable one-bit sorting in time with constant private storage in the balls-and-bins model, improving on the bound for full obliviousness. Whether these gains extend to integer priority queues with polylogarithmic private space remains open. Therefore, we consider the following question with constant and negligible .
Can any -DO integer priority queue achieve cost with polylogarithmic private space?
Theorem 1.1 (Upper bound, informal). Let and . For any constant , there exists an online priority queue that supports and operations with integer priorities bounded by , satisfies -differential obliviousness, incurs amortized total work in expectation, and requires only polylog() private words.
Further, we provide a matching lower bound, stated in the following theorem.
Theorem 1.2 (Lower bound, informal). For and , any exact online -DO priority queue in the balls-and-bins model, with integer priorities in , -bit words, and polylog() private words, requires expected amortized probes per operation.
Table 1 compares the operation costs in the comparison and integer settings, where non-oblivious costs are measured on the ordinary RAM, and oblivious constructions may use polylogarithmic private storage.
| Privacy guarantee | Comparison-based PQ | Integer PQ |
|---|---|---|
| Non-oblivious | [7] | |
| Fully oblivious | [4, 5, 8] | [4, 5, 8] |
| Differentially oblivious | (our work) |
Table 1. Expected amortized cost of priority queues in the balls-and-bins model. The fully oblivious upper bounds allow inverse-polynomial correctness error [4, 5], while our construction is exact.
2 Preliminaries
A priority queue stores records of the form , where is a priority and is its payload. Given a priority queue , it supports the following operations:
-
adds the record to .
-
removes and returns a minimum-priority record, or returns if is empty. Ties are resolved by insertion order.
Operations arrive online, and is a public upper bound on their number. We write for any and assume priorities lie in for a public . To break ties, we assign each inserted record a key , where is its priority and is the index of its insertion operation. Keys are distinct and are compared lexicographically.
By concatenating fixed-length binary encodings of and , we identify keys with integers in the public universe , where . This encoding preserves lexicographic order. All constructions below use these encoded keys .
2.1 Computation model and access patterns
Let be a (randomized) RAM-implemented algorithm. For an input , we use to denote the pattern, i.e., the chronological sequence of observable physical memory accesses made during its execution. Each access records its address and read/write type.
Given , the specific content of depends on the observation surface. We use the client-server setting widely adopted in oblivious RAMs [3, 12], in which a client with private memory accesses a passive server. Under this setting, only the server-side accesses are observable to the adversary, while the client-side accesses remain hidden. For an operation sequence of length , we write , where lists the server accesses made during the -th operation and may be empty. This grouping reveals operation boundaries. Operation types, private arguments, outputs, and elapsed time are not included in the trace.
Throughout the paper, we adopt the balls-and-bins model [10, 11], and assume that the payloads of all priority queue nodes are opaque balls that may be stored, moved, copied, or discarded, but cannot be split or jointly encoded. For storage, we assume the word size to be -bit, and each record, including its key, opaque payload, and metadata, occupies words. Computations on keys and metadata follow the word-RAM model with constant-time multiplication [13, 14].
Cost model Based on the settings above, reading or writing any single server word costs one probe. The bandwidth cost is the number of words transferred between the client and the server and is within a constant factor of the probe count. The total work counts all client word operations and server probes. Private space counts all persistent and temporary client storage, including input/output registers and retained answers. Encryption and decryption of server-side data are implicit and omitted from our description. The primitive instructions are specified in Appendix B.
2.2 Obliviousness and differential obliviousness
Given the observation model defined previously, (full) obliviousness requires the distributions of and to be statistically indistinguishable for any two inputs with the same public parameters. The formal definition is as follows.
Definition 2.1 (Obliviousness [3]). Given a security parameter , a randomized RAM-implemented algorithm is (statistically) oblivious if for every pair of inputs with the same public parameters,
where denotes the statistical distance, and is an unspecified negligible function, i.e., holds for every constant .
Differential obliviousness [10, 11] relaxes this requirement by replacing the statistical indistinguishability with differential privacy [9] on the access patterns of neighboring inputs. The neighboring relation specifies which changes to an input are protected.
Definition 2.2 (Differential obliviousness [9, 10]). Let be a symmetric neighboring relation on . For and , a RAM-implemented algorithm is -differentially oblivious (()-DO for short) if satisfies -differential privacy (()-DP for short), i.e., for every pair and every measurable set of finite access patterns,
In Definition 2.2, probabilities are over the internal randomness of . Similar to DP, for -DO, smaller and provide stronger privacy guarantees.
Within our scope, for a priority queue, an input is an operation sequence , where and each is of the form or . We write for the length of . Without loss of generality, we assume that any priority queue starts with an empty initial state. Nonempty initial contents can be represented by an insertion prefix in an order consistent with tie breaking. Then two operation sequences and with the same public parameters and equal length are neighboring, written , if there is at most one index with . The differing operation may change its type and private fields.
Finally, we introduce two properties of DP, which are used in our analysis.
Theorem 2.3 (Sequential composition [15]). Let satisfy -DP and -DP, respectively, under the same neighboring relation using independent randomness. Then their joint mechanism satisfies -DP.
Theorem 2.4 (Post-processing [15]). Let satisfy -DP. For any fixed function , the composition also satisfies -DP.
3 Overview
For the upper bound, i.e., the construction of DO priority queue, we consider a preprocessing-based scheme. Specifically, our main idea is to prepare a small private working set for each epoch of operations. We first consider public operation types. At each epoch's start, the working set contains the live records with the smallest keys, or all live records if fewer remain. These records, together with new insertions, suffice because the epoch contains at most extractions. Records from completed epochs remain on the server even after extraction, with their deletion state tracked separately.
The server organizes these historical records into a hierarchy of segments, each sorted by key and partitioned into bins of slots. A segment's capacity is the number of operations in the epoch interval it covers. Capacities grow by a factor between levels, which ensures the number of levels to be . At an epoch boundary, that epoch's insertions form a new segment, and a public base- carry rule determines which segments merge into a larger segment. Each level has at most segments between epoch boundaries, and each operation position belongs to at most one created segment per level.
On the client, new insertions enter a stash of at most records, each with a live bit. Each segment has a private local set containing its prefetched records that are still live. An integer index maintains the keys of all live stash records and all records in the local sets. Under our word-RAM assumptions, this polylogarithmic-size index supports insertion, deletion, and minimum selection in constant time [14]. An extraction removes the minimum record from the index and clears its stash live bit or increments its segment's private extraction counter. Subsequent extractions from a segment remove a prefix of the records that were live at its creation, so this counter suffices to track those deletions while preserving the original records.
To prepare these local sets for the next epoch, we seek a key cutoff whose prefix contains enough live records. The cutoff and bin boundaries depend on private counts, so accesses based directly on those counts would leak information. We instead construct a differentially private summary for each segment, estimating the number of its original records with key at most (Lemmas 4.5 and 4.6). These include records extracted before the segment was created. Changing one insertion can change later extraction results, but only segments containing that insertion have different multisets of inserted keys for summary construction. The old summaries determine new bin boundaries during a merge. The new summary is computed afresh from the original records, maintaining the same error guarantee across levels.
To obtain estimates of live counts from these historical counts, we maintain a separate segment tree over the key universe on the server. It stores an estimate of the number of live records with key at most . An extraction removes one record from every nonempty key prefix, so its effect on all prefix counts is the pointwise map , independent of the extracted key. The tree applies this update lazily at its root and incorporates changes to the segment summaries at epoch boundaries. Summing the current segment summaries estimates the total historical insertion count at each key threshold. The error bound also accounts for the at most stash insertions not yet represented. The reflection lemma transfers this historical-count error bound to the live-count estimate with only a constant-factor loss, independent of the number of extractions (Lemma 5.1).
We choose large enough to absorb the aggregate summary error, so the live-count error is . Searching for the first key at which crosses plus an error margin supplies a prefix containing at least live records and bounds the excess by . If no crossing exists, the total live count is , and the cutoff is the end of the key range. Within each segment, the client extends the previously read bin prefix to cover the cutoff and retains live copies in the local set. Reading the complete boundary bin adds at most records. Between extensions, a segment's local set only shrinks as records are extracted. Thus each local set has size , and the prefetched records suffice for exact answers throughout the next epoch (Lemma 5.3).
It remains to construct these summaries with the required error and work guarantees. The summary mechanism adds bounded noise to dyadic counts, retains nodes whose noisy counts exceed a threshold, and estimates the others by zero. The threshold and noise bound control each node's error, so dyadic prefix decomposition gives a uniform error bound on every execution. Bounded noise lets a compressed-tree scan skip nodes that cannot be retained. With our parameter choice, processing the remaining candidates takes expected work linear in the segment capacity. Quantization produces a short weighted list of positions in the key universe, keeping the resulting segment-tree updates within the same linear work bound.
To bound the joint privacy loss, we use the fact that each insertion contributes to at most one fresh summary per level. Allocating the privacy budget across levels bounds the joint privacy loss by composition. During summary generation, the sequence of whole-bin reads and padded writes is determined by public capacities and the previously released layout. The remaining accesses, including merging and prefetching, depend only on the released noisy nodes and public operation types. Thus the complete access pattern inherits the privacy guarantee of the joint releases.
The hierarchy also controls the total work. Constructing a segment takes expected work linear in its capacity (Lemmas 4.4 and 4.8). Merges process bins in private memory, where integer indexing permits linear-time sorting of each bin. Each operation position is charged for at most one construction per level, and each bin is prefetched at most once during its segment's lifetime. Our choice of also absorbs searches at epoch and bin boundaries. These charges give constant expected amortized work per level.
Once the working set is prepared, calls use the private index, with constant-cost root updates for extractions. Together with epoch maintenance, this gives expected amortized total work per operation. To remove the assumption of public operation types, a wrapper replaces each external operation with a fixed sequence of two insertions and one extraction. Auxiliary records preserve the external queue's answers, with only constant-factor overhead.
For the lower bound, we compare the entropy of the output permutation with the number of permutations compatible with a fixed access trace. Consider insertions of distinct opaque payloads with independent uniform priorities in , followed by extractions, where . An exact queue returns a permutation with entropy . For , differential privacy bounds the information that the trace Access reveals about the priorities by . Thus, for , the conditional entropy of the output permutation given Access remains (Lemma 6.2).
With private words, a fixed trace of probes supports at most output permutations. The opaque-payload restriction permits a routing description using bits per probe, input arrival, or output (Lemma 6.3). Comparing this counting bound with the residual entropy yields expected probes for . Averaging over the input distribution gives a fixed history with at least this expected cost. Taking , when the priority domain contains , gives the matching expected amortized probe lower bound.
4 DO Priority Queue Construction
This section introduces the construction of a DO priority queue. As stated in Section 2, we allow a client with polylog() storage, with accesses to that storage hidden from the adversary. We first construct a priority queue with public operation types, which we call the core, supporting Insert and ExtractMin operations. A wrapper then hides operation types by translating each external operation into the fixed sequence Insert, Insert, ExtractMin of core operations.
We first state the main guarantee.
Theorem 4.1 (DO priority queue). Fix constants and . Let and . There is an exact online -DO priority queue , where the priority range is . For every fixed sequence of calls to .Insert or .ExtractMin, it requires private words, and incurs expected total work of .
Sections 4.1–4.3 describe the core's data structures, operations, and summary construction. Section 4.4 defines the wrapper that hides operation types. Section 5 proves Theorem 4.1 and gives explicit dependence on the privacy parameters.
4.1 Data Structure and Parameters
As described in Section 3, we divide the core operation sequence into epochs of consecutive operations. At the start of each epoch, the client prefetches a set containing the live records with the smallest keys, or all live records if fewer remain. Since an epoch contains at most extractions, these records together with new insertions suffice to answer all operations in the epoch. We therefore keep current insertions in a stash, store earlier insertions in a hierarchy of sorted segments, and retain prefetched live records in local sets. The table below summarizes the five components of this construction, their locations, and their roles.
| Component | Location | Role |
|---|---|---|
| Stash | Client | Store all records inserted during the current epoch |
| Segments | Server | Store all original records from completed epochs |
| Local sets | Client | Retain copies of prefetched records as candidates for the current epoch |
| Integer index | Client | Indexes the keys of stash and local sets for minimum selections |
| Segment tree | Server | Maintains an estimate of the number of live records with key |
Stash. The stash is an array of at most entries, one for each insertion in the current epoch, of the form . Here is the encoded insertion key, is its payload, and denotes its live bit, i.e., it equals 1 if and only if the record has not been extracted. Extracted entries remain in the stash until the epoch ends.
Segment. The sorted segments, or simply segments, are organized in a hierarchical structure. Let , where is the growth factor from Theorem 4.1. The hierarchy has levels, labeled by . At the start of each epoch, each level contains at most segments, and the epoch intervals of all segments are pairwise disjoint. Thus is a public upper bound on the number of segments, including a temporary level-0 segment created at an epoch boundary. A level- segment stores all records inserted during an interval of consecutive completed epochs, sorted by key. We call these its original records, including those that have already been extracted. Its capacity bound is , the number of core calls in the interval, and its record count is the total number of insertions in that interval. Both and are public, since epoch boundaries and operation types are public.
Bin. Every level- segment is further partitioned into bins, each with physical slots. Its bin directory is an array of key boundaries
For each , bin stores exactly the original records of whose keys lie in , in increasing key order. The remaining slots are empty. In particular, when , all slots are empty. In addition to the record , each nonempty slot stores a deletion bit dead, which equals 1 if and only if the record had been extracted before was created. Each slot also carries a bit pad, equal to 1 for empty slots and 0 otherwise. The remaining contents of an empty slot are ignored.
Local sets and integer index. For each segment , the client maintains a local set of copies of the live records in a prefix of its bins. As visualized in Figure 1, contains copies of the live records in the shaded bins of segment . Reading and extending these prefixes to prepare for an epoch is called prefetching. Let denote the number of initial bins of that have been prefetched. Let denote the records that were live when segment was created, listed in increasing key order. The counter counts records extracted from since its creation, and counts the records encountered in the read prefix. After each operation, the local set satisfies
The frontiers are public, while the counters and remain private. At the start of each epoch, prefetching ensures that the union of the local sets contains the smallest live records inserted before that epoch, or all such records if fewer remain.

Figure 1: Client-server layout with . The stash and local sets are stored on the client, and provides an index for them. Segments are stored on the server, where each small rectangle is a bin with slots. Shaded bins form the prefetched prefix of each segment.
An integer set indexes the keys of all live stash records and all records in . Each key has a pointer to its record and an owner, either stash or the corresponding segment . There are entries under the parameter choices of Theorem 4.1, so the following lemma gives constant-time insertion, deletion, and minimum selection.
Lemma 4.2 (Integer sets [14]). On a word-RAM with -bit words and constant-time multiplication, there exists a data structure that maintains a dynamic set of distinct word keys using words and supports insertion, deletion, and selection in time per operation. In particular, when , these operations, including minimum selection, take constant time.
The integer set's supporting constants require setup work [14]. Section 5.3 accounts for this setup and all temporary storage.
Segment tree. To determine which bin prefixes to prefetch, we construct an implicit segment tree over on the server, allocating nodes as needed. For each , the tree maintains an estimate of the number of live records with key at most . To maintain this estimate, we associate each segment with a differentially private summary of its original records.
For the main result, fix core privacy parameters and , where is constant and . Let denote the set of records inserted during the epochs covered by segment , regardless of whether they have subsequently been extracted. Padding slots are excluded, and . For all , the number of these records with key at most is . The procedure BuildSummary(r) ignores deletion bits and uses fresh randomness to produce a differentially private vector of noisy counts for selected key intervals. From this vector and public parameters, it derives a weighted list with positions in and nonnegative weights . This list represents the cumulative summary function
Here is a differentially private estimate of the true prefix count . The count quantization step is . The list has entries of weight and a final entry at of weight , which may be zero. Positions may repeat.
The summary construction uses a conceptual complete binary tree obtained by recursively bisecting down to individual keys. This dyadic count tree has levels and is distinct from the segment tree maintaining . Choose fixed positive integers and . Let be the least power of two at least , and set
Here determines the geometric sampling probability in Section 4.3, and caps each geometric draw. The ratio controls the probability that an uncapped draw exceeds . Define the public uniform error bound for one segment summary by
On every execution, is monotone, , and . We choose the epoch length, which also determines the bin size, as
All these parameters depend only on public inputs. Sections 4.3 and 5.3 establish the summary guarantees and resource bounds for these choices.
Each vector is -DP under replacement of one original record. Its distribution depends only on the original records and fresh randomness. Both and the access pattern of its construction are postprocessing of , the existing layout determined by earlier summary vectors, and public parameters. Section 4.3 implements this interface using expected work, probes on every execution, and additional private words.
We call the segments currently installed in the hierarchy committed segments. The segment tree is updated using their summaries and the public sequence of operation types. Interval maxima and lazy updates support the choice of a key threshold that determines how many initial bins of each segment to read. Section 4.2 defines these updates and searches. The public error bound for the cumulative insertion counts used in these updates is
Here KZ accounts for the segment summaries, and B accounts for the stash records, which are not yet included in those summaries.
Each level has a separate server address range, and new segments use fresh addresses. All structures are initialized only when used.
4.2 Queue Operations
At the start of each epoch, contains the live records with the smallest keys, or all live records if fewer remain. The stash retains every insertion during that epoch. These records suffice for all calls, since at most old records can be extracted. Lemma 5.3 proves this property and gives for every .
To select the bin prefixes needed for this coverage, we maintain using the summaries and extraction counts. We describe these updates first, followed by insertion and extraction using , prefetching into , and updates to the segment hierarchy at epoch boundaries.
Prefix counts. Let count all records inserted so far with key at most , including records already extracted and those in the current stash. We estimate this count by , where ranges over the currently committed segments. An extraction decreases a positive live prefix by one and leaves an empty prefix at zero. We apply the same reflection to the estimated insertion increments. An event index includes both calls and replacements of committed segments. Each replacement is a single event. Let count all extraction calls through event , including empty ones, and write , , and for the corresponding values after that event. With , , and , we maintain
Lemmas 5.1 and 5.2 show that the first crossing of gives a prefix containing enough live records with a bounded excess.
The pointwise updates and threshold searches below are implemented by the segment tree. A suffix addition adds at all coordinates at least . A root reflection applies lazily to all coordinates. A threshold search finds the smallest coordinate with value at least , or returns if none exists. Suffix addition and search cost probes and word operations. Root reflection costs . Search uses interval maxima and does not require to be monotone in .
An extraction uses root reflection with . A stash insertion leaves unchanged. At commit, we remove the old summaries and add the new summary using suffix additions, then truncate negative values to zero by root reflection with . This order implements a single replacement event. A temporary level-0 segment is not separately committed when it is merged with other segments. The lazy transformations have the form and are closed under composition. Pure additions use a flag for . Appendix B gives the propagation details. Only a root pointer, an allocation counter, and an traversal stack remain private. Accesses and allocations depend only on released summaries and public types.
Insertions and extractions. An insertion appends its original fields and a live bit to the stash and inserts its key into . An extraction removes the minimum indexed record, or returns if the index is empty. If the record belongs to the stash, its live bit is cleared. Otherwise, it is removed from its local set and increases by one. The original fields remain available for future summaries. After calls, CloseEpoch (Algorithm 3) commits the next segment and Refresh restores the coverage property.
An index entry points to a record in the stash or in some . Adding a record to creates a private copy with owner . Representing each as a linked list supports both operations in local work, without changing server records. The original priority is the high-order component of the encoded key and is recovered by a bit shift. The counters and count calls in the current epoch and in the complete history, respectively. Both counters start at zero.
Prefetching. Each bin read transfers all slots, including padding, into a reusable private buffer. Let , and for . Then reading through bin covers all records with key at most . Only the last bin may contain larger keys. The frontier never decreases. When is first prefetched from , its index is obtained by incrementing . We retain a copy in exactly when . Existing counters continue across refreshes.
Epoch boundaries. At an epoch boundary, we create a level-0 segment of capacity . The numbers of committed segments at successive levels are the digits of a counter in base . Completing an epoch increments this counter. If no carry occurs, the new segment is committed at level 0. If the resulting carry passes through levels , we merge the level-0 segment with all segments on each of those levels into a single segment at level . The input segments are called the sources, and the output segment is their parent. The merge creates only this final parent, with no
Algorithm 1. CoreCall(op)
Input: One core operation, with private fields for an insertion Output: The exact private answer for an extraction
1
2 if op = Insert then
3 | Append a live record with encoded key and payload to stash
4 | Let refer to the new stash entry and index it in with owner stash
5 else
6 | ans
7 if then
8 |
9 | Save the priority and payload of as ans
10 | if then
11 | Set , where points to stash[j]
12 | else
13 |
14
15
16 for all
17
18 if and then
19 CloseEpoch()
20 if op = ExtractMin() then
21 return ans
intermediate segments. The number of sources is , and their total capacity is
Each position in the core operation sequence belongs to the interval of at most one created segment per level. In particular, each insertion contributes to at most summaries.
To build the new level-0 segment, we copy all stash records, including extracted ones, into a separate private buffer and sort it by key. We sort each private buffer by inserting its keys and record pointers into a temporary integer set and repeatedly deleting the minimum. The sorted records of the level-0 segment are written into one bin padded to slots, leaving unchanged. The level-0 segment descriptor has , , directory endpoints , an empty local set, and zero counters. The copy of stash[i] = retains and has dead = and pad = 0. Unused slots have pad = 1. The procedure MergeSegments builds a parent from the sources selected by the public carry. It preserves all original records, transfers their deletion state, and computes a fresh summary. Algorithm 4 gives its implementation.
Before the first completed epoch, a private binary heap implements . The segment hierarchy is empty and the estimates remain zero. At the first epoch boundary, we initialize the integer set and transfer the live entries. If , the entire history remains private and no segment is created. An
Algorithm 2. Refresh
Input: The committed segments and the reflected estimate Output: Updated frontiers, local sets, and private index 1 Find the smallest satisfying 2 If no such exists, set 3 foreach committed segment in public order do 4 5 while do 6 Read all slots of bin of into private buffer 7 foreach slot of , in physical order do 8 if .pad and .dead then 9 seen seen 10 if seen then 11 Add a private copy of to , with .owner = 12 .insert() 13
incomplete final epoch is left in the stash. Parameters and record slots are initialized only when needed. A zero-length history performs no setup.
During maintenance, the existing segment hierarchy, source counters, and stash originals remain available until the new segment and its summary are complete. Merge scans use separate counters and buffers. Commit replaces by in the hierarchy and updates in one event. It then removes the retired entries from by traversing for and the live stash entries. It does not scan unused private storage. Unmerged segments keep their state. A new segment starts with and zero counters, followed by a refresh. The current answer remains in its output register until the call returns. All simultaneous storage is counted in the space bound.
4.3 Merging and Summary Construction
Merging segments. The source summaries determine bin boundaries with at most records per output bin. A merge reads each source in order and retains at most one unfinished bin per source. Each output bin fits in private memory and can be sorted in linear work by Lemma 4.2. We first give this merge using the summary interface, then implement the interface.
A level-0 segment has one bin with boundaries . To create a parent, let be the ordered collection of source segments, including the new level-0 segment. Write and for source 's original-record count and public capacity, respectively. The parent has original-record count and public capacity , with ; the count includes records already extracted. Let . This sum is a function of released information. Let count the parent's original records with key at most . The summary interface gives and . For , let , , and
Lemma 4.3. Every parent bin contains at most original records.
Algorithm 3. CloseEpoch
Input: A completed epoch with , and public operation bound
Output: The updated segment hierarchy and local sets for the next epoch
1 if then
2 Initialize the integer-set constants and transfer live heap entries into
// Construct the replacement segment
3 Copy every stash[] into private buffer , setting dead = for its copy
4 Sort by key using a temporary integer set
5 Create a level-0 segment from , with its descriptor and counters initialized as above
6 Write to its single bin, padding to slots and leaving unchanged
7 BuildSummary() using the private sorted buffer
8 committed segments selected by the public carry
9 if then
10
11 else
12
// Replace the summaries and commit
14 foreach do
15
16
17 for all
18
19 for all
20 Replace by in the segment hierarchy
// Retire old copies and prepare the next epoch
21 Traverse the local sets of and the live stash entries, deleting their entries from
22 Release those local sets and clear stash, releasing its slots
23
24 Refresh()
Proof. Whenever is chosen as a threshold, , while the preceding integer has summary value less than . Uniform error and distinct keys give
The difference between the upper bound at and the lower bound at is at most . For the first interval, the same bound follows from . For the final nonempty interval, and either or with , so the preceding lower bound again gives the claimed capacity. Bins between repeated boundaries at contain no records. The condition gives .
Algorithm 4 constructs the data and directory before generating the new summary. Its source-specific cursors refer only to records already read. In particular, records beyond the current parent boundary remain in their source buffers. The local counter counts bins read during this merge.
The counter counts encountered records that were live when the source was created. They are separate from the stored prefetch and extraction counters.
The parent reserves fresh, nonoverlapping server regions for its data, directory, summary, and work arrays. Its descriptor stores capacity , bins, an empty local set, and zero counters. Output bins bin(q_{P,k}){k=0}^{m_0/B}q{P,k}k\mathcal{B}_rX\mathcal{O}X\mathcal{O}\mathcal{B}_rX$is reused. Source segments are traversed in a fixed public order.
The following lemma gives the merge bound needed for the amortized analysis. Together with Lemma 4.8, it shows that constructing a segment takes expected work linear in its capacity.
Lemma 4.4 (Correctness and cost of merging). Fix the parameters of Section 4.1. Let contain at most source segments satisfying the representation and summary guarantees stated there. Assume that their epoch intervals are disjoint and that they are traversed in a fixed public order. Write for their total capacity. For each source , assume that the records extracted since its creation are precisely .
The merge phase of Algorithm 4, before the call to BuildSummary(), has the following properties.
(i) The parent stores every original record exactly once in the bin prescribed by its key. Records within each bin are sorted by key. Each record's deletion bit is 1 if and only if it was extracted before the parent was created.
(ii) The phase uses word operations and probes and additional private words on every execution.
(iii) Its server access pattern is determined solely by the source summaries, source bin directories, and public parameters.
Proof. For (i), we maintain the invariant that, after writing parent bin , every original record with key at most has been output exactly once. To construct this bin, the algorithm consumes the appropriate buffered prefixes and reads each source through bin . Records with larger keys remain in , and a buffered record is removed when transferred to . Thus contains exactly the records with keys in . Sorting gives the required order, and the final boundary ensures that every original record is included.
Records marked dead in a source retain that bit. For the other records, the scan increments in the order . When is processed, , so its deletion bit is set exactly when . The assumed deletion prefix therefore gives the correct bit for every record. These bits remain attached to buffered records, and the source counters are unchanged.
For (ii), each source buffer contains only records from the last bin read from that source. Earlier bins lie entirely below the current output boundary. Each source buffer therefore occupies private words. Lemma 4.3 bounds by records. Together with the current input bin and the sorting workspace, the additional private space is .
Each physical input slot is inspected at most once, and each buffered record is transferred to the output once. There is at most one unsuccessful prefix test per source per output bin. Scanning and buffer processing therefore cost word operations. By Lemma 4.2, sorting each output bin costs word operations because . There are output bins, so sorting, padding, and writing them cost in total.
Computing a parent boundary by binary search over the key universe and the source summary lists costs word operations and probes. Locating that boundary in the source directories
Algorithm 4. MergeSegments( )
Input: Ordered sources , with counts and total capacity
Output: A complete, uncommitted parent segment
1 Reserve fresh server regions for the data, directory, summary, and work arrays of
2
3 Initialize the descriptor of as above, with record count
4
5 foreach do
6
7 for to do
8 if or then
9
10 else
11
12
13 foreach in its fixed order do
14 Move the prefix of with keys at most to
15
16 while do
17
18 Read all 2B slots of bin of into private buffer
19 foreach slot of , in physical order do
20 if then
// Account for extractions since the source segment was created
21 if then
22
23
24 if then
25
26 else
27
28 Sort by key using a temporary integer set
29 Pad to 2B slots and write the entire bin to
30 BuildSummary( )
31 return
costs . Summed over all output bins, these searches cost under the stated parameter choices. This proves the work and probe bounds on every execution.
For (iii), the source summaries determine all parent boundaries and the search paths used to find them. The source directories then determine which bins are read. Sources are processed in a fixed public order, each input bin is read in full, and each output bin is written to its prescribed location using exactly 2B slots. Directory entries are also written to prescribed locations. Keys and deletion bits affect only private computation and the contents written, so they do not otherwise affect the server access pattern. □
The parent preserves all original records, and BuildSummary recomputes their dyadic counts rather than using the source estimates as counts. Its summary therefore has error , independently of the error used to choose its bins. Accuracy does not deteriorate across levels. Successive fresh releases instead contribute to the privacy composition in Section 5.2.
Private summaries. We construct a summary satisfying the interface in Section 4.1, using the public parameters specified in Section 4.1. The mechanism uses the complete dyadic tree over , with levels. The final summary must approximate every prefix of original insertions, independently of deletion state. The scale gives each geometric draw success probability and satisfies . The parameter controls the truncation probability, and is the truncation threshold for each geometric draw.
Consider a segment containing original records, with exact cumulative count . The number is public because operation types are public. Let count original records in dyadic node , including records already extracted. Replacing one original record changes at most coordinates of the complete count vector, each by at most one. This sensitivity concerns original fields and does not depend on which records have been extracted.
Set . Conceptually, for every dyadic node independently draw two zero-based geometric variables with success probability , and define
Retain the pair exactly when . Denote the resulting sparse vector, including node identifiers and noisy counts, by . The privacy analysis concerns this sparse vector. The final summary list below is obtained by postprocessing it. The conceptual full vector is never stored by the implementation.
The operation CappedGeom() returns for a zero-based geometric variable of success probability . This draw assigns mass to and mass to . It can be sampled exactly using constant private space, at most Bernoulli trials on every execution, and at most trials in expectation. Sampling makes no server accesses. Appendix B gives the implementation using independent uniform random words.
Lemma 4.5 (Privacy of the noisy dyadic counts). Fix the public parameters of Section 4.1 and a segment containing a public number of original records. Let range over the nodes of the complete dyadic count tree on , which has levels. For each node , let count the original records of whose keys lie in its interval, including records already extracted. Set , where is the difference of two independent geometric samples with success probability , each capped at , as defined above. The noise variables are independent across nodes.
Let be the privacy parameters of the core, and let be the number of levels in the segment hierarchy. The mechanism that releases the complete vector is -differentially private under replacement of one original record in , with fixed. The retained vector satisfies the same privacy guarantee by postprocessing.
Proof. Fix two neighboring multisets of original records, and let and be their respective counts at node . Set and . Replacing one record changes at most two node counts per level, each by at most one, so . Let . The difference of two independent uncapped geometric variables has probability mass proportional to . On the changed coordinates, independent uncapped difference noises therefore give a likelihood ratio at most
Here we use and .
For each of the two neighboring inputs, define a hybrid output distribution by using uncapped difference noise at coordinates in and bounded noise elsewhere. The unchanged coordinates have identical independent distributions under the two inputs. The two hybrid output distributions therefore satisfy the preceding pure likelihood-ratio bound.
Under the coupling using the same geometric variable, a one-sided capped draw and its uncapped counterpart differ only if , an event of probability . For each input, its bounded-noise output distribution is consequently within total variation distance of its hybrid output distribution. Combining these two total variation bounds with the likelihood-ratio bound between the hybrid distributions gives additive slack at most
The first inequality uses , , and , which gives . The last inequality follows from the parameter choice . Thresholding the bounded vector to form is postprocessing. Only changed coordinates enter the comparison, so no factor for the total number of dyadic nodes appears.
Because on every execution, a node with can never be retained. The actual algorithm therefore enumerates and samples only nodes with . Its retained vector has exactly the conceptual mechanism's distribution. We call these candidate nodes heavy. At each tree level their intervals are disjoint, so their total number is at most . Their expected total sampling work is consequently
The heavy-node set and the number of rejected candidates remain private. The implementation below hides the candidates that are not retained by writing a fixed number of padded slots.
For any node, set its estimated count to if , and to zero otherwise. For , sum these estimated counts over the at most nodes in the canonical dyadic decomposition of , obtaining . Define a monotone function by clipping and taking prefix maxima, with the public total enforced at the final coordinate.
We quantize in steps of . The bound in (2) includes the quantization error. For , output the first coordinate with , with weight . Output one additional pair even when its weight is zero. The list length is fixed by , and positions may repeat. The weighted cumulative count represented by this list is , as in (1).
Lemma 4.6 (Accuracy of the segment summary). On every execution, the summary function is nondecreasing, satisfies , and obeys .
Proof. A retained node has count error at most . An absent node satisfies , hence . The zero estimate for such a node has error at most . Summing over the at most canonical nodes of any prefix gives, for every noise outcome,
Clipping to and taking prefix maxima do not increase uniform error from the monotone function . Setting preserves this bound and monotonicity. For , the quantized count is , while . Quantization loses less than , yielding error at most .
A merge combines at most summaries, so its aggregate error is at most . By the parameter choices in (3) and (4), we have and . The first inequality proves the capacity condition used by the merge. The term amortizes the searches and metadata work, as shown in Section 5.3.
Computing the summary. The procedure BuildSummary(r) scans every original record of segment in sorted bin order and ignores deletion bits. It enumerates only dyadic nodes with count at least . A compressed trie skips all other nodes and uses an private stack. After processing each physical bin , including a bin containing only padding, the scan reaches checkpoint , associated with the key interval . We add zero-weight points at bin boundaries to close all nodes whose right endpoints lie in the completed bin. Appendix A gives the iterator.
Lemma 4.7 (Heavy-node enumeration). Let be a segment of capacity containing original records stored in key order in its bins. A node of the dyadic tree over is heavy if its interval contains at least original records. There exists a streaming iterator that privately enumerates every heavy node exactly once, together with its exact count. A node whose right endpoint lies in is assigned to checkpoint and enumerated by the end of bin . Within each checkpoint, outputs are ordered by right endpoint, with ties broken by increasing height. Excluding noise sampling, the iterator uses
word operations and additional private words beyond the current bin buffer, where is the number of levels in the dyadic tree.
There are at most heavy nodes. Lemma 4.7 charges trie traversal to input records, bin boundaries, and emitted nodes.
At each bin boundary, the procedure writes exactly
slots at prescribed server addresses. It buffers retained nodes in order of right endpoint and then height, and fills unused slots with padding. Each slot contains a validity bit, a node identifier, and a noisy count. At each height, at most one node ending in a bin crosses its left boundary. The remaining heavy intervals lie inside the bin and are disjoint. Their number is at most . Thus the retained nodes at each checkpoint fit in the buffer of slots.
The reads and the number and addresses of these writes are fixed by the old layout. A retained node is assigned to the first bin boundary at or beyond its right endpoint. Its position is determined by the order of retained nodes. Thus the padded array is postprocessing of and the old layout. Rejected candidates and local sampling times cause no further server accesses. The array contains
slots and remains on the server.
To compute by a coordinate sweep, we use endpoint events , where is a sweep coordinate and is the signed increment to the running estimate at . The coordinate is a sentinel beyond the key universe.
Read the sparse slots in order. For each valid root count , write events and . For a valid left child with interval and noisy count , write
For a right child or a padding slot, write two zero events at . Also write . Each sparse slot therefore causes exactly two event writes. A left child contributes to the canonical prefix decomposition precisely between its two event coordinates. The root contributes only at V.
Sort the event array on the server by coordinate using in-place heapsort with constant workspace. The sort is postprocessing of the padded sparse array. Sum all deltas at a coordinate before updating the prefix maximum. The resulting sweep computes , with , and emits a weighted position whenever reaches the next multiple of . Advance this threshold by addition and write the final residual entry at , even when its weight is zero. Both the events and the summary remain on the server. This procedure realizes the cumulative summary in Lemma 4.6 without storing either array privately.
Lemma 4.8 (Summary construction). Fix the parameters of Section 4.1. Let r be a segment of public capacity , with its original records already stored in key order in the prescribed bins and its bin directory constructed.
The procedure BuildSummary(r) constructs the retained vector and a weighted list representing , with the privacy and accuracy guarantees of Lemmas 4.5 and 4.6. Both outputs are stored on the server. It uses expected total work. On every execution, it incurs probes and uses additional private words.
Its server access pattern is determined solely by the existing bin directory and storage addresses, the generated vector , and public parameters.
Proof. Let be the number of original records in . A node with has and can never be retained. Sampling only heavy nodes therefore produces exactly the distribution of in Lemma 4.5. The subsequent sweep and quantization construct the weighted list representing as in Lemma 4.6. This list is a deterministic function of and public parameters, which establishes the stated privacy and accuracy guarantees.
Let denote the total work of this procedure. Lemma 4.7 bounds the input scan and enumeration by word operations. Sampling each heavy node takes expected word operations. Generating the padded slots costs work and probes. Sorting the event array costs work and probes, and the subsequent sweep and quantization cost . All stored quantities fit in a constant number of words. Therefore
using , , , , and . The input scan, padded writes, event sort, and output sweep use probes for every outcome of the samples, since sampling makes no server accesses.
The private workspace consists of the current bin buffer, the iterator stack, at most buffered tuples, and a constant number of sampling and sweep registers. These occupy words on every execution. The padded array, event arrays, and summary list remain on the server.
The input scan and the addresses of the writes at each checkpoint are fixed by the existing bin directory, storage addresses, and public parameters. The retained pairs are assigned to checkpoints by their right endpoints and ordered within each checkpoint by endpoint and height. Thus the padded array is determined by and the bin directory. All subsequent event generation, sorting, and sweeping are deterministic operations on this array and public parameters. The complete server access pattern therefore has the stated dependence.
To construct a level-0 segment, we copy the stash originals and their current live bits into a separate private output buffer, sort that buffer, and use the same iterator with one bin and no server input reads. The original stash slots and their live-index pointers remain unchanged until commit. This copy is covered by the output and sorting workspace. We still write the prescribed padded sparse slots before server-side event processing.
Every segment's data, directory, sparse-event, and summary locations are initialized before use, and these writes are included in the bounds above. The prescribed checkpoint and residual slots are written even for an empty segment. Reserved address ranges are initialized only as needed.
4.4 Hiding Operation Types
We use the core as a target priority queue to implement a source priority queue with private operation types. Fix the source operation bound and priority domain , where . Here bounds external operations, and the target is instantiated with operation bound .
The wrapper's dummy records are ordinary inserted records of the target queue and contribute to its counts and summaries. They are distinct from the padding slots used in bins and summary work arrays. Every source round invokes the public target pattern Insert, Insert, ExtractMin. On source operation Insert, the wrapper inserts a real record with priority and tagged payload (real, ), followed by a guard with priority and tagged payload (guard, 0). It then performs an extraction and discards the answer. On a source ExtractMin, the wrapper inserts two records with priorities and , both tagged dummy, and performs the extraction. A real answer is returned after subtracting from its priority and removing its tag. A dummy answer is translated to .
Lemma 5.6 establishes the wrapper's correctness, privacy, and overhead bounds.
5 Analysis
We establish correctness, privacy, and resource bounds for the construction of Section 4, proving Theorem 4.1. We then extend the bounds to varying privacy parameters.
5.1 Correctness
Reflecting insertion counts. Fix a threshold . Let count all original records inserted by event with key at most , including extracted records, and let count the currently live records in that prefix. The counter counts extraction calls as in Section 4.2. All counts start at zero.
We use the event index of Section 4.2, so an extraction and a subsequent replacement of committed segments are separate events. An auxiliary event changes neither A nor N.
Lemma 5.1 (Reflection and stability). Define . Then
If an estimated process satisfies at every real and auxiliary event, define and . Then for all .
Proof. An insertion of a record with encoded key adds to . An extraction applies . Whenever , the global minimum is also at most . An auxiliary event has zero true increment. Thus , whose solution from zero is (5). If is within of , their historical minima are also within . Subtracting gives the claimed bound.
The same running-minimum identity solves the estimated recurrence in Section 4.2, including negative increments caused by summary replacements. Thus the maintained is the reflected process in Lemma 5.1.
Applying the estimate. Every original insertion outside the stash belongs to one committed segment, and the stash contains at most records. Lemma 4.6 therefore gives, at every real or auxiliary event,
This holds both before and after a replacement of committed segments. Lemma 5.1 consequently gives live-prefix error at most .
Lemma 5.2 (A cutoff for exact prefetching). Suppose . If is the smallest integer satisfying , then
If no such exists, the cutoff is and the total number of live records is less than .
Proof. The lower bound follows from the estimation error. If , minimality gives , so . Distinct composite integer keys imply . The case uses . If there is no crossing, apply the error bound at .
Segment invariant. After each core operation, the following invariant holds for every . It has been extracted if and only if , has been prefetched from if and only if , and belongs to if and only if . In particular, . The correctness proof below establishes this invariant together with exactness.
The prefix through bin covers every record with key at most , and only its last bin may contain larger keys. The frontier may extend beyond because of an earlier refresh. Since only advances, numbers records live at segment creation across all refreshes.
Lemma 5.3 (Local sets and exact online answers). After each refresh, contains the live records with the smallest keys, or all live records if fewer remain. Every segment satisfies
These sets and the next epoch's stash suffice to answer all its operations exactly.
Proof. Coverage follows from Lemma 5.2 and the complete-prefix reads. For the size bound, consider the last refresh that advanced a particular segment's frontier, and let be the cutoff used at that refresh. The segment's entire read prefix then ended at bin . At that refresh, at most live records globally had keys at most , and the segment's boundary bin contained at most additional original records. The segment receives no new insertions, so can only shrink until its frontier next advances or the segment is merged.
During the next epoch, each new insertion is retained in the stash. Each extraction selects the minimum among the local sets and live stash records and updates the corresponding or stash live bit. At most extractions occur. A newly inserted small record can delay the extraction of old records but cannot cause the st smallest old record to precede the first . Thus the retained old prefix is sufficient, including when the queue becomes empty.
Lemma 5.4 (Exactness and termination). On every random execution, the core returns exact answers and terminates. At each commit, the new segment has the correct deletion bits and the segment hierarchy together with the stash represents exactly the queue's state.
Proof. Initially all records are in the stash, so the private heap answers exactly. Suppose the segment invariant and the coverage property hold at the start of an epoch. Lemma 5.3 supplies the old records needed for that epoch, and every new insertion is indexed privately. Each extraction therefore selects the true minimum. If it removes a record from segment , that record is the next in the segment's creation-time live order. Removing it from and incrementing preserve the segment invariant. The ordinal rule of Algorithm 4 consequently transfers exactly the first deletions to the parent.
A newly committed segment starts with an empty local set and . Refresh extends each segment's previously read prefix and inserts precisely the records whose ordinals among records live at segment creation exceed . Thus refresh preserves the segment invariant without reintroducing extracted records.
Every output bin fits by Lemma 4.3. A new summary is computed from all original records. Lemma 4.6 therefore bounds its error for every noise outcome. Commit replaces the summaries in one auxiliary event and preserves the insertion-error bound. Lemma 5.1 then gives live-prefix error at most . Lemmas 5.2 and 5.3 imply that the next refresh retains enough old live records to answer the following epoch exactly. Old state is retained until the replacement is complete. Each scan and sort is finite, and each capped geometric sample uses at most trials.
5.2 Privacy Analysis
We use postprocessing and sequential composition for differentially private releases. Releases with budgets compose to budget when each release satisfies its privacy guarantee conditional on the preceding releases.
For the core, we restrict to pairs in which the differing operation is an insertion in both inputs, and denote this relation by . The operation-type sequence is treated as public.
Lemma 5.5 (Privacy of the core). For every fixed public type history, the core's complete access pattern is -differentially private under .
Proof. Fix the public type history. For every segment on the public creation schedule, let be its retained-node vector from Lemma 4.5. This vector specifies which dyadic nodes pass the noisy threshold, together with their endpoints and noisy counts. It is generated from all original insertions in the segment's fixed time interval, including records already extracted, using independent fresh samples. The final summary list is a postprocessing of this vector. The analysis uses these vectors because the sparse-event sort may reveal information not determined by the final summary lists.
If two histories differ in one insertion, only the level-0 segment and subsequent ancestor segments containing that insertion have different summary-generation inputs. There are at most such segments. Conditional on any earlier released vectors, an affected segment still applies a fresh -DP mechanism to its fixed original-record input. A segment whose input is unchanged contributes no additional privacy loss. Sequential composition therefore makes the complete retained-vector collection -DP. Physical cuts may depend on earlier vectors, but neither the membership of a segment nor the distribution of its new retained vector depends on those cuts. Payload replacements leave every summary-generation input unchanged.
The entire server trace is a postprocessing of this collection and the public type history. Merge membership and source order are public. Earlier vectors determine source summaries, parent boundaries, directories, and the physical prefixes read by a merge. During a scan that generates a new summary, each physical bin is read in full and each checkpoint writes exactly tuples to predetermined positions. The valid tuples in this group are precisely the retained nodes whose right endpoints belong to that checkpoint's interval, sorted in canonical order and padded to the fixed slot count. Their group and order are determined by the retained vector and the previously released cuts. Exact counts, rejected heavy nodes, and local discovery times are not released.
Expanding these fixed arrays into endpoint events, sorting the events, grouping equal coordinates, and producing weighted summary entries all use only the released vectors and public parameters. Metadata updates, cutoff searches, and later physical prefetch frontiers are functions of the same information. The records selected for extraction, deletion bits, ordinals among records live at segment creation, and actual record counts within bins affect private computation and server contents. They do not select server addresses. Internal instructions and their elapsed time are outside the trace model. The same information also determines which call makes each probe. Extraction updates follow the public type history, and epoch maintenance is completed within the closing call fixed by the public call counter. The sequence of call traces, including empty traces, is therefore -differentially private by postprocessing.
Hiding operation types. We now analyze the wrapper from Section 4.4, which gives each external call the same public internal type pattern.
Lemma 5.6 (Hiding operation types by fixed padding). Suppose a target priority queue is exact and, for every fixed public type sequence, its access pattern, grouped by target call, protects replacement of one insertion's private fields with differential privacy. There is an exact source priority queue with private operation codes whose access pattern, grouped by external call, is -differentially private under replacement of one complete external operation. A source history of length invokes exactly 3t target operations. The wrapper adds local word operations per source call and words to the target's private workspace at every instant. It increases record size and priority length by at most constant factors for polynomial integer domains.
Proof. Apply the wrapper of Section 4.4 to the target queue, with source operation bound T and priority domain [U].
The invariant is that no guard survives a round and the target's real records are exactly the source queue's records, with the indicated priority offset. A guard is smaller than every real record and every dummy, so an insertion round removes its guard. An extraction round removes a real minimum whenever one exists, because all dummies are larger than all real records. When there is no real record, it removes a dummy and reports an empty source queue. Residual dummies never affect a later real minimum. Insertion-order tie breaking is preserved because every real record occupies the first target insertion of its source round. The invariant proves correctness for arbitrary interleavings.
Now consider two equal-length source histories differing in one operation. Replacing the fields of an insertion changes only its first target insertion. Replacing an insertion by an extraction, or conversely, changes at most the two target insertions in that round. All later target inputs are fixed functions of the corresponding source inputs and the public round indices, independent of previous answers. Thus the encoded target histories differ in at most two insertion records and have identical public types. Denote these target histories by and , and write for the target core's access pattern, omitting the fixed algorithm superscript. Replacing these target records one at a time gives a two-edge neighboring path. The intermediate history is a valid target priority-queue history with the same type pattern, whether or not it encodes a source history. Applying the target privacy inequality twice gives, for every trace event ,
Let be the server trace of target call . Since the wrapper makes no additional server accesses, source call has trace . This fixed grouping is postprocessing of the target access pattern, so the source trace with external call boundaries visible satisfies the same privacy bound. Tag checks, discarded guard answers, and returned source answers remain private.
After round , the target contains exactly records, and its peak occupancy is at most . Its operation bound is , and every priority is at most , still polynomial in . Tags occupy constant space. The wrapper retains only the round index, the current operation code and constant-word input, and a constant-word answer. If the target uses at most private words at every instant, the source uses at most , including within a source call. Computing the target records, checking the returned tag, and translating the answer take local word operations per source call. Server space, probes, and total work are consequently preserved up to constant factors and this local overhead.
5.3 Work and Space Bounds
The two main costs are segment construction and prefetching. Every core operation belongs to at most one created segment per level. Each such segment takes expected linear work in its public capacity. Prefetching reads each bin at most once during that segment's lifetime. We show that local set updates, metadata, and initialization fit in the same bound.
Lemma 5.7 (Resource bounds). Fix a constant and with . For every fixed core history of actual length , the expected total work is , and the total probe count on every execution has the same bound. The core uses private words at every instant, including temporary workspace, and server words. All actual initialization is included.
Proof. Total work and probes. The leading cost is linear segment construction at each level. For an actual history of length , each core operation belongs to at most one created segment per level, including its temporary level-0 segment, whether or not that operation inserts a record. The total created capacity is therefore . With growth factor , the number of levels is . The remaining charges below show that boundary searches, metadata updates, and local set maintenance fit within the same bound.
For a segment of capacity , Lemmas 4.4 and 4.8 give probes on every execution and expected local word operations for construction and summary generation. This charge includes padded scans, output and directory initialization, fixed checkpoint writes, and server-side event sorting. Only the work spent on capped sampling is analyzed in expectation. The parameter bounds below give , so Lemma 4.2 makes the local index and bin operations constant per record.
During a segment's lifetime, every physical bin is newly prefetched at most once because its frontier never moves backward. Each record added to is inserted once into and the linked list representing . Extraction deletes it from both structures. At retirement, identifies the surviving entries to delete from . Each deletion is charged to its earlier insertion, and each insertion is charged to the newly prefetched physical slot. Stash insertions contribute only additional index operations. Lemma 4.2 makes their total local work . Dead original fields remain available in the stash until its epoch closes, without retaining their entries in . In particular, an epoch does not rescan unused private storage.
The total number of weighted summary entries created or removed is , absorbing the one residual entry per segment because every created segment has capacity at least . Each causes metadata probes and word operations. Computing all bin boundaries contributes . At each of at most epoch boundaries, cutoff search costs and directory searches across the current segments cost . Public extraction-root updates cost . The lazy segment tree and all these searches use constant local word work per visited node or probe. Consequently, both the expected total work and the pathwise total probe count are bounded by
| Private region | Maximum words |
|---|---|
| Segment local sets and their linked-list representations | |
| Global integer index for and live stash records | |
| Current epoch's original records and live bits | |
| One boundary-bin remainder and cursor per merge source | |
| Current input and output bins and temporary sorting set | |
| Compressed-trie stack and checkpoint tuple buffer | |
| Segment descriptors, scan counters, search stacks, commit state | |
| Integer-set constants and initialization state | |
| Noise sampler, current input and answer |
Table 2. Every private region is charged, including temporary work. Long directories, summaries, sparse event arrays, the implicit segment tree, and historical segments reside on the server. Here , , and .
Parameter bounds. For fixed and , the definitions give
Here , , and . The checkpoint bound follows from and with and . Thus , which justifies the constant-time local integer-set operations.
The choices and absorb the search terms in (6). The condition guarantees the bin and local set bounds.
Initialization and arithmetic. The algorithm uses word multiplication, comparisons, shifts, and Boolean operations. It also uses most-significant-bit queries and independent uniform random words.
Under the initialization rules of Section 4.2, private-heap operations cost each. The first completed epoch pays for the integer-set setup and transfer. Public parameter computation costs word operations on the first invocation. Record slots and auxiliary structures incur initialization costs only when used, and all masks and supporting structures are included in private space.
The division and parameter-arithmetic implementations are given in Appendix B. Each segment-specific division costs operations and is charged to a created segment of capacity at least . The quantization sweep advances its next threshold by addition, so it performs no division per event.
All historical data segments together occupy server words. Their directories, summaries, fixed sparse arrays, and endpoint-event workspaces fit within the same total segment capacity bound, even if old versions are retained. The number of lazily allocated nodes of the implicit segment tree is at most their total update and search probes, also by (6). Every actual initialization write is already charged. Server addresses therefore remain polynomial in T, as required by the word size. The server is passive, so its work is proportional to the charged reads and writes.
Private space at every instant. Table 2 accounts for all private memory, including the local integer sets and their supporting structures. Registers contain quantities of polynomial magnitude in , so each occupies a constant number of words. The integer sets have linear space by Lemma 4.2. The descriptor and list links of each record in occupy constant space, and a removed record is unlinked immediately. Also, because , , and . Even when the old queue state, new parent buffers, and temporary sorting set coexist, their combined size is .
The space bound holds for every outcome of the bounded samples. The additive privacy parameter arises from the noise distribution, while correctness and space are guaranteed on every execution.
Proof of Theorem 4.1. Let the external operation bound be , and write . Instantiate the core with operation bound and parameters
Choose a fixed positive integer and write . Since , Lemmas 5.4, 5.5, and 5.7 apply with core operation bound . Lemma 5.6 gives privacy, with and . An actual external history of length produces exactly core calls. Since , the work, probe, and space bounds change by only constant factors. The wrapper uses additional private words and local work per external call and preserves exactness and termination.
5.4 Dependence on Privacy Parameters
We extend Theorem 4.1 to privacy parameters that may depend on . The private integer sets can then grow beyond keys, so we use the general bound on the cost of each integer-set operation.
Theorem 5.8 (Explicit dependence on the privacy parameters). Fix a constant and a polynomial bound on the integer priority universe. Let , and , and define
Suppose . The privacy parameters are represented by the public integers and . These suffice to compute the construction parameters using integer arithmetic.
There is an exact online -differentially oblivious priority queue under replacement of one complete operation. For every fixed history of actual length , its expected total work is
and its total probe count on every execution is . It uses private words at every instant, including temporary workspace, and server words. Every execution terminates with exact answers, and all actual initialization is charged. The word length is . Its constant factor and the constants in these bounds may depend on and the fixed priority-universe exponent, but not on or .
For fixed and , we have and , recovering the asymptotic work bound of Theorem 4.1. Appendix C uses the same privacy and access-pattern analysis, together with the general bound on the cost of integer-set operations, to derive the stated work and space bounds as functions of and .
6 Lower Bounds
We prove a matching probe lower bound in the balls-and-bins model of Section 2.1, with observable call boundaries. The bound holds even when local computation on priorities and metadata is arbitrary and free.
Formally, we have the following theorem.
Theorem 6.1 (Lower bound). Let and . Consider an online priority queue in the balls-and-bins model with at most private words of bits each, and a priority domain containing . The queue terminates with exact answers on every execution. Payloads are one-word tokens supplied only when their insertions are invoked and returned only from private memory.
For any privacy parameters and , if is -DO under replacement of the record supplied by one insertion, then there exists a fixed sequence of operations on which incurs expected total probes.
We prove this theorem in the following subsections. Intuitively, our proof compares a lower and an upper bound on the conditional entropy of the output permutation given the trace. Differential privacy leaves substantial uncertainty about that permutation. With opaque payloads, a fixed trace and limited private storage can realize only a bounded number of permutations.
6.1 Residual Permutation Entropy
Fix distinct tokens . Let be independent and uniform on , and consider the random operation sequence consisting of operations
Let , and let be the total number of probes made by on . The sequence of returned payloads is , where the permutation is determined by and insertion-order tie breaking. Probabilities and expectations in the proof range over both and the implementation's randomness unless stated otherwise. Entropy and mutual information are measured in bits.
Letting
the following lemma shows that upper bounds the information that the trace reveals about one priority after the preceding priorities have been fixed.
Lemma 6.2 (Residual permutation entropy). Under the privacy hypothesis of Theorem 6.1, the output permutation and access pattern on satisfy
This entropy bound remains valid without payload indivisibility.
Proof. Let be the nondecreasing rearrangement of . The pair determines , since . There are possible multisets . Consequently,
To bound the information in the trace, fix and a value of . For , let be the conditional law of given and , averaging over the independent suffix . Let . For any fixed suffix, changing changes only one insertion. Averaging the privacy inequality over that suffix and then over the alternative value of gives, for every trace event ,
Also, for every trace .
Let . Applying (10) to yields
Outside , the log likelihood ratio is at most . On , it is at most . Thus the relative entropy, with base-two logarithms, satisfies
(11)
All traces are finite by termination, so their range is countable. The mixture domination above bounds the likelihood ratio even when the probe count is unbounded.
Since remains uniform conditional on , averaging (11) over bounds by . Averaging over and using the chain rule gives
The permutation is a function of , so data processing bounds by the same quantity. Subtracting from (9) proves (8).
6.2 Routing Under a Fixed Trace
The entropy bound uses only privacy and exactness. The next lemma uses the opaque-token restriction and the private-space bound to bound the number of output permutations supported by a fixed trace.
Lemma 6.3 (Fixed-trace routing). For the input family in (7), a fixed server trace v with q probes supports at most
output permutations in the opaque-payload model. Hence
Proof. The trace specifies each probe's address, read/write type, and call. For counting, we ignore the observed call boundaries and retain only the ordered probes. The input arrivals and outputs have a fixed relative order, with tokens arriving as before the outputs. The number of interleavings of these events with the probes is at most
Some interleavings may violate the observed call boundaries or the online interface. Counting all of them only enlarges the bound.
Fix an interleaving. We describe each execution by one symbol from an alphabet of size per event. The description determines an auxiliary set of at most token identities and a token label for each server word. A label is either one of or the symbol for a word containing none of these tokens. Initially is empty and every server label is . The invariant is that the decoded server labels agree with the execution and that contains every input token currently held by the client. The decoder orders the elements of by their input indices, so a choice of a resident token has an unambiguous encoding.
Only an input arrival or a read can supply a new input token to the client. The token supplied by an arrival is fixed by the input order. The token supplied by a read is fixed by the current label at the probed address. In either case, the decoder forms by adjoining that token to , if the label is not *. Since , at most one deletion is needed to restore the bound . If , at least one member is absent from the actual client state after the event, because that state holds at most distinct tokens. The description identifies one such member to delete by its position in ordered by input index. If , it specifies no deletion. There are at most choices, and the invariant is preserved. Tokens that the actual computation discards may remain in .
For a write, the description selects an element of or * as the new label at the fixed server address. There are at most choices. For an output, it selects an element of , which determines the next token of the output permutation. These events need not remove anything from . Between events, private computation can copy or discard tokens but cannot introduce a new identity. It therefore preserves containment in without further symbols. This includes arbitrary computation on priorities and metadata, whose storage we ignore in the auxiliary description.
Induction on the event sequence shows that every legal execution has such a description. Conversely, an interleaving and a description determine all auxiliary sets, server labels, and output identities from the initial state. Thus, even when private random coins and metadata differ between executions, each description determines at most one output permutation. The number of descriptions is at most . Multiplication by (14) proves (12).
For each fixed , the entropy of conditional on is at most the logarithm of its support size. Averaging this bound over proves (13). The output identities appear only in the counting argument, not in the observed trace.
6.3 Proof of the Main Lower Bound
Finally, we can provide a full proof for Theorem 6.1.
Proof of Theorem 6.1. If under (7), some fixed input in this finite family already has infinite expected cost. Otherwise, Lemmas 6.2 and 6.3 apply to the same output permutation and observed trace, giving
(15)
For and , we have . For all sufficiently large , the numerator factor is at least . Set . If , equation (15) gives .
For , a storage bound suffices. After the insertion phase, every token must have a recoverable copy, since every token will be output. At most distinct tokens can be held privately, so at least must be on the server. No input token is initially there, and each write places at most one token in a server word. Consequently on every execution, which also gives in this range. Since , both cases yield the bound in Theorem 6.1.
This expectation averages over the finite set of priority vectors . At least one fixed vector has expected probe count at least that average, with expectation now only over the implementation's randomness. Its history has the required form.
Corollary 6.4 (Optimal cost with opaque payloads). For the privacy parameters of Theorem 4.1 and a priority domain containing , the construction has optimal expected amortized probe complexity and total word-RAM work among exact opaque-record implementations with polylogarithmic private space:
Proof. Take . Every fixed polylogarithmic private-space bound satisfies for sufficiently large and . Complete-operation privacy implies privacy under replacement of an insertion's fields. Theorem 6.1 therefore gives expected probes on a fixed history of operations. This also lower-bounds total work.
For the upper bound, the construction of Theorem 4.1 can store each payload intact. Its summaries and integer-set indices operate on keys, counters, and pointers. The stash, bins, merges, and local sets only retain or copy the payloads. The wrapper's tags can be stored as separate metadata, using a constant number of words per record. Thus the construction meets the opaque-payload restriction without changing its asymptotic costs, and Theorem 4.1 supplies the matching upper bounds.
The optimality claim concerns expected amortized probes and total work, not private-space or server-space optimality or worst-case time for an individual call. With arbitrary payload encodings, Lemma 6.2 still applies, but the fixed-trace routing bound is not established.
7 Related Work and Discussions
Oblivious algorithms and data structures. ORAM gives a general method for hiding the access patterns of RAM computations [3, 12]. Wang et al. [16] use pointer and locality techniques to obtain specialized oblivious data structures, including maps, stacks, and priority queues. Such constructions exploit the restricted interfaces of data structures to improve on generic simulations. Jacob, Larsen, and Nielsen [8] establish logarithmic access lower bounds for stacks, queues, deques, and priority queues in a model where the probes of each call are observed separately. Their model allows arbitrary free local computation, so the bounds concern data movement itself.
Differential obliviousness. Chan et al. [10, 11] establish privacy and complexity tradeoffs for sorting, merging, and range queries. Beimel, Nissim, and Zaheri [17] show further separations from full obliviousness for tasks including graph property testing. Komargodski and Shi [18] give differentially oblivious Turing-machine simulations and online stacks and queues with amortized overhead in the Turing-machine model. In contrast, Persiano and Yeo [19, 20] prove logarithmic lower bounds for differentially private RAMs and develop lower-bound frameworks for other data structures. These results show that the benefits of DO depend on both the functionality and the computational model.
Composition of DO computations requires care because the outputs of a first computation on neighboring inputs need not remain neighboring. Zhou et al. [21] address this issue through neighbor-preserving differential obliviousness, and subsequent work establishes advanced composition theorems [22]. Our analysis composes DP summaries of fixed insertion histories and obtains the server trace by postprocessing these releases.
Priority queues. Thorup [6] studies integer priority queues with sublogarithmic operation bounds on a word-RAM. His later reduction [7] relates priority queues to sorting, while Wei and
Yi [23] establish an analogous connection in external memory. Beyond the logarithmic oblivious constructions discussed above, Thießen and Vahrenhold [24] obtain an oblivious priority queue with perfect security and correctness, amortized runtime, and private memory cells. Maheshwari and Shi [25] study external-memory oblivious priority queues with decrease-key operations and optimize both I/O cost and total work. Our interface consists of insertion and minimum extraction.
Private binning and merging. Private summaries and padded bins already appear in the merging algorithms of Chan et al. [11] and SWAT [26]. SWAT discusses direct merging of several binned inputs, while its analyzed construction uses iterative pairwise merging. Our construction combines summary-guided merging with summaries of original insertions and reflected live-prefix counts. This combination supports exact online extraction and bounds both total work and private workspace.
8 Conclusion
We have established tight bounds for exact online differentially oblivious integer priority queues in the balls-and-bins model. For polynomially bounded priorities, constant , and , our construction uses polylogarithmic private memory and incurs expected amortized total work per operation. The same amortized bandwidth bound holds on every execution. Differentially private summaries of insertion histories and reflection at zero enable exact minimum extraction. A matching probe lower bound, already for priorities in , combines residual permutation entropy with constraints on routing opaque records through a fixed trace.
It remains open whether the lower bound extends to implementations that jointly encode several payloads. Further questions are whether the private space can be reduced while preserving the optimal operation cost, and whether comparable worst-case bounds can be obtained for individual operations.
AI disclosure
The main results of this work were developed primarily by the authors. We use GPT-6 Astra to construct part of the lower bound results, validate the results, and draft part of the proofs. Besides, GPT was also used for polishing the texts. The authors take full responsibility for the content of the manuscript.
References
[1] Michael L. Fredman and Robert Endre Tarjan. Fibonacci heaps and their uses in improved network optimization algorithms. Journal of the ACM, 34(3):596–615, 1987.
[2] J. W. J. Williams. Algorithm 232: Heapsort. Communications of the ACM, 7(6):347–348, 1964.
[3] Oded Goldreich and Rafail Ostrovsky. Software protection and simulation on oblivious RAMs. Journal of the ACM, 43(3):431–473, 1996.
[4] Elaine Shi. Path oblivious heap: Optimal and practical oblivious priority queue. In 2020 IEEE Symposium on Security and Privacy, pages 842–858, 2020.
[5] Zahra Jafargholi, Kasper Green Larsen, and Mark Simkin. Optimal oblivious priority queues. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, pages 2366–2383, 2021.
[6] Mikkel Thorup. On RAM priority queues. SIAM Journal on Computing, 30(1):86–109, 2000.
[7] Mikkel Thorup. Equivalence between priority queues and sorting. Journal of the ACM, 54(6):28, 2007.
[8] Riko Jacob, Kasper Green Larsen, and Jesper Buus Nielsen. Lower bounds for oblivious data structures. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 2439–2447, 2019.
[9] Cynthia Dwork. Differential privacy. In Proceedings of ICALP, 2006.
[10] T.-H. Hubert Chan, K.-M. Chung, B. M. Maggs, and E. Shi. Foundations of differentially oblivious algorithms. In Proceedings of the 30th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2448–2467, 2019.
[11] T.-H. Hubert Chan, Kai-Min Chung, Bruce M. Maggs, and Elaine Shi. Foundations of differentially oblivious algorithms. Journal of the ACM, 69(4):27:1–27:49, 2022.
[12] Emil Stefanov, Marten van Dijk, Elaine Shi, Christopher Fletcher, Ling Ren, Xiangyao Yu, and Srinivas Devadas. Path ORAM: An extremely simple oblivious RAM protocol. In Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, pages 299–310, 2013.
[13] Michael L. Fredman and Dan E. Willard. Surpassing the information theoretic bound with fusion trees. Journal of Computer and System Sciences, 47(3):424–436, 1993.
[14] Mihai Pătrascu and Mikkel Thorup. Dynamic integer sets with optimal rank, select, and predecessor search. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, pages 166–175, 2014.
[15] Cynthia Dwork and Aaron Roth. The algorithmic foundations of differential privacy. Foundations and Trends® in Theoretical Computer Science, 9(3-4):211–407, 2014.
[16] Xiao Shaun Wang, Kartik Nayak, Chang Liu, T.-H. Hubert Chan, Elaine Shi, Emil Stefanov, and Yan Huang. Oblivious data structures. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, pages 215–226, 2014.
[17] A. Beimel, K. Nissim, and M. Zaheri. Exploring differential obliviousness. In AP-PROX/RANDOM 2019, volume 145 of LIPIcs, pages 65:1–65:20, 2019.
[18] I. Komargodski and E. Shi. Differentially oblivious Turing machines. In ITCS 2021, volume 185 of LIPIcs, pages 68:1–68:19, 2021.
[19] G. Persiano and K. Yeo. Lower bounds for differentially private RAMs. In Advances in Cryptology—EUROCRYPT 2019, volume 11476 of LNCS, pages 404–434, 2019.
[20] G. Persiano and K. Yeo. Lower bound framework for differentially private and oblivious data structures. In Advances in Cryptology—EUROCRYPT 2023, pages 487–517, 2023.
[21] M. Zhou, E. Shi, T.-H. H. Chan, and S. Maimon. A theory of composition for differential obliviousness. In Advances in Cryptology—EUROCRYPT 2023, volume 14006 of LNCS, pages 3–34, 2023.
[22] M. Zhou, M. Zhao, T.-H. H. Chan, and E. Shi. Advanced composition theorems for differential obliviousness. In ITCS 2024, volume 287 of LIPIcs, pages 103:1–103:24, 2024.
[23] Zhewei Wei and Ke Yi. Equivalence between priority queues and sorting in external memory. In Algorithms - ESA 2014, volume 8737 of Lecture Notes in Computer Science, pages 830–841, 2014.
[24] Thore Thießen and Jan Vahrenhold. Optimal offline ORAM with perfect security via simple oblivious priority queues. In 35th International Symposium on Algorithms and Computation (ISAAC 2024), volume 322 of Leibniz International Proceedings in Informatics (LIPIcs), pages 55:1–55:18, 2024.
[25] Arya Maheshwari and Elaine Shi. Oblivious priority queue and single-source shortest path in the external memory setting. In Advances in Cryptology—CRYPTO 2026, volume 16807 of Lecture Notes in Computer Science, pages 329–360, 2026.
[26] Leqian Zheng, Lei Xu, Cong Wang, Sheng Wang, Yuke Hu, Zhan Qin, Feifei Li, and Kui Ren. SWAT: A system-wide approach to tunable leakage mitigation in encrypted data stores. Proceedings of the VLDB Endowment, 17(10):2445–2458, 2024.
A Heavy-node enumeration
This appendix gives the iterator used in Lemma 4.7 for a segment . It processes original records with weight one and checkpoint points with weight zero. Heavy-node counts are private, and the iterator makes no server writes.
A compressed-trie iterator. Set and normalize a record key to . A dyadic node of height has interval length . Leaves have height zero, and the root has height . Read the original records from the sorted physical bins in order, treating each as a point of weight one. We will also insert zero-weight checkpoint points. Maintain a current descriptor consisting of a representative coordinate, a subtree height, and its exact total weight. The dyadic node represented by this descriptor has not yet been emitted. A stack frame represents an open branching node of height whose completed left part has weight . The frame heights strictly decrease from the bottom of the stack to its top.
To close the edge from a current descriptor to an excluded ancestor height , do nothing if . Otherwise emit, for each height , the interval containing of length , with count . These intervals are computed directly by shifts and masking. Every implicit node on this edge has the same count, so a light edge is skipped in constant time, whereas each iteration on a heavy edge emits a distinct heavy node.
The first input coordinate creates a current leaf with its given weight. An equal next coordinate adds its weight to that still-open leaf. For a new larger coordinate , let be the preceding coordinate and let , computed with a most-significant-bit operation. Perform the following steps.
(i) While the top frame has height less than , pop it, close the current edge up to its height, and replace the current descriptor by that frame's node, adding the current count to the stored left count.
(ii) Close the current edge up to height . Push a frame of height storing its representative and count as the completed left part, and make the new coordinate the current leaf.
After step (i), the remaining top frame, if any, has height strictly greater than . Equality cannot occur: once an increasing input stream has crossed from the left child of a frame into its right child, no later coordinate can first diverge at that frame. At the end of the domain, pop all frames by the same close-and-add rule and finally close the current descriptor up to excluded height , thereby emitting the root if it is heavy. If there is no current descriptor, there is nothing to close. Counts are combined when branches close, so each input record does not require a separate update at every ancestor.
Closing nodes at bin boundaries. The checkpoint for bin must include every heavy node whose right endpoint lies in . After processing that bin, the iterator inserts a zero-weight point at the original coordinate if . This sentinel closes all nodes ending at or before , so each newly emitted node is assigned to the completed checkpoint. At the first cut equal to , the iterator instead closes the entire stack and marks it finished.
Coincident points use the same open leaf: an original record at a sentinel coordinate adds its weight to that leaf, and repeated cuts add zero weight without creating branches. Bins between repeated cuts at contain no original records, and these cuts leave the finished iterator unchanged. Thus no node is closed or sampled twice.
Proof of Lemma 4.7. The stack represents the rightmost path of the compact binary trie of the processed coordinates. The ordered scan closes a subtree only after all its records have been read, combining its child weights. Original records have weight one and sentinels have weight zero, so a subtree's completed weight is its exact record count. All implicit nodes on a compressed edge have the same count as its child. Each edge closes once and emits exactly its heavy nodes with their exact counts. Every heavy node belongs to one such edge or is the root closed at the end, giving complete enumeration without duplication.
Completing bin includes its checkpoint step. If , the sentinel at closes all pending nodes whose right endpoints are at most . The previous checkpoint has already closed those ending at or before . Thus checkpoint receives exactly the heavy nodes with right endpoints in , all enumerated by completion of bin . Flushing the stack at the first boundary equal to gives the same guarantee. Postorder emits nodes by increasing right endpoint, breaking ties by increasing height. Empty bins and repeated boundaries preserve these properties.
Each distinct input point creates at most one frame, and each frame is popped once. There are at most original records and sentinel points, giving structural work. At each tree level, disjoint heavy intervals contain at least records each, so there are at most heavy nodes in total. Each emitted node costs constant work, and scanning all physical slots costs . This proves the claimed deterministic work bound, excluding noise sampling. The stack has at most frames of constant size. Together with the current descriptor and one output pair, it uses private words beyond the current bin buffer. Outputs are passed individually to private computation without server writes.
B Word-RAM implementation details
Primitive instructions. The client supports unit-time addition, subtraction, multiplication, comparisons, Boolean operations, shifts, most-significant-bit queries, and generation of an independent uniform random word. The constant in accommodates composite keys, server addresses, and polynomially bounded counters. All supporting constants, temporary storage, sampling state, and input and output registers are counted in private space.
Exact sampling with bounded work and space. To sample , start with a counter . While , perform a Bernoulli trial of success probability : on success return , and on failure increment . If , return . Since is a power of two, each trial masks the low bits of a fresh uniform random word. The procedure uses constant private space, returns after at most trials on every random tape, and uses at most trials in expectation. Its distribution assigns mass to and mass to . The sampler makes no server accesses.
Lazy metadata operations. During a descent in the implicit segment tree, the parent's lazy transformation is propagated to both children before being cleared. A missing child is initialized to its implicit zero state before receiving the transformation. The descent then uses the updated child maxima. Values and addresses are polynomially bounded in T and fit in constant-sized word fields. Each suffix addition or cutoff search visits nodes and uses constant local word work per visited node.
Integer arithmetic and quantization. For core parameter computation, is represented by the public integer . Integer division need not be a unit-time primitive. Public quantities such as can be computed once when the first segment is needed, and once per segment, by shift-and-subtract division. Since every created segment has , these costs are absorbed by its linear charge. Segment capacities and bin counts are maintained together through multiplication by the public growth factor. The quantization sweep stores the next multiple of and advances it by addition for each actual emitted position, without dividing once per event or iterating over unused coordinates.
C Proof of the parameterized upper bound
Proof of Theorem 5.8. The wrapper of Lemma 5.6 uses target operation bound . A source history of actual length induces target calls. All construction parameters are evaluated at this target operation bound. Write and . Take
Instantiate the core with privacy parameters , where is the external privacy target. Only the supplied integers are needed to compute the construction's parameters. In particular, the implementation need not evaluate an exponential or a real logarithm. Since , we have and .
We use the public parameters defined in Section 4.1, now allowing to exceed and to vary with the privacy parameters. The noise-privacy proof uses the inequalities and , which still hold. Thus each affected summary is -DP, and the same composition and postprocessing proof gives privacy for the public-type construction. The deterministic summary error, bin-capacity, reflection, and local set arguments also continue to apply with the newly chosen parameters.
Because and , the explicit parameter dependence is
Here is absorbed by the term. All private regions in Table 2 still occupy words: in particular, follows from the same lower bounds on and from . Using , , and gives
The hypothesis makes all parameters, counters, event fields, and addresses polynomially bounded in , with a fixed exponent. Choosing the constant in accordingly therefore preserves constant-word representations and word-level arithmetic throughout.
With varying privacy parameters, the local integer sets are not necessarily of size . Define
Lemma 4.2 gives work per index operation. Sorting a level-0 segment or a merge output bin takes work and space, and the lifetime accounting for local-set insertions and deletions gains the same factor. Hence a segment of capacity incurs local work for these tasks, while its fixed-capacity data accesses still require probes.
Generating a summary from an already sorted segment still takes linear work in expectation. The sampling and sparse-event sorting terms are respectively
These estimates use the unchanged lower bounds , , and . Larger noise scales do not introduce an additional sampling factor, because they reduce the number of heavy candidates. The physical scan and output bounds remain deterministic. The metadata and boundary-search terms of (6) likewise remain bounded by , since and are unchanged lower bounds. The total created-segment capacity is . Summing these capacities and local set lifetimes therefore gives expected work , pathwise probes , and server space .
The initialization accounting changes only through the integer-set factor. The private heap costs per operation, and the first completed epoch pays for setup and an transfer. Given , public parameter computation takes word operations using integer arithmetic and bit lengths. The segment-specific divisions retain their linear charges. In the private-only case , the rules of Section 4.2 initialize only record slots and perform no server probes. Its heap work and space therefore satisfy the claimed bounds as well. The unchanged capped samplers preserve pathwise termination.
Finally, Lemma 5.6 gives privacy, which implies privacy, and changes work, probes, and space only by constant factors. Equations (16) and give the claimed resource bounds.