Inspiration

Private drafts often mix measured observations, citations, opinions, and unsupported universal claims. Sending them to a cloud reviewer can create a second trust problem. We built LocalProof as a small, fully local checker that helps a human find evidence gaps—and holds its own performance claims to the same evidence standard.

What it does

LocalProof reads a local UTF-8 Markdown or text document, keeps its content on-device, and scores each non-heading line with a lightweight linear classifier. The JSON report labels a claim as needs_evidence or evidence_linked, provides a probability, and exposes the strongest lexical signals so the result remains inspectable.

LocalProof is evidence triage, not automated fact checking. evidence_linked means the sentence resembles a referenced claim; a human must still decide whether the cited source is correct, relevant, and authoritative.

How we built it

The core is a dependency-free Swift command-line application compiled natively for Apple Silicon arm64. A deterministic Python standard-library script trains a transparent logistic model from an embedded template corpus.

The reproducible dense baseline stores unquantized weights in JSON and scans the full vocabulary. A stronger intermediate baseline retains the compact INT8 model but uses the prior sparse String dictionary. The accepted R5 path uses that same INT8 file while one ASCII pass lowercases, tokenizes, de-duplicates, and accumulates through a collision-checked compact open-address table. Non-ASCII text keeps the Unicode fallback. We do not claim KleidiAI, SME, Core ML, GPU, or NPU acceleration.

Our evidence command clean-builds the models and release binary, verifies architecture with file and lipo, runs nine tests, records nine latency processes for each of three paths across two synthetic slices, records five peak-RSS processes per path, evaluates quality/calibration/parity, checks exact fused-versus-string probabilities, rotates process order, retains failed attempts, records the device/toolchain, and hashes every accepted artifact.

Measured result

The accepted run award-r5-final-20260805T035314Z was recorded on a real Apple M5 Pro Mac17,9 running native arm64 code:

  • native binary: Mach-O 64-bit executable arm64, independently shown by file and lipo;
  • model size: 2,580 bytes to 804 bytes, 68.84% smaller;
  • original synthetic slice: 5.485 µs dense, 4.214 µs string-sparse, and 0.168 µs fused—32.69x versus dense and 25.11x versus the prior optimized path;
  • independent synthetic slice: 7.623 µs dense, 6.126 µs string-sparse, and 0.219 µs fused—34.86x and 28.01x;
  • quality: 33/40 and 43/48 for both engines, 100% label agreement, 0.003338 maximum probability drift, and all 24 risky/evidence pairs ordered correctly;
  • fused and prior string kernels: bit-exact probabilities on all 88 flat fixtures;
  • median peak RSS: 6.70 MiB dense, 6.73 MiB string-sparse, and 6.59 MiB fused—no meaningful process-memory improvement is claimed.

Both evaluation slices are transparent project-authored synthetic fixtures. They test reproducibility, lexical transfer, calibration/parity, and paired ranking; they are not real-world accuracy estimates. Only this Apple Silicon Mac was tested, so the performance result is not a cross-device guarantee.

Challenges we ran into

The hardest part was proving that a large speedup was not a shortcut. Tokenization remains inside timing, all three paths see identical text and work counts, the prior optimized path remains as a stronger baseline, and a dedicated command proves fused/string probabilities are bit-exact. A Set-based variant passed quality but was about 1.8x–2.0x slower than the accepted small-array de-duplication and remains in the failed-attempt archive. Swift runtime overhead still dominates RSS, so no process-memory claim is made.

Accomplishments we're proud of

  • Fully local document analysis with no account, network, cloud, paid API, or metered service.
  • Native Mach-O arm64 release executable with architecture evidence.
  • Deterministic model export with SHA-256 receipts.
  • Repeated-process measurements across two slices and three execution paths.
  • Exact kernel parity, calibration metrics, ranking checks, raw JSON logs, and hash-bound receipts.
  • A one-command evidence package that makes both improvements and limitations inspectable.

What we learned

An optimization artifact is more useful than a single fast number. A defensible local-AI claim needs a chain from deterministic model generation to native architecture proof, repeated measurements, quality parity, neutral results, limitations, and hashes.

What's next

Potential future work includes multilingual evaluation, OCR/image adapters, offline tabular-data input, a larger independently labeled corpus, signed client packaging, and optional Arm-focused inference runtimes. None of those are implemented or claimed in this submission.

Try it

The public MIT repository contains the source, reproducible evidence, screenshots, and judge instructions. On Apple Silicon macOS with Swift 6 and Python 3.11:

make build
make test
make demo

Built With

Share this project:

Updates

Submission history