The Journal

Engineering

On-Device AI: Privacy by Architecture

March 20, 2025

If you're building AI into your products or evaluating AI tools for your operation, where the computation happens is the most important decision you'll make. Not which model. Not which framework. Where it runs. Here's how to architect privacy into your AI systems — and why 'we encrypt everything' isn't good enough.

There's a question you should ask every AI vendor, every internal development team, and yourself before building any AI system: where does the computation happen?

If the answer is "in the cloud," you've just made a series of decisions about privacy, reliability, and dependency that most teams never explicitly choose. They inherit them by default, because cloud is the path of least resistance. This post is about the alternative — on-device AI — and why it's worth the extra effort for a large class of applications.

Why "We Encrypt Everything" Isn't Enough

Most AI vendors address privacy concerns with encryption. Data is encrypted in transit, encrypted at rest, encrypted everywhere. This sounds reassuring. It isn't.

Here's the problem: encrypted data still leaves your device. It still transits the internet. It still sits on someone else's server while inference runs. Encryption protects against interception — it doesn't protect against the vendor themselves. They can decrypt it (they have to, to run inference). They can be compelled to hand it over by a court order. They can have a breach. They can change their terms of service to include your data in their training pipeline.

Encryption is a lock on someone else's door. On-device processing means the data never leaves your house.

This distinction matters enormously in industries where data sensitivity is high. If you're in construction, your scans contain building layouts and structural assessments. In healthcare, you're handling patient information. In legal, it's privileged communications. In any field operation, you're documenting someone's property. All of this data has value to bad actors and liability for you.

Privacy by architecture means making privacy violations physically impossible, not just contractually prohibited. You can't leak data you never collected.

When On-Device Makes Sense

On-device AI isn't the right choice for every application. Here's a practical framework for deciding:

Choose on-device when:

Your users work in environments with unreliable internet. Basements, rural properties, metal buildings, construction sites — anywhere cellular signal is inconsistent. If your AI needs a cloud round-trip and the connection drops, the user is staring at a spinner while their billable hour ticks away.

Your data is sensitive by nature. Property scans, health records, financial documents, legal materials. If a data breach would cause real harm to your users' clients, removing the breach vector entirely is better than encrypting it and hoping.

Your users need real-time results. LiDAR processing, photo classification, measurement extraction — anything where a visible delay between input and output breaks the workflow. Cloud round-trips add 200-500ms minimum. On-device inference can run in under 50ms.

You want your product to work independently of your infrastructure. If your company went away tomorrow, would the app still function? On-device AI says yes. Cloud AI says no. For users evaluating long-term tool investments, that independence is a meaningful differentiator.

Choose cloud when:

Your models are genuinely too large for device hardware. Large language models with billions of parameters don't fit on a phone. If your application requires GPT-4-class reasoning, cloud is your only option — for now.

Your application requires aggregated data across users. Trend analysis, benchmarking, collaborative features — anything that requires combining data from multiple sources inherently needs a server.

Model updates need to be instant. Cloud models can be updated without app releases. On-device models require downloads and app store approvals. If your model changes weekly, the update friction of on-device becomes a real constraint.

The Engineering Tradeoffs

If you're building on-device AI, here's what you're signing up for — honestly.

Model size constraints. A phone shares its memory across everything it's running. Your model needs to coexist with the OS, other apps, and your own application logic. In practice, this means aggressive quantization (INT8 or INT4 instead of FP32), careful architecture selection (MobileNet, EfficientNet, or custom architectures optimized for mobile), and extensive testing on older devices. Don't just test on the latest flagship — test on the three-year-old refurbished phone your actual users carry.

Battery management. Neural network inference is computationally expensive. Run it continuously and you'll drain the battery in two hours. The solution is intelligent scheduling: only run inference when it's needed, use the hardware Neural Engine when available (Apple's ANE, Qualcomm's AI Engine), and design your UX so inference happens in bursts rather than streams.

Update complexity. Cloud models update with a server deployment. On-device models update with an app release. This means you need to be more disciplined about model versioning, backward compatibility, and graceful degradation when a user hasn't updated yet. Plan for it from day one.

Performance optimization is ongoing. Cloud inference scales by adding servers. On-device inference is constrained by fixed hardware. Optimization isn't a one-time task — it's a permanent engineering commitment as your models grow and your features expand.

A Practical Architecture Pattern

The approach that works best in practice is a hybrid with clear boundaries: core inference runs on-device, optional cloud features are additive.

Your product's essential function — the thing the user bought it for — works completely offline. Photo classification, measurement extraction, document scanning, whatever your core capability is. No internet required. Full functionality.

Cloud features are opt-in enhancements: cross-device sync, team collaboration, aggregated analytics, model updates. They add value when available but their absence doesn't break the product. The user explicitly chooses to send data to the cloud, understanding what they're sharing and why.

This pattern gives you the reliability and privacy of on-device processing for the core experience, while still enabling connected features for users who want them. It also makes your privacy story simple and honest: "Your data stays on your device unless you explicitly choose to share it."

The Competitive Advantage You're Not Seeing

Privacy architecture isn't just risk mitigation — it compounds as a competitive advantage. Every competitor data breach strengthens your position. Every regulatory change you're already compliant with is a headache your competitors have to scramble to address. Every privacy-conscious customer who discovers you can't leak their data because you never had it becomes an evangelist.

The investment cost is real. On-device AI is harder to build, harder to optimize, and harder to update. But the ongoing cost of cloud privacy management — legal review, security audits, breach response planning, compliance monitoring — is higher and never stops.

If you're building AI products for privacy-sensitive industries, architecting for on-device inference isn't just a nice-to-have. It's a structural advantage that your cloud-dependent competitors can't replicate with a policy update.

Next post: Building For Contractors, Not Tech Bros — coming April 2025.

Want to talk about something you read?

If an essay reminded you of something happening in your business, we’d like to hear about it.