
BooleanSetGates: A Set-Theoretic Neuro-Symbolic Orchestrator for Deterministic Policy Gating and Privacy-Preserving Agentic Workflows
Project Overview
BooleanSetGates: Set-Theoretic Neuro-Symbolic Orchestrator
1. Executive Summary
As Large Language Models (LLMs) and autonomous agents are increasingly deployed in high-stakes enterprise, legal, and clinical settings, organizations face a critical barrier: the fundamental conflict between the probabilistic nature of transformer architectures and the deterministic demands of business and regulatory compliance.
Purely neural systems struggle with several systemic failure modes:
Existing runtime guardrail frameworks (such as NVIDIA NeMo Guardrails or Guardrails AI) rely on probabilistic classifiers or keyword filters that are easily bypassed and fail to guarantee absolute regulatory compliance.
2. Idea but not re-inventing the wheel: The Neuro-Symbolic Middleware Orchestrator
BooleanSetGates addresses these challenges by introducing a neuro-symbolic "sandwich" architecture that completely decouples natural language processing from logical policy execution. Instead of relying on the LLM to understand and enforce policy rules dynamically, BooleanSetGates compiles human-readable policies offline into an immutable, deterministic execution layer composed of strict Boolean algebraic gates (such as AND, OR, NOR, and MUTUALLY EXCLUSIVE / XOR).

The system operates in three distinct phases managed by a central Orchestrator:
Phase A: Forward Compilation & Round-Trip Validation
An offline, high-capacity model acts as a semantic parser, decomposing complex natural language regulations into structured Abstract Syntax Trees (ASTs). To guarantee that the compiler itself has not hallucinated or altered the logic, BooleanSetGates runs a Round-Trip Reconstruction with Self-Refinement loop:
Phase B: On-Premises, Zero-Exposure Fact Extraction
During online execution, raw sensitive text is processed entirely locally. The orchestrator uses lightweight on-premises tools (such as regex-based templates or specialized spaCy Named Entity Recognition models) to extract key operational values. For instance, a patient’s record is parsed to determine if Age >= 18 ($X_1$) and Has_Cardiovascular_History ($X_2$).
Phase C: Local Symbolic Evaluation
The instantiated boolean variables are evaluated using a deterministic local solver (such as PySAT or an offline SMT-solver). The cloud-based orchestrating LLM never sees the raw sensitive text or variables. It only receives a sanitized, abstract boolean outcome and corresponding compliance flags (e.g., Refuse_Action: True or Safety_Alert: 4), using the model purely for final linguistic coordination and response formatting.
3. Added Set-Theoretic Optimizations
To scale this system to handle thousands of complex, overlapping, and potentially conflicting regulatory rules across enterprise databases, BooleanSetGates integrates mathematical Set Theory to optimize both reasoning accuracy and computational processing speed.
1. Global Conflict Resolution via Formal Concept Analysis (FCA)
When hundreds of business or clinical rules are ingested, BooleanSetGates structures them as a Formal Context—a binary mathematical matrix ($K = (G, M, I)$) where $G$ represents the set of policy rules, $M$ represents the set of extracted semantic variables, and $I$ defines the incidence relation (which rules require which variables).
FCA computes a complete, hierarchical Concept Lattice:
2. Logic Minimization & Factorization
Overlapping policies frequently contain redundant logical conditions. For example, multiple medical protocols might independently check for age, fasting state, and blood pressure. BooleanSetGates uses heuristic logic minimization algorithms (such as the Espresso heuristic minimizer) to optimize multi-level logic:
3. High-Speed Bitwise State Vector Execution
Rather than interpreting nested conditional loops or running continuous logical deductions at runtime, BooleanSetGates maps the compiled rules into compact State Vectors—mathematical sets representing all valid truth-table assignments for a given policy.
Specifications
Tech Stack
Need help in research integration?
Get in touch to discuss specialized development and consulting opportunities.