XLOG: A CUDA-Native Engine for Neurosymbolic Integration
Organizations: Brainyblaze Dynamics Inc.
Abstract
xlog is a CUDA-native logic programming engine integrating neural perception with deterministic Datalog, probabilistic inference, and epistemic world views through a typed frontend and provider-owned CUDA runtime. Its reasoning modes share device data planes, but their execution boundaries differ: ordinary Datalog and exact inference are host-orchestrated, while certified resident recursive and Monte Carlo sampled cores record zero tracked host-device transfers before a bounded terminal receipt. The probabilistic path supports end-to-end gradients through GPU knowledge compilation from provenance to CNF to Decision-DNNF, exact weighted model counting, and backward gradients. A final smoothed circuit is certified against its source formula before caching or evaluation. Circuit caching yields a 2.74x MNIST-addition training speedup; a worst-case-optimal join subsystem yields a 27.96x geometric-mean gain over xlog's binary-join baseline. MNIST-addition accuracy matches Scallop's (0.9561 versus 0.9468), but no per-epoch speed claim is made because baseline epoch time varies with CPU quota. In five hub-skewed triangle-counting cases, the Souffle-to-fused-xlog execution-time ratio rises from 0.88x at 150k edges, where Souffle is faster, to 5.54x at 1.2M; fused peak device allocations are 85-1,033 MB versus 3,287-44,979 MB for the materializing arm. Exact inference is correctness-equivalent to but slower than ProbLog2. On a public video benchmark, a proximity predicate trained only through symbolic credit replaces hand-set geometry at unchanged held-out accuracy; within Event-Calculus rule search it fails ten-fold cross-validation and does not transfer on a leak-free split. On a maritime corpus, weighted clauses beat crisp selection by 0.065 F1, with the result reproduced by one chronological training pass.
Figures & tables
| Kernel | Purpose |
|---|---|
| join | Hash join with linked-list collision chains and FNV-1a composite hashing over raw key bytes, so all scalar types share one path; count scan materialize variants for inner and left-outer joins. |
| sort | Stable 4-bit radix sort (8 passes over 32-bit keys): per-pass histogram, prefix sum, scatter. |
| filter | Comparison operators for column-vs-constant and column-vs-column, with stream compaction via prefix sum. |
| groupby | Sorted-input grouped aggregation: boundary detection, then per-group Count/Sum/Min/Max/LogSumExp reduction. |
| dedup | Sort-based deduplication and set difference with type-aware equality, including IEEE 754 float handling. |
| set_ops | Union (concat + sort + dedup) and set difference via sorted-array binary search. |
| Judgement | What it judges | Path |
|---|---|---|
| Six always-run gates | the rule derives every training positive and no training negative, passes the novel-fact audit, loses no protected fact, meets a held-out F1 threshold, and names only relations with typed schemas | dILP |
| Two held-out gates | the same rule on the supplied held-out positives and negatives | dILP |
| Ambiguity scan | which other candidates also explain the data; reported, never decisive | dILP |
| Permutation-null fit threshold | whether a candidate generalizes better than shuffled labels do on its own fold | arbiter |
| Run | P | R | F1 |
|---|---|---|---|
| Windowed folds, direct target (mean of 3 folds) | |||
| precomputed close | — | — | 0.7905 |
| learned close_nn | — | — | 0.8276 |
| Distributed corpus, 10-fold CV, EC + inertia | |||
| pre-registered | 0.6580 | 0.8271 | 0.7329 |
| + termination relations | 0.7357 | 0.8260 | 0.7782 |
| Quantity | Value |
|---|---|
| Rows (vessel pair timestamp) | |
| Vessel pairs | |
| carrying a rendezVous interval | |
| negatives, by fixed stride | |
| Gold intervals | |
| Positive rows |
| Run | P | R | F1 | F1, fold median |
|---|---|---|---|---|
| Base vocabulary (11 relations; declared ceiling ) | ||||
| crisp search | 0.5109 | 0.9925 | 0.6746 | 0.6596 |
| weighted, batch | 0.8715 | 0.6426 | 0.7398 | 0.6928 |
| weighted, forward pass | 0.8715 | 0.6426 | 0.7398 | 0.6928 |
| weighted, reverse pass | 0.8715 | 0.6426 | 0.7398 | 0.6928 |
| Duration vocabulary ( sustained_240 ; ceiling ) | ||||
| Base vocabulary | f0 | f1 | f2 | f3 | f4 |
|---|---|---|---|---|---|
| crisp search | 0.9933 | 0.4690 | 0.6685 | 0.5699 | 0.6596 |
| weighted, all three | 0.9346 | 0.4237 | 0.8000 | 0.6928 | 0.5342 |
| Pooled counts | tp / fp / fn | ||||
| ceiling probe, base | 3,579 / 3,689 / 0 | ||||
| crisp search | 3,552 / 3,400 / 27 | ||||
| weighted, all three | 2,300 / 339 / 1,279 | ||||
| Setting | Value |
|---|---|
| Sample size | 10–100 runs (benchmark-dependent) |
| Warm-up | 3 iterations (PTX JIT, memory-pool init) |
| Significance level | 0.10 |
| Noise threshold | 0.05 (ignore variance) |
| Seeding | Deterministic LCG |
| Item | Value |
|---|---|
| Query | three-way triangle join, one multiway join |
| Key generation | four fixture variants, coinciding size parameters |
| Input | three relations of rows each |
| Output | M triples |
| Warm-up | windows |
| Reported time | mean of timing windows |
| Metric | Value | Notes |
|---|---|---|
| First epoch (cold) | s | D4 compile + CDCL verify |
| Steady-state epoch (warm) | s | cached forward/backward path |
| Total training (5 epochs) | s | |
| Per-query cost (steady state) | ms | forward + backward; steady epoch over 256 pairs, cold epoch excluded |
| Ablation, uncached arm | s | mean training time, recompiling every epoch |
| Ablation, cached arm | s | mean training time, compiling once |
| Mode / task | Baseline | xlog | Baseline | Ratio |
|---|---|---|---|---|
| Neural: MNIST addition; 20 000 training images, 5 epochs, 3 seeds, held-out on the 10k test set | Scallop | acc | acc | accuracy parity; no timing claim |
| Probabilistic: exact inference on five small programs | ProbLog2 | error; per query flat at – s | error; per query – s | – slower |
| Deterministic: triangle counting on hub-skewed graphs of M to M triangles | Soufflé (standalone compiled mode, 26 jobs) | counts match at every size; – s, nearly flat in the input; peak device allocations – MB | – s, growing with the input; one-time per-case compilation recorded separately | Soufflé/xlog: |
| System | P | R | F1 | Source |
|---|---|---|---|---|
| Hand-crafted rules | OLED [ 21 ] Tab. 1(b), EC_crisp ; the same value appears in WOLED [ 22 ] Tab. 2 | |||
| OLED | OLED [ 21 ] Tab. 1(b), whole dataset | |||
| OLED, as re-run by other authors | — | — | WOLED [ 22 ] Tab. 2 | |
| This work, EC inertia, pre-registered | 10-fold CV by video segment, all gates re-derived per fold ( Section 7 ) | |||
| WOLED-ASP | — | — | WOLED [ 22 ] Tab. 2 |
| Run | Corpus | P | R | F1 | tp / fp / fn |
|---|---|---|---|---|---|
| meeting , Event-Calculus route, pre-registered | distributed | / / | |||
| meeting , direct-protocol reference, same folds | distributed | / / | |||
| meeting , Event-Calculus route with learned close_nn | distributed | / / | |||
| meeting , Event-Calculus route | clean | — | — | / / | |
| meeting , direct route | clean | — | — | / / | |
| moving , Event-Calculus route, no initiation clause on any fold | clean | — | — | — | / / |
| Setting | Measured |
|---|---|
| Verification cost | |
| chain | CDCL verify ms |
| chain | CDCL verify ms |
| Residency benefit | |
| per handoff | round-trip of roughly – s |
| handoffs/step | of the step |
| Fixture | Baseline median optimized median |
|---|---|
| Persistent index reuse: repeated-session semi-join, eight left rows probing eight million right rows | ms ms, a gain over timed runs after warm-up runs |
| Shared-memory chain scorer: chain-hot body search, candidate rows against a gate threshold of | ms ( – ) ms ( – ), a gain over timed runs after warm-up runs |
| Dimension | DeepProbLog | Scallop | Lobster | GPUlog | xlog |
|---|---|---|---|---|---|
| Symbolic execution | CPU (Prolog) | CPU (Datalog) | GPU (Datalog) | GPU (Datalog) | GPU (semi-naive) |
| Probabilistic inference | Exact (CPU) | Provenance (CPU) | Provenance (GPU) | None | Exact d-DNNF + MC (GPU) |
| Circuit verification | None | None | None | — | On-GPU CDCL |
| Neural integration | Prolog bridge | Differentiable | Differentiable (GPU) | None | Zero-copy, fused |
| Zero-copy ML interop | No | Partial | Partial | No | Yes |
| Rule structure induction | No | No | No | No | Yes (beta): trainable bodies, dILP |
Neuro-Symbolic Reasoning
Neuro-symbolic reasoning combines learned neural models with explicit logic, rules, knowledge structures, or executable tools to solve structured tasks.
See all 275 papers