Inspira# SHROUD — Intelligence Without Unnecessary Exposure

What if AI could help you understand sensitive documents without automatically exposing them to the cloud?

SHROUD is a privacy-aware hybrid AI workbench built with Firebase AI Logic. It transforms privacy from a hidden technical decision into a visible, interactive, and verifiable user experience.

Inspiration

AI-powered applications often prioritize convenience while leaving users with limited visibility into where their data is processed and what information is shared.

We wanted to challenge that assumption.

Instead of asking users to blindly trust an AI application, SHROUD lets them inspect the privacy boundary before inference, explicitly authorize cloud-capable processing, and verify the integrity of the prompt afterward.

Our philosophy is simple:

Intelligence should adapt to the user's privacy requirements — not the other way around.

What it does

SHROUD provides three explicit inference routes:

  • Device Only: Processes the original document using on-device intelligence without permitting cloud inference.
  • Redacted Hybrid: Applies local sensitive-data redaction and requires explicit consent before enabling Firebase's device-preferred inference with cloud fallback.
  • Redacted Cloud: Processes a reviewed, redacted prompt through cloud inference with explicit user authorization.

The application supports document summarization, customer support classification, and customer reply generation.

A real-time Data Journey visualization shows how information moves through the privacy boundary, which execution source the Firebase SDK reports, and how the inference receipt is produced.

How we built it

SHROUD integrates Firebase AI Logic directly into a browser-based application.

Its architecture consists of five layers:

  1. Privacy Boundary Engine — Local risk detection, sensitive-data redaction, consent enforcement, and stale-review invalidation.
  2. Hybrid Inference Router — Firebase AI Logic using ONLY_ON_DEVICE, PREFER_ON_DEVICE, and ONLY_IN_CLOUD.
  3. Application Protection — Firebase App Check with reCAPTCHA Enterprise.
  4. Inference Evidence Layer — Exportable metadata containing the selected route, SDK-reported execution source, elapsed time, and SHA-256 prompt digest.
  5. Integrity Verifier — Browser-based SHA-256 recomputation that detects modifications to the original prompt without requiring another AI request.

The cloud-capable configuration uses Gemini 3.5 Flash-Lite, while supported on-device inference uses Gemini Nano.

Real implementation and validation

SHROUD is a working application connected to Firebase AI Logic, not a simulated inference interface.

We successfully demonstrated:

  • Device-only inference with ON_DEVICE provenance.
  • Hybrid inference executed on-device.
  • Explicit cloud inference with IN_CLOUD provenance.
  • Automatic hybrid fallback under controlled local-model unavailability.
  • Local redaction of recognized email addresses, phone numbers, and payment card numbers.
  • Consent enforcement before cloud-capable inference.
  • Successful prompt integrity verification.
  • Detection of a single-character prompt modification.

The controlled fallback environment restricts access to the browser's local Language Model API while preserving Firebase's PREFER_ON_DEVICE routing mode. This allows the cloud fallback behavior to be demonstrated under reproducible conditions.

Automated unit and browser tests complement the live inference evidence.

What makes SHROUD different

SHROUD treats hybrid AI as a privacy architecture rather than simply a performance optimization.

Users can inspect what is permitted to leave the privacy boundary before inference begins. After execution, they receive metadata that connects the reviewed prompt to the SDK-reported execution source.

Privacy decisions become understandable, interactive, and inspectable.

Challenges we faced

One of our biggest challenges was demonstrating genuine automatic fallback without replacing it with a manually selected cloud route.

We also encountered model availability differences, browser capability restrictions, cloud model compatibility issues, and the need to keep privacy decisions synchronized with changing document content.

These challenges led us to implement explicit source validation, a controlled fallback environment, stale-review invalidation, and reproducible prompt integrity checks.

What we learned

Building SHROUD taught us that hybrid inference requires more than connecting two execution environments.

Responsible hybrid AI also requires clear consent boundaries, transparent execution metadata, meaningful failure handling, and honest communication about what can and cannot be verified.

Our current redaction system is pattern-based and does not guarantee complete anonymization. Inference receipts are unsigned browser metadata, not independently attested execution proofs.

Accomplishments we're proud of

  • Real Firebase on-device and cloud inference.
  • Three explicit privacy-aware inference routes.
  • Reproducible automatic hybrid fallback.
  • Interactive data-flow visualization.
  • Exportable inference receipts.
  • Successful integrity and tamper-detection demonstrations.
  • Responsive desktop and mobile interfaces.
  • Passing automated tests and continuous integration.
  • A publicly accessible deployment and MIT-licensed source code.

The demonstrated prototype operates using a zero-cost deployment configuration.

What's next for SHROUD

Our next steps include more comprehensive local sensitive-data detection, configurable organizational privacy policies, expanded browser compatibility, and stronger cryptographic evidence mechanisms.

Our long-term vision is to make privacy boundaries a standard component of hybrid AI applications.

Your data. Your boundary. Your intelligence.


Explore SHROUD

Built for Google #BuildHybridAI 2026.tion

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for SHROUD

Built With

Share this project:

Updates

Submission history