No. 01CS Capstone Defense · Computer Science Dept.

A private, on-device predictive keyboard

On-Device
Predictive Keyboard

TypeAhead — thesis defense, Computer Science Department

Jordan Ames·Advisor: Prof. Elena Cho·
CoverDefense date: May 14, 2026
No. 02Contents

Defense roadmap

i.The problem — cloud keyboards leak keystrokesPG 03
ii.The evidence — accuracy, latency, privacyPG 06
iii.The contribution — four things that are newPG 08
iv.Limitations & committee Q&APG 10
Contents02 / 10
No. 03Section i
01

The problem —
keystrokes leave the phone

Every major mobile keyboard (Gboard, SwiftKey) ships raw keystrokes to cloud servers for next-word prediction — a privacy liability class-action suits have already targeted.

The problem03 / 10
No. 04Section i · The problem

Three design principles

TypeAhead: on-device,
federated, adaptive

On-device inference

A 2.1M-parameter transformer runs entirely on-device via Core ML / NNAPI. No keystroke ever leaves the phone — verified by packet-capture across 40 hours of typing.

Federated fine-tuning

Personalization trains locally overnight and syncs only encrypted gradient deltas — the same class of protocol behind Gboard's federated learning, rebuilt at capstone scale.

Adaptive vocabulary

A per-user trie re-ranks candidates against typing history, so names, slang, and jargon surface within roughly 200 keystrokes without retraining the base model.

The problem04 / 10
No. 05Section i · The problem

The question isn't whether an on-device model can predict text — it's whether it can do it as well as the cloud, without the privacy trade-off.

— Prof. Elena Cho, thesis advisor

Quote05 / 10
No. 06Section ii · The evidence
94.2% top-3 hit rate

On-device accuracy

Evaluated on a held-out set of 50,000 keystrokes from 12 volunteer typists, TypeAhead matches Gboard's cloud model (95.1%) within 0.9 points — using a model 40× smaller.

The evidence06 / 10
No. 07Section ii · The evidence

Latency benchmark — Pixel 7, cold cache

18ms beats the 340ms cloud round trip

18ms
TypeAhead (ours)
34ms
SwiftKey (on-device)
120ms
Gboard (cloud)
340ms
GPT-4o API (cloud)
The evidence07 / 10
No. 08Section iii · The contribution

Existing keyboards — versus TypeAhead

Cloud keyboards (Gboard, SwiftKey)

  • Keystrokes leave the device
  • No offline personalization
  • 120–340ms median latency over the network
  • Opaque to independent audit

TypeAhead (this thesis)

  • 100% on-device inference, no network calls
  • Federated personalization, encrypted deltas only
  • 18ms median latency, no radio required
  • Open evaluation harness + full weights released
The contribution08 / 10
No. 09Section iii · The contribution

Four contributions of this thesis

Contribution i

2.1M-param transformer

A quantized 8-bit transformer that fits in 6.8MB and runs inference in under 20ms on a mid-range 2021-era phone.

Contribution ii

Federated update protocol

A gradient-delta sync protocol that personalizes overnight on Wi-Fi and charge, verified to leak no raw text in transit.

Contribution iii

Privacy-utility benchmark

A reproducible 12-participant, 50K-keystroke harness comparing on-device and cloud keyboards on accuracy, latency, and battery.

Contribution iv

Open weights & code

Full model weights, training scripts, and the eval harness published for the department's future capstones to build on.

The contribution09 / 10
No. 10Limitations & defense

Yes, it scales —
within limits.

Committee question addressed: given six more months, TypeAhead's federated protocol generalizes to any keyboard vocabulary — the constraint is per-language training data, not architecture.

Defense10 / 10