Manuscript Offprint
arXiv:2610.24974BitPCE: Batched Multi-Dimensional PolicyResolution with GPU Bitmap Algebra
Shengwei Wang
Illumio
Abstract—Policy controllers must determine which workloads match rules spanning several label dimensions. Hash sets, compressed bitmaps, and GPU set-processing primitives address the underlying set operations. However, intermediate results, repeated scope evaluations, dependent policy updates, and host transfers can dominate the cost of a heterogeneous batch. We study this problem as batched intersection-of-unions (IoU).
Our design exploits independent scope-word tasks, reusable endpoint expressions, and policy dependencies. The challenges are preserving wildcard, empty-group, and exclusion semantics, recognizing equal scopes, and retaining unchanged recipients affected by source edits. BitPCE addresses them with register-resident GPU evaluation, canonical scope compilation, and dependency-complete candidate selection under a stated rendering contract. IP-only changes reuse cached memberships. We establish correctness and word-work bounds.
On a four-vCPU A10G host, resident GPU execution is 3.46–36.60× faster than the best tested native CPU path, including CRoaring, and 1.14–2.22× faster than an adapted operand-parallel GPU reduction. Gains narrow at the host-output boundary: on an eight-vCPU host, including upload and compact identifier output, resolution takes 16.3 ms versus 19.3 ms for CPU at 100K objects and 500 scopes. Sparse labels and small batches can favor CPU execution. Scope reuse, candidate selection, and incremental transfers are measured as components; complete update-to-enforcement latency remains unevaluated.
Index Terms—GPU computing, set intersection, bitmap index, policy resolution, CUDA, parallel algorithms
I. INTRODUCTION
Network policy controllers translate application intent into the workloads to which a rule applies. For example, “allow production web servers to reach production databases on TCP port 5432” requires finding both endpoint sets from role and environment labels. Workload arrivals, label edits, and policy changes can require these sets to be refreshed across many rules. This paper addresses that bulk membership-resolution step, which also appears in access control and categorical content filtering.
The core expression is intersection-of-unions (IoU): a scope accepts any listed label within a dimension and requires a match in every constrained dimension. For groups of workload sets ,
The desired output is the matching workload set for each scope; rendering and delivering the resulting policies add further work.
a) How the problem is addressed today: Industry uses label selectors to express policy: Kubernetes delegates enforcement to network plugins [1], while Cilium uses label-derived identities to separate security from IP addressing [2]. For explicit membership sets, Redis provides unions and intersections [3]; selective hash filtering can start from a small candidate set. Dense bitmaps exploit word-level parallelism, and Roaring adapts storage to density [4]. Academic work accelerates GPU set intersection [5], bitmap reductions [6], and reusable query processing [7].
b) The remaining difficulty: However, a fast primitive alone does not determine the best execution plan for a batch of heterogeneous scopes. Hash unions construct intermediate sets; selective filtering trades those unions for irregular probes. Dense bitmaps scan words even for sparse labels. Operand-parallel GPU reductions avoid global intermediates but require coordination; staged evaluation instead materializes group results. Launches, index upload, and host-readable output can outweigh GPU computation. Repeated scopes and dependencies between policy recipients create further work beyond an isolated intersection. The question is therefore how to exploit a whole batch's structure, preserve its semantics, and establish when the benefit survives the required input/output costs.
c) Insights, challenges, and approach: Building on these techniques, three observations guide BitPCE:
-
Keep the expression factored and parallelize its words. Factoring is standard set algebra; the opportunity is to evaluate independent scope-word pairs without storing each group union. The challenge is to fuse heterogeneous groups while preserving wildcards, empty groups, exclusions, and partial-word semantics. We establish the bitmap equivalence and work bounds (Section III) and implement register-resident fused CUDA evaluation with early termination (Section IV).
-
Reuse membership expressions across rules. Rules with different services can share endpoint scopes. The challenge is to recognize equal scopes without losing group boundaries or exclusions, and to distinguish shared output from its expansion. A CPU compiler produces canonical scopes and a reference map with a correctness argument (Section IV-B).
-
Follow policy dependencies when membership changes. An unchanged database recipient still needs an update when its allowed web-source set changes. The challenge is complete candidate selection across source, recipient, and service edits. We derive a candidate set under an explicit rendering contract and separate IP-only changes from label changes (Section V).
The evaluation compares matched native CPU, compressed-bitmap, and Redis paths, tests fusion and scope reuse, and measures transfer costs, including cases favoring CPU (Section VII).
A. Policy Systems and Prior Set Processing
a) Industrial policy systems: Kubernetes delegates label-selector enforcement to network plugins [1]; Cilium shares label-derived identities across pods, avoiding some address-dependent rule expansion [2]. Azure VFP compiles layered policy into cached flow actions and revalidates flows after policy-generation changes [8]. These systems already reduce repeated enforcement work. BitPCE targets the different interface of producing explicit workload memberships in bulk; its IP-update contract does not replace identity-based or flow-cached enforcement.
b) CPU sets and compressed indexes: Redis supplies set algebra [3]; selective filtering probes only candidate objects. Roaring combines array, bitmap, and run containers with optimized native operations [4], [9]. Tree-encoded bitmaps also compress dense or weakly clustered inputs and support fast intersection [10]; compression is not only a sparse-data optimization. Dense words trade that adaptability for regular access. We test native CRoaring as well as PyRoaring; these comparisons do not cover every compressed index.
c) GPU set and query processing: BATMAP uses a compact layout for GPU set intersections [11]; Bellas and Gounaris [5], G Miner [12], and ModernGPU [13] provide related set-processing methods. Nelson et al. [14], [6] compare word-, operand-, and hybrid-parallel bitmap reductions. Their ideal-hybrid mapping coalesces input reads and reduces operands in shared memory with one final global write. Thus, eliminating global intermediates is already established. Tran et al. [7] improve WAH query processing through metadata and allocation reuse, and consider retaining decompressed columns. GPU-WAH [15] addresses bitmap compression; DogQC [16] fuses query pipelines and addresses divergence. BitPCE specializes execution to heterogeneous IoU scopes: one thread accumulates a word across groups without inter-thread reduction. Section VII-E tests this choice against both staged execution and an IoU adaptation of ideal-hybrid reduction.
d) Reuse and policy updates: Delta-net incrementally verifies changed network behavior using equivalence atoms [17]; incrementality and shared behavior are established ideas. Our scope-sharing proof preserves categorical groups and exclusions, while the candidate proof covers recipients whose rendered policy changes despite unchanged membership. GPU Boolean logic [18], packet classification [19], PacketShader [20], and GASPP [21] address related computation with different output contracts. We evaluate the resolver and update components, without claiming superiority over complete query engines or deployed controllers.
B. Resolution Semantics
We model the categorical membership step explicitly below. Full policy-language translation, packet processing, and conflict resolution between rendered rules are outside this model.
Definition 1 (Label Space). Let be a set of objects (e.g., workloads). Let be label dimensions, each a finite set of dimension-qualified labels (the are disjoint), with total label set and .
Definition 2 (Membership Function). A membership function assigns each object a set of labels. We assume at most one label per dimension: for all .
Definition 3 (Rule and Scope). A rule has a scope with , where is a wildcard marker distinct from every label set. There are three cases:
• Wildcard : no inclusion constraint is imposed on dimension , including when its attribute is missing.
- Non-empty group ( ): the object must carry at least one label in . Objects missing dimension fail this constraint.
• Explicitly empty group : no object matches the scope.
A rule also has an exclusion family with ; when no exclusions are specified for dimension . Exclusions apply independently of wildcard inclusion constraints.
Definition 4 (Match Predicate). Let be the set of constrained dimensions for rule . Object matches rule iff:
(2)
Empty conjunctions evaluate to true. Wildcard dimensions impose no inclusion constraint, even when the attribute is missing; exclusions still apply in every dimension. An explicitly empty group makes the match predicate false.
Definition 5 (Resolution Problem). Given , , and , compute Match for all .
C. Selective Hash-Based Resolution
For each label , define its workload set . For each constrained dimension , the group is a collection of workload sets. The algorithm unions the sets within each group and intersects the resulting unions across dimensions. A selective variant picks the group with minimum summed cardinality, forms its union as the candidate set, and probes remaining groups for membership.
Algorithm 1 Selective Hash-Based IoU (CPU)
Require: Workload universe W; inclusion groups
Ensure: Result set
1: if then return W
2: end if
3:
4: ;
5: if then return
6: end if
7: for each do
8: for each using erase-safe iteration do
9: if then
10: end if
11: end for
12: if then return
13: end if
14: end for
15: return R
Algorithm 1 resolves the inclusion groups, reindexed as with ; exclusion filtering is applied afterward to obtain the full match set.
Proposition 1 (Selective Hash Filtering Cost). For , let be the selected group index and the initial candidate set. Filtering performs at most membership tests, each taking expected time under the hash-table model. This bounds membership-probe work, excluding preparation and exclusion filtering. With constant-time set-size queries, group selection costs ; candidate-union construction costs expected time.
III. BITMAP-PARALLEL FORMULATION
We first establish bitmap equivalence for the stated semantics, including empty and wildcard groups, then bound word work.
A. Binary Membership Matrix
Definition 6 (Membership Matrix). For , the logical membership matrix has iff , where . Each row records membership for one label. Its packed representation stores unsigned 64-bit words per row. Bit b of word stores for and ; padding bits are zero. Thus denotes a packed word in the formulas below; object indices are zero-based. The valid-universe mask is for , except that when , the final mask is . Only a partially filled final word requires a non-trivial mask.
B. Bitmap Intersection-of-Unions
Theorem 2 (Bitmap IoU Equivalence). For rule r with scope and word index , define
Operations are bitwise: an empty OR is zero and an empty AND is . Wildcard dimensions are omitted from the AND reduction. For every object index , bit of is 1 iff workload satisfies all inclusion constraints of rule . Padding bits are zero. Exclusions are applied separately in Corollary 3.
Proof. Fix , with word index and bit position . By Definition 6, bit of is 1 iff . The OR for dimension is therefore 1 iff the workload carries at least one label in ; the AND requires this for every constrained dimension. An explicitly empty group contributes zero. With no constrained dimensions, the empty AND contributes all ones. Finally, preserves every valid bit and clears all padding bits, proving the claim.
Corollary 3 (Exclusion via AND-NOT). For , the full match word is
Complements are over unsigned 64-bit words; an empty AND is all ones. For , bit of equals . Padding bits remain zero.
Proof. For a valid workload bit, each complemented label word is 1 iff that workload does not carry the excluded label. The AND over all exclusions supplies Definition 4's exclusion condition, including wildcard dimensions. Theorem 2 supplies the inclusion condition and zero padding; further AND operations cannot set a cleared bit. Empty exclusion sets leave the inclusion result unchanged.
C. Label Group Elimination
Theorem 4 (Label Group Elimination). Let and, for each constrained dimension , let and . Both hash-based and bitmap approaches can evaluate without enumerating the Cartesian-product combinations. The empty intersection denotes . Below, sums over range over constrained dimensions.
Materializing one group union takes word work. Uncached inclusion evaluation takes , including initialization and output. When and every group is nonempty, this simplifies to . If valid group unions are already available for the current membership snapshot, combining them takes work, independent of group sizes. This excludes cache construction or refresh. Exclusions add work, where .
Proof. For each workload, membership in the factored expression requires one matching label from every constrained group. Distributivity makes this equivalent to enumerating label choices and unioning their intersections; direct group-union evaluation avoids that enumeration in either representation. A zero-initialized bitmap union performs OR operations and initialization/output work. Combining group results adds AND operations, with output and masking work. Summing yields the stated uncached bound; if all and , then . Valid cached unions remove the per-label OR work, leaving combination work. Each exclusion contributes at most AND-NOT operations. Theorem 2 covers empty and wildcard groups, and Corollary 3 covers exclusions.
A cached group union is reusable while its label set, referenced membership rows, and workload universe/index mapping remain unchanged. Otherwise it must be refreshed or revalidated, even if the rule's label list is unchanged. This optional group-union cache is distinct from the cross-rule scope reuse in Section IV-B. In the GPU cache variant, the CPU identifies recurring groups and compiles their references; GPU OR operations build the cached rows.
Corollary 5 (Work Comparison). For the constrained groups in Theorem 4, the zero-initialized bitmap plan performs at most word-level OR operations and group-combination AND operations, plus initialization/output work. Early termination can reduce these counts. Each word operation processes 64 membership bits. Hash-based group-union construction makes insertion attempts, plus group/label traversal overhead. Section VII measures how representation, density, and batching affect runtime.
D. Complexity Analysis
Theorem 6 (Bitmap IoU Complexity). For dimensions, at most inclusion labels per dimension, and exclusion labels, resolving one rule scope over words requires word work. Evaluating independent scopes requires word work.
Proof. In the zero-initialized kernel, a constrained group with labels contributes at most OR operations and AND operations. Since and , inclusion uses at most such operations. Initialization, masking, and output add work; exclusions add at most AND-NOT operations. The general bound is therefore . With and , this simplifies to . Wildcard dimensions add no groups; empty groups and early termination cannot increase the bound. Work sums over independent scopes.
TABLE I
PER-SCOPE INCLUSION COMPARISON. HASH COSTS ARE EXPECTED UNDER THE CONSTANT-TIME HASH-TABLE MODEL. FOR , HASH FILTERING COUNTS MEMBERSHIP PROBES ONLY; GROUP SELECTION AND CANDIDATE-UNION CONSTRUCTION ARE ADDITIVE (PROPOSITION 1). THE HASH UNION BOUND ASSUMES DISJOINT WITHIN-DIMENSION WORKLOAD SETS (DEFINITION 2). EXCLUSIONS ARE ADDITIONAL IN BOTH APPROACHES.
| Hash-Based | Bitmap | |
|---|---|---|
| Filtering / evaluation | ||
| Access pattern | Hash probes | Selected-row reads |
| Access locality | Data-dependent | Contiguous row words |
| Group union | ||
| Parallelism | Independent candidates | W independent words |
IV. GPU KERNEL DESIGN
CPU compilation exposes shared scopes; GPU threads evaluate their words in a fused pass. Expansion remains a separate output cost.
a) Execution placement: The CPU prepares inputs and launches CUDA operations. The GPU applies bitmap patches, evaluates scopes, and optionally expands results, compacts identifiers, and computes notification candidates. CUDA copies connect these stages to CPU rendering and delivery; IP-only changes follow a CPU-only path (Section V-B).
A. CPU Preparation and GPU Inputs
The CPU packs B in label-major order (8LW bytes) and compiles flat metadata: compressed-row offsets (scope-to-group) and (group-to-label), label IDs , exclusion offsets , and exclusion IDs . These arrays support heterogeneous groups. CUDA copies, invoked through CuPy, upload the matrix and metadata over PCIe for resident GPU evaluation.
B. Cross-Rule Scope Deduplication
A directional policy rule has provider and consumer scopes and a separate service descriptor (e.g., protocol and port). Let be the number of directional rules and their raw scope occurrences. Several rules may share the same scopes while differing only in service. We evaluate each of the distinct scopes once and retain a rule-side-to-scope map . This is cross-rule reuse, distinct from caching label-group unions and from superseding pending snapshots with newer state.
Group boundaries are preserved: represents a conjunction and differs from the single disjunction . No groups (wildcard) differs from an explicitly empty group. Exclusions belong to the key; services do not, because they do not participate in scope membership. Hashing accelerates lookup but never substitutes for full-key equality. This syntactic canonicalization need not discover every semantically equivalent expression.
Proposition 7 (Scope-reuse correctness). For one snapshot, let be the match bitmap of unique scope . Original scope then has result . Given , evaluating unique scopes uses word work under Theorem 6's
Algorithm 2 CPU Scope Compilation and Reference Map
Require: Raw scopes with dimension-qualified labels
Ensure: Unique scope array Q and reference map
1: empty dictionary;
2: for do
3: Sort/deduplicate labels inside each OR-group of
4: Sort/deduplicate the list of groups and exclusion labels
5: (group tuples, exclusion tuple)
6: if then Compare complete keys after hashing
7: ; append canonical to Q
8: end if
9:
10: end for
11: return
assumptions. Shared result bitmaps and an R-entry 32-bit map occupy bytes; input bitmaps, scope metadata, and CPU compilation are separate.
Proof. Sorting and duplicate elimination preserve OR, AND, and exclusion semantics. Equal keys give equal match predicates on the same snapshot, establishing the result identity. Evaluation work sums over U scopes. Each shared bitmap stores W 64-bit words; R 32-bit references add 4R bytes. □
Python and native C++ implement the compiler over flat metadata. The CPU rebuilds maps for scope changes and reuses them for label/IP updates. GPU evaluation returns U shared rows; optional expansion to R rows costs work and 8RW bytes. The R/U evaluation reduction does not guarantee a latency speedup. Benchmarks separate compilation, shared/expanded results, and CPU execution with scope reuse.
C. Per-Rule Kernel
Each thread evaluates 64 objects simultaneously via one 64-bit word.
When a = 0, no objects in the 64-element chunk can match, so remaining groups are skipped. Threads in one warp may stop at different groups, causing divergence; we measure the effect via a no-early-exit ablation.
D. Batch Kernel
The CPU launches blocks of 256 GPU threads. Each GPU thread derives its pair from the flattened index and executes Algorithm 3. Each output word has exactly one writer, so no atomics or reductions are needed.
a) Coalescing: Within a warp segment assigned to one scope, consecutive threads access consecutive 64-bit words of the same bitmap row. A full warp requests 256 contiguous bytes; actual memory transactions depend on alignment. Warps crossing a scope boundary may access different rows. Output writes are similarly coalesced in flattened task order.
Algorithm 3 BitPCE Per-Rule GPU Evaluation
Require: Scope r, word index w, matrix B, compiled offsets Ensure: O[r, w]: match result for 64 objects
1: All-ones accumulator
2: for do
3:
4: for do
5:
6: end for
7:
8: if then break Early termination
9: end if
10: end for
11: for do
12:
13: end for
14: if then
15: end if
16:
Algorithm 4 BitPCE CPU Launch and GPU Batch
Require: Resident bitmaps and metadata for scopes
Ensure: : all match bitmaps
1: CPU: Launch blocks, 256 threads GPU (each thread):
2:
3: if then return
4: end if
5: ;
6: Execute Algorithm 3 for
b) Fusion vs. staging: A two-pass GPU organization first materializes group unions, then intersects and applies exclusions in a second GPU kernel. Our fused kernel avoids intermediate storage and the extra launch. We measure both variants in the ablation (Section VII-E).
V. FROM SCOPE RESULTS TO POLICY UPDATES
An unchanged recipient can depend on a changed source. We specify a CPU–GPU integration design and measure scope sharing, candidate selection, and transfers separately. The candidate kernel consumes materialized rule-side memberships; delivery is not implemented. The rendering contract is incoming allow rules: an agent in permits addresses of workloads in for service ; outgoing enforcement swaps roles. Workload IDs survive IP changes. The CPU aligns rules by stable ID; absent rules have empty memberships.
A. Dependency-Aware Affected Workloads
Incoming policy updates follow dependencies: changed source membership can alter an unchanged recipient's policy. For rule , , and , denote the old/new source and recipient sets; superscripts , identify snapshots. Let flag a changed service descriptor or rule addition/deletion, and denote symmetric difference (bitmap XOR): membership in exactly one set. The complete candidate set is
For example, consider “allow web to db on TCP port 5432,” with and . Adding web2 to requires both database agents to permit its address, even if and their membership XOR is empty. Separately, with sources unchanged, replacing the consumer set by targets db1 for removal and db3 for installation of this rule’s permission. Changing the service to TCP port 6432 targets all old/new recipients while reusing the membership results.
The CPU supplies descriptor-change flags . On the GPU, provider-word comparisons reduce to one flag per rule, combined with by logical OR. Each thread of the target kernel computes one 64-workload output word, OR-ing consumer unions for flagged rules and consumer XORs otherwise. Union across rules includes each candidate once in the N-bit target bitmap. This takes word work for M rules without materializing provider-consumer pairs. CUDA copies return the target bitmap to the CPU.
Proposition 8 (Candidate completeness). Under the stated incoming-rule contract, with unchanged IP mappings and rules aligned by stable ID, every workload whose rendered policy changes belongs to A.
Proof. A workload outside A has unchanged consumer membership for every rule. For every rule it receives, both provider membership and the service descriptor are unchanged. With unchanged IP mappings, its rendered entries are therefore unchanged. Taking the contrapositive proves the claim.
Candidates can be conservative: overlapping rules or equal rendered address sets may produce no effective change. The CPU compares the old/new canonical rendered policy for candidate agents before sending an update. Re-rendering must include old recipients to remove stale permissions. Rendering cost depends on the number of resulting address/service entries, potentially proportional to for explicit per-agent entries; bitmap resolution alone does not bound that cost.
B. IP Churn without Scope Re-evaluation
For IP-only changes to a set I of stable workload IDs, labels and scope descriptors remain unchanged. The CPU updates its IP(w) mapping, retaining multiple addresses per workload, and reuses host-cached , . Candidate detection, policy rendering, and agent communication stay on the CPU. With these cached memberships, an IP-only update requires no reconstruction of B, GPU kernel launch, or PCIe transfer. The incoming-policy candidate set is
For one changed workload this needs membership bit-tests plus consumer-union and rendering work. Old addresses must be removed as new addresses are installed. The changed workload's own agent may also need local-interface configuration updates, separate from peer policy resolution. IP-derived labels, joins, departures, and ID reuse are not IP-only changes and follow the snapshot-update path. For simultaneous scope and IP edits, union A with IP-change candidates from both snapshots before comparing rendered policies.
a) Concrete rendering example: Consider “allow role:web to role:db on TCP port 5432.” Suppose resolution yields and , with and workload b the database host. The CPU renders this illustrative incoming rule for b's enforcement agent:
iptables -A INPUT -s 10.0.1.10/32 \
-p tcp --dport 5432 -j ACCEPT
The entry is part of an agent-managed ruleset whose chain placement and ordering determine enforcement. If a's address changes to 10.0.1.11 while its labels remain unchanged, and remain valid. The CPU finds , targets , and renders a new policy version replacing the old source-address entry with one using 10.0.1.11/32. No GPU scope evaluation is needed. The agent applies the versioned ruleset update; it must remove the old permission rather than merely append the new entry.
C. PCIe, Snapshots, and Notification
The CPU ingests events and retains authoritative labels and IP mappings. For label edits, it merges changes to each word and prepares offset/value patches. CUDA copies transfer these patches over PCIe; a GPU scatter kernel writes the replacement words into resident B. The CPU allocates buffers, queues copies/kernels, and synchronizes completion. Pinned buffers and asynchronous copies can reduce transfer overhead. For joins, the CPU assigns stable IDs within reserved capacity; exhaustion requires rebuilding and uploading an expanded index. In the integration design, the CPU publishes a version only after GPU index writes and resolution finish, using ordered CUDA events or separate version buffers. Host IP mappings and cached memberships must use compatible versions.
After resolution, device-to-host copies return needed scope results and targets; the CPU caches memberships and renders policy updates. A proposed CPU delivery service notifies affected agents of a version and pushes or serves its delta. Agents reject stale versions, apply updates idempotently, and use full snapshots for recovery; heartbeats check liveness. The CPU coalesces pending inputs by retaining the newest snapshot, while scope deduplication shares computations within it. Candidate fan-out, result export, rendering, and delivery remain separate costs even for a small input patch.
VI. PERFORMANCE MODEL
Each 64-bit input word requires roughly one OR or AND-NOT operation, plus group-intersection work: the logical bitwise intensity is on the order of 0.125–0.25 operations/byte,
TABLE II ILLUSTRATIVE NO-REUSE ESTIMATE VS. MEASURED BATCH TIME (MS), A10G (600 GB/s). THE MODEL ASSUMES AND ; MB DENOTES BYTES. RATIO IS ESTIMATE DIVIDED BY MEASURED TIME, COMPUTED BEFORE ROUNDING.
| Config | Bytes (MB) | Estimate | Measured | Ratio |
|---|---|---|---|---|
| 100K, 500R | 56.3 | 0.094 | 0.048 | 1.96 |
| 500K, 1KR | 562.5 | 0.938 | 0.345 | 2.71 |
| 1M, 1KR | 1,125.1 | 1.875 | 1.584 | 1.18 |
| 1M, 5KR | 5,625.4 | 9.376 | 7.904 | 1.19 |
excluding address and control instructions. Low intensity motivates bandwidth-oriented execution, but cache residency, instruction costs, and launch overhead can limit performance. A descriptive resource model separates these costs:
where is dispatch overhead, is memory bandwidth, is instruction throughput, is actual DRAM traffic, and I is executed instructions. This is descriptive, not a calibrated predictor: L2 cache reuse and early termination can reduce below the logical byte count.
Proposition 9 (No-Reuse Time Estimate). For scope evaluations with dimensions and words per bitmap, let be the mean selected inclusion-label count per dimension across the batch, counting wildcard dimensions as zero. Assume no cache reuse or early termination, one DRAM read per selected input word, and one write per output word. The nominal bitmap traffic is bytes, giving the bandwidth-only estimate . This excludes metadata, exclusions, instruction-throughput limits, and launch overhead; it is not a bound on measured latency.
Estimates use actual population sizes (including final-word padding), count eight input-word reads and one output-word write per scope-word pair, and exclude metadata, exclusions, and launch overhead. Ratio > 1 indicates measured time is faster than the no-reuse scenario; cache reuse and early termination can both contribute, but these ratios alone cannot distinguish the effects without hardware-counter profiling.
VII. EVALUATION
Matched baselines test resolution, ablations test execution choices, and scope/update experiments measure reuse and integration costs under Section V's contract.
A. Experimental Setup
a) Hardware: Primary and Redis campaigns use an A10G/g5.2xlarge (9,216 CUDA cores, 24GB GDDR6, 600GB/s; 8 logical CPUs, 4 physical cores), with CuPy 14.2.0 and 13.3.0 respectively. The component campaign uses the same hardware type (Section VII-J). Additional native-CRoaring and GPU-reduction controls use a separate A10G/g5.xlarge (4 logical CPUs, 2 physical cores), GCC 11 and CuPy 13.3.0; their timings are reported separately.
TABLE III MATCHED BATCH LATENCY (MS), RESIDENT EXECUTION. CPU 8 IS NATIVE C++ BITMAP WITH 8 OPENMP WORKERS. GPU IS RESIDENT (DATA ON DEVICE). ALL BASELINES RECEIVE IDENTICAL INPUTS PER CONFIGURATION. * DENOTES SKEWED DISTRIBUTION; SPEEDUPS USE UNROUNDED MEDIANS.
| N(k) | R | K/C | CPU 8 | Roaring | GPU | Speedup |
|---|---|---|---|---|---|---|
| 10 | 100 | 4/20 | 0.077 | 2.83 | 0.015 | 5.0× |
| 100 | 500 | 4/20 | 2.37 | 41.0 | 0.048 | 49.5× |
| 500 | 1K | 4/20 | 22.8 | 366 | 0.345 | 66.0× |
| 1,000 | 1K | 4/20 | 45.9 | 751 | 1.584 | 29.0× |
| 1,000 | 5K | 4/20 | 227 | 3,748 | 7.90 | 28.7× |
| 100 | 500 | 4/20* | 2.18 | 29.0 | 0.047 | 46.6× |
| 100 | 500 | 8/20 | 2.60 | 62.9 | 0.058 | 45.2× |
| 100 | 500 | 4/200 | 1.75 | 15.7 | 0.070 | 24.8× |
b) Baselines: Four CPU baselines receive identical inputs identified by SHA-256 fingerprint; Redis executes set operations in its server process:
-
Native C++ bitmap with OpenMP (1/2/4/8 workers): optimized compilation, same dense representation. The extended campaign also tests native sorted-vector and selective-hash implementations; “CPU best” selects the fastest implementation and worker count per seed, as specified per table.
-
Redis 8.10.2: server-side Lua performing group unions, intersections, and exclusion differences. A selective variant uses SMISMEMBER batches to filter candidates. Loopback, persistence disabled.
-
PyRoaring: compressed bitmap set operations via native Roaring library with Python orchestration.
-
Python hash sets: reference set union, intersection, and difference using Python's set objects.
c) Workloads: Defaults are dimensions and labels/dimension, varied as listed. Each dimension is wildcard with probability 0.2; included dimensions select 1–min(5, ) labels. Scopes also exclude 0–2 labels. Objects have at most one label per dimension, with 2% missing attributes. Uniform, skewed, and cross-dimension-correlated inputs are tested. Population labels are rounded; actual values are 10,003, 100,003, 500,003, and 1,000,003.
d) Protocol: After two warmups, primary timings use seven repetitions (three for Python sets); extended Redis/native/compaction timings use five. Wall-clock timings synchronize GPU completion. Each configuration has three input seeds; tables report medians of seed medians, and ratios use unrounded aggregates. Primary/Redis batches count raw scopes R, without cross-rule deduplication, rather than directional rules. Index construction and CPU scope compilation are excluded. Resident GPU inputs are preloaded; designated upload/round-trip paths include input transfers. Section VII-J separately measures scope-compilation setup.
B. Primary Results: GPU vs. Native CPU
Table III shows 5.0–66.0× resident speedup over eight-worker dense CPU, moderating to ~29× at 1M objects. Timing alone does not establish the cause. At 200 labels/dimension, speedup is 24.8×: bitmap length is unchanged,
TABLE IV EXTENDED COMPARISON WITH REDIS 8.10.2 (MS), MATCHED CONFIGURATIONS. CPU BEST SELECTS THE FASTEST NATIVE BITMAP/SORTED-VECTOR/SELECTIVE-HASH OVER 1–8 WORKERS PER SEED. U: UNIFORM, S: SKEWED, C: CORRELATED.
| N(k) | R | C | Dist | Redis | CPU best | Roaring | GPU |
|---|---|---|---|---|---|---|---|
| 10 | 100 | 20 | U | 89.9 | 0.063 | 2.49 | 0.021 |
| 100 | 500 | 20 | U | 5,265 | 2.37 | 40.8 | 0.053 |
| 500 | 128 | 20 | U | 6,965 | 3.11 | 47.9 | 0.064 |
| 100 | 500 | 200 | U | 434 | 1.69 | 20.9 | 0.077 |
| 100 | 128 | 4 | U | 6,549 | 0.579 | 5.23 | 0.026 |
| 100 | 128 | 2000 | U | 18.2 | 0.166 | 2.26 | 0.039 |
| 100 | 128 | 20 | S | 1,297 | 0.591 | 6.58 | 0.027 |
| 100 | 128 | 20 | C | 1,342 | 0.507 | 9.31 | 0.026 |
TABLE V HOST-READABLE IDENTIFIER OUTPUT (MS), MATCHED CONFIGURATIONS FROM THE EXTENDED COMPARISON. GPU RESIDENT INCLUDES RESOLUTION, COMPACTION, AND EXPORT WITH PRELOADED INPUTS; GPU UPLOAD ADDS INPUT TRANSFER. CPU BEST SELECTS THE FASTEST NATIVE DECODE OR DIRECT SELECTIVE-HASH PATH PER SEED.
| N(k) | R | C | Dist | GPU resid. | GPU upload | CPU best |
|---|---|---|---|---|---|---|
| 10 | 100 | 20 | U | 0.524 | 0.687 | 0.317 |
| 100 | 500 | 20 | U | 15.6 | 16.3 | 19.3 |
| 500 | 128 | 20 | U | 17.3 | 18.7 | 22.3 |
| 100 | 500 | 200 | U | 1.04 | 3.04 | 3.13 |
| 100 | 128 | 2000 | U | 0.351 | 13.6 | 0.482 |
| 100 | 128 | 20 | S | 2.79 | 3.27 | 3.51 |
but sparsity affects selectivity and early termination. PyRoaring is slower here, including Python orchestration of native operations.
a) Native compressed control: On the separate four-vCPU host, CRoaring 5.2.2 uses prebuilt indexes, native IoU loops, two group-ordering strategies, and 1/2/4 workers. We test compressed output and dense conversion, alongside native dense/sorted/hash controls. Across the eight configurations of Table IV (three matched seeds, seven shuffled repetitions), resident GPU is faster than the fastest tested CPU dense-output path, including CRoaring. With full upload and dense download, GPU is slower on the sparsest case (14.02 vs. 0.395 ms). Native compressed results and all samples are provided with the artifact; no cross-host ratios are used.
C. Redis Comparison
Table IV reports uncached Redis 8.10.2 Lua union IoU. Figure 2 includes selective execution, faster on skewed and sparsest inputs, and cached group unions (construction excluded). Union latency spans 18–6,965 ms. Ratios of aggregated medians are 463–255,000× against resident GPU and 110–11,300× against CPU best. These gaps combine representation, implementation, command dispatch, object management, and Lua interpreter costs; they do not isolate GPU hardware acceleration.
D. Transfer-Inclusive Measurements
Table V includes resolution, GPU popcount/prefix-scan, set-bit emission, and ID/offset export. CPU coordination reads the output count for GPU allocation and converts returned arrays to Python lists; both costs are included.

Fig. 1. Uniform primary cases, , (log scale). Whiskers span the three input-seed medians. Round trip includes index/metadata upload, kernel execution, and dense bitmap download, without identifier compaction.
TABLE VI RESIDENT GPU ABLATION (MS). FUSED: SINGLE-PASS KERNEL. FULL: FUSED WITHOUT EARLY TERMINATION. STAGED: SEPARATE UNION MATERIALIZATION AND INTERSECTION PASSES.
| N(k) | R | K | Fused | Full | Staged |
|---|---|---|---|---|---|
| 100 | 500 | 4 | 0.047 | 0.049 | 0.117 |
| 500 | 1K | 4 | 0.348 | 0.351 | 1.560 |
| 1,000 | 5K | 4 | 7.889 | 8.181 | 19.041 |
| 100 | 500 | 8 | 0.059 | 0.076 | 0.177 |
GPU with upload narrowly beats CPU at 100K/500 scopes (16.3/19.3 ms) and 500K/128 scopes (18.7/22.3 ms). At 2,000 labels/dimension, the full GPU path is slower (13.6/0.48 ms), versus 0.351 ms with preloaded inputs. Transfer costs can determine the preferred strategy.
E. GPU Execution Ablation
The fused kernel is faster than staged execution, which materializes one intermediate bitmap per group and requires two kernel launches. Early termination reduces time by 0.8–22.1% across these configurations.
a) Operand-parallel alternative: Our adaptation of Nelson et al.'s ideal-hybrid mapping [6] assigns threads to consecutive words and pairs of operands, reduces each group in shared memory, then intersects groups and applies exclusions. Both kernels use resident dense inputs and write the same bitmap; this isolates execution layout, excluding the prior system's WAH codec. We test 128/256/512/1024-thread blocks and reduction with/without early exit. Table VII compares the fixed 256-thread BitPCE kernel with the fastest reduction per seed: BitPCE is faster for these small groups (at most five labels). These results support word-local accumulation in this regime; they do not compare complete prior query engines or establish the best mapping for large operand groups.
(a) Native CPU and GPU

(b) Redis strategies
Objects / scopes / (labels per dimension, distribution)
Fig. 2. Extended-campaign latencies on a shared log scale; whiskers span the three input-seed medians. GPU round trip returns dense bitmaps. Redis cached reuses group unions, excluding their construction cost.
TABLE VII SEPARATE G5.XLARGE GPU-ONLY CONTROLS (MS), THREE MATCHED SEEDS AND SEVEN SHUFFLED REPETITIONS. FUSED USES 256 THREADS; REDUCE SELECTS THE FASTEST TESTED OPERAND-PARALLEL VARIANT PER SEED; RATIO IS REDUCE/FUSED. U/S/C DENOTE UNIFORM/SKEWED/CORRELATED INPUTS.
| N(k) | R | C | Dist | Fused | Reduce | Ratio |
|---|---|---|---|---|---|---|
| 10 | 100 | 20 | U | 0.0188 | 0.0215 | 1.14 |
| 100 | 500 | 20 | U | 0.0511 | 0.1119 | 2.19 |
| 500 | 128 | 20 | U | 0.0616 | 0.1370 | 2.22 |
| 100 | 500 | 200 | U | 0.0715 | 0.1136 | 1.59 |
| 100 | 128 | 4 | U | 0.0225 | 0.0301 | 1.34 |
| 100 | 128 | 2000 | U | 0.0360 | 0.0455 | 1.26 |
| 100 | 128 | 20 | S | 0.0245 | 0.0411 | 1.67 |
| 100 | 128 | 20 | C | 0.0232 | 0.0378 | 1.63 |
TABLE VIII FIXED-UNIVERSE LATENCY (MS), N=100K. BATCH SIZE IS SCOPE COUNT.
| Scopes | CPU 1-worker | CPU 8-worker | GPU resident |
|---|---|---|---|
| 1 | 0.031 | 0.047 | 0.017 |
| 8 | 0.216 | 0.077 | 0.019 |
| 32 | 0.806 | 0.201 | 0.020 |
| 512 | 12.6 | 2.41 | 0.052 |
| 8,192 | 199 | 37.7 | 0.540 |
F. Batch-Size Crossover
At one scope the CPU parallel loop has one iteration; eight workers become useful as the batch grows. Resident GPU time remains nearly flat from one to eight scopes, then grows sublinearly over the tested range. Upload can favor CPU for small batches.
G. Label Group Factoring
Factoring groups of sizes 20, 10, and 15 uses 45W OR operations instead of enumerating 3,000 combinations (Theorem 4). Hash sets also support factoring. Cached unions remove per-label work but require refresh; intersection and exclusions remain.
H. Memory Footprint
At 1M objects with 80 labels (4 × 20), the label matrix occupies MiB. Provider and consumer scopes reference the same label index. The output matrix for R scopes adds bytes (119 MiB at R=1,000); metadata, optional cached group unions, and scratch buffers are additional. The combined input-plus-output bitmap payload is ~129 MiB—well within the 8 GB of a commodity GPU.
I. Correctness Validation
GPU resolution outputs match native CPU bitmaps word-for-word. An independent Boolean predicate checks prefixes and edge cases; dedicated suites cover empty groups, wildcards, exclusion-only scopes, missing labels, and partial words. Redis, native sparse, and Roaring outputs match reference sets. New native and GPU-reduction edge suites pass 7,440 and 3,024 scope comparisons, respectively; every timed configuration matches all reference words before and after timing. Update components use the rendering and patch checks below.
J. Scope Reuse and Update Components
A separate A10G/g5.2xlarge component campaign uses CuPy 14.2 and CUDA 12.9 runtime (full environment recorded), three seeds, two warmups, and seven synchronized wall-clock samples. We report medians of per-seed medians separately from the primary/Redis campaign.
a) Scope reuse: We test unique fractions 1, 0.5, 0.1, and 0.01 at , , and : 36 cases, using synthetic duplicate distributions. Both paths use identical canonical group ordering; raw execution evaluates every occurrence. Table IX reports 10K scopes. CPU paths each choose the faster of one/eight OpenMP workers. GPU-shared retains rows plus references; GPU-expand gathers rows. Input bitmaps and compiled maps are resident.
At , cached GPU evaluation falls from 0.658 to 0.023 ms (0.304 ms with raw-row materialization). Shared output shrinks from 125.04 MB to 1.25 MB plus a 40 KB map.
TABLE IX
SCOPE REUSE AT 100K OBJECTS AND 10K RAW SCOPE OCCURRENCES. TIMES ARE MS; IS THE MEDIAN UNIQUE COUNT. CPU RECEIVES THE SAME SCOPE-REUSE OPTIMIZATION.
| U | CPU raw | CPU shared | GPU raw | GPU shared | GPU expand |
|---|---|---|---|---|---|
| 9,994 | 47.84 | 47.776 | 0.652 | 0.651 | 1.168 |
| 5,000 | 47.88 | 23.916 | 0.651 | 0.335 | 0.850 |
| 1,000 | 48.04 | 4.873 | 0.655 | 0.082 | 0.559 |
| 100 | 47.87 | 0.535 | 0.658 | 0.023 | 0.304 |
TABLE X
CANDIDATE DETECTION AND TARGET-BITMAP EXPORT (MS), 100K OBJECTS/1K DIRECTIONAL RULES. COUNTS ARE MEDIANS ACROSS THREE SEEDS.
| Provider edits | Candidates | Native CPU | GPU+export |
|---|---|---|---|
| 1 | 668 | 2.212 | 0.247 |
| 10 | 2,110 | 2.194 | 0.249 |
| 100 | 73,521 | 2.182 | 0.248 |
Native CPU time also falls from 47.87 to 0.535 ms: both processors benefit from reuse.
Setup must be amortized. At , native map construction takes 4.53 ms from flat metadata (12.63 ms including flattening), versus 35.28 ms for Python from nested scopes. The cold native-deduplicated GPU path (flatten, map, compile unique scopes, upload metadata, resolve, expand) takes 13.53 ms versus 9.33 ms without reuse. Cached maps therefore benefit recurring label updates but may not benefit one-shot compilation. All 36 cases match raw CPU/GPU outputs; 530 additional native compiler cases check grouping, wildcards, empty groups, exclusions, and word boundaries.
b) Affected agents and IP churn: At 100K objects/1K directional rules, we modify 1, 10, or 100 provider memberships, remove one consumer scope, and change one service descriptor. Both paths time provider-change detection and target reduction; GPU timing also includes export of the 12,504-byte target bitmap. Scope resolution, rendering, and agent transport are excluded. Table X compares optimized native C++ using the best of one/eight workers. Recipient counts show that few edits can produce large fan-out.
The CPU-only IP-change prototype scans cached memberships and unions candidates in 0.024–0.027 ms for one changed workload, excluding rendering/delivery. An independent set-valued renderer validates completeness across 300 random transitions with removals, service edits, and multiple IPs; plain membership-XOR misses recipients in 238 cases. The scope/notification suite passes 3,505 checks.
c) Incremental PCIe updates: Preallocated pinned CPU buffers hold unique 64-bit word offsets and replacement words (16 bytes/record). Timing covers CUDA host-to-device copies, GPU scatter, and CPU synchronization; allocation and CPU patch preparation are excluded. Table XI compares this with a full 80-label index upload. The nearly flat small-patch latency shows why payload size divided by link bandwidth is not an end-to-end latency estimate. These component times do not
TABLE XI
PINNED PCIe UPDATE TIME (s), INCLUDING DISPATCH AND SYNCHRONIZATION. PATCHES TRANSFER 16 B, 1 KiB, OR 16 KiB; FULL INDEX SIZES ARE APPROXIMATELY 1 MB AND 10 MB. FULL-UPLOAD TRIALS ARE FIRST AGGREGATED WITHIN EACH SEED, THEN ACROSS SEEDS.
| Objects | 1 word | 64 words | 1,024 words | Full index |
|---|---|---|---|---|
| 100K | 26.9 | 26.7 | 28.7 | 86.8 |
| 1M | 26.4 | 25.4 | 27.0 | 755.8 |
include a subsequent resolve, target detection, result export, rendering, or delivery.
VIII. DISCUSSION
Batch size, density, and output determine the preferred path. Host identifier export narrows resident gains (Table V). For a fresh full-index upload, the upload-only budget is . Illustrative and accommodate labels at 100K objects; the full crossover also includes execution and output.
BitPCE specializes established bitmap, fusion, and reuse techniques to categorical IoU and its update contract. Synthetic inputs and one GPU platform limit generalization. Production traces, wider groups, other compressed indexes, and complete update-to-enforcement measurements remain open.
IX. CONCLUSION
BitPCE combines fused word evaluation, canonical scope sharing, and dependency-complete update candidates for heterogeneous policy scopes. Correctness arguments cover wildcard, empty-group, exclusion, and update semantics under the stated rendering contract.
The operand-parallel comparison supports word-local execution for small groups. Upload and host-readable output narrow GPU/CPU times to 16.3/19.3 ms at 100K objects/500 scopes; sparse cases can favor CPU. The results identify useful regimes for the resolver and update components.
REFERENCES
[1] Kubernetes, “Network Policies,” https://kubernetes.io/docs/concepts/services-networking/network-policies/.
[2] Cilium, “Identity-Based,” https://docs.cilium.io/en/stable/security/network/identity/.
[3] Redis, “Set commands,” https://redis.io/docs/latest/commands/?group=set.
[4] Daniel Lemire, Gregory Ssi-Yan-Kai, and Owen Kaser. “Consistently faster and smaller compressed bitmaps with Roaring,” Software: Practice and Experience, vol. 46, pp. 1547–1569, 2016. https://doi.org/10.1002/spe.2402.
[5] Christos Bellas, and Anastasios Gounaris. “Exploiting GPUs for fast intersection of large sets,” Information Systems, vol. 108, article 101992, 2022. https://doi.org/10.1016/j.is.2022.101992.
[6] Mitchell Nelson, Zachary Sorenson, Joseph M. Myre, Jason Sawin, and David Chiu, “Parallel acceleration of CPU and GPU range queries over large data sets,” Journal of Cloud Computing, vol. 9, article 44, 2020. https://doi.org/10.1186/s13677-020-00191-w.
[7] Brandon Tran, Brennan Schaffner, Joseph M. Myre, Jason Sawin, and David Chiu. “Exploring Means to Enhance the Efficiency of GPU Bitmap Index Query Processing,” Data Science and Engineering, vol. 6, pp. 209–228, 2021. https://doi.org/10.1007/s41019-020-00148-8.
[8] Daniel Firestone, “VFP: A Virtual Switch Platform for Host SDN in the Public Cloud,” in USENIX NSDI, 2017, pp. 315–328. https://www.usenix.org/conference/nsdi17/technical-sessions/presentation/firestone.
[9] Daniel Lemire, Owen Kaser, Nathan Kurz, Luca Deri, Chris O'Hara, François Saint-Jacques, and Gregory Ssi-Yan-Kai, "Roaring bitmaps: Implementation of an optimized software library," Software: Practice and Experience, vol. 48, no. 4, pp. 867–895, 2018. https://doi.org/10.1002/spe.2560.
[10] Harald Lang, Alexander Beischl, Viktor Leis, Peter Boncz, Thomas Neumann, and Alfons Kemper, “Tree-Encoded Bitmaps,” in ACM SIGMOD, 2020, pp. 937–953. https://doi.org/10.1145/3318464.3380588.
[11] Rasmus Resen Amossen and Rasmus Pagh, “A New Data Layout for Set Intersection on GPUs,” in IEEE IPDPS, 2011, pp. 698–708. https://doi.org/10.1109/IPDPS.2011.71.
[12] Xuhao Chen and Arvind, “Efficient and Scalable Graph Pattern Mining on GPUs,” arXiv:2112.09761, 2021. https://doi.org/10.48550/arXiv.2112.09761.
[13] Sean Baxter, "ModernGPU," https://moderngpu.github.io/.
[14] Mitchell Nelson, Zachary Sorenson, Joseph M. Myre, Jason Sawin, and David Chiu. "GPU Acceleration of Range Queries over Large Data Sets," Proceedings of the 6th IEEE/ACM International Conference on Big Data Computing, Applications and Technologies, 2019, pp. 11–20. https://doi.org/10.1145/3365109.3368789.
[15] Witold Andrzejewski, and Robert Wrembel. "GPU-WAH: Applying GPUs to Compressing Bitmap Indexes with Word Aligned Hybrid," Database and Expert Systems Applications, 2010, pp. 315–329. https://doi.org/10.1007/978-3-642-15251-1_26.
[16] Henning Funke and Jens Teubner, “Data-Parallel Query Processing on Non-Uniform Data,” PVLDB, vol. 13, no. 6, pp. 884–897, 2020. https://doi.org/10.14778/3380750.3380758.
[17] Alex Horn, Ali Kheradmand, and Mukul R. Prasad, “Delta-net: Real-time Network Verification Using Atoms,” in USENIX NSDI, 2017, pp. 735–749. https://www.usenix.org/conference/nsdi17/technical-sessions/presentation/horn-alex.
[18] Lun Ai, “Boolean Matrix Logic Programming on the GPU,” arXiv:2408.10369, 2024. https://doi.org/10.48550/arXiv.2408.10369.
[19] Mahdi Abbasi, Razieh Tahouri, and Milad Rafiee. “Enhancing the performance of the aggregated bit vector algorithm in network packet classification using GPU,” PeerJ Computer Science, vol. 5, article e185, 2019. https://doi.org/10.7717/peerj-cs.185.
[20] Sangjin Han, Keon Jang, KyoungSoo Park, and Sue Moon. "PacketShader: A GPU-Accelerated Software Router," Proceedings of the ACM SIGCOMM 2010 conference, 2010, pp. 195–206. https://doi.org/10.1145/1851182.1851207.
[21] Giorgos Vasiliadis, Lazaros Koromilas, Michalis Polychronakis, and Sotiris Ioannidis, “GASPP: A GPU-Accelerated Stateful Packet Processing Framework,” in USENIX Annual Technical Conference, 2014, pp. 321–332. https://www.usenix.org/conference/atc14/technical-sessions/presentation/vasiliadis.