Inspiration

Some files are used every day. Others are meant to survive: film and image masters, scientific datasets, cultural collections, and institutional records.

As a biotechnology student, I was drawn to synthetic DNA because it could become an extremely dense, long-lived medium for that kind of cold archive. But storing bytes is only half of the problem. Sequencing does not return a perfect copy. Insertions and deletions shift every base after them, substitutions change symbols, and each stored strand comes back as a cluster of imperfect reads.

My goal was not to build another educational DNA visualizer. I wanted to test one practical part of a future storage system: can noisy DNA fragments be reconstructed into the original file, and can the system prove that the result is exact rather than merely plausible?

Why DNA archives

DNA is not a faster replacement for cloud storage, SSDs, or tape. Its possible advantage is cold data: information written rarely and preserved for decades, where information density, stability, and potentially low energy at rest matter more than instant access.

The long-term use cases could include films, images, scientific data, cultural heritage, and institutional records. The technology is not production-ready: synthesis cost, read latency, rewriting, fragment routing, error correction, and real sequencing performance are still serious barriers. HelixTrace focuses on one of those barriers—reliable read back from imperfect evidence.

What it does

HelixTrace is an ML-assisted prototype for recovering files from noisy synthetic-DNA reads without giving the decoder the original sequence.

A small uploaded file is framed with its filename, media type, length, and SHA-256 digest. The frame is encoded into DNA, divided into fragments, and passed through a deterministic channel that adds insertions, deletions, and substitutions. Each fragment produces a cluster of variable-length noisy reads.

The decoder reconstructs every fragment from those reads alone, joins them, decodes the bytes, and checks the embedded digest. The important contract is simple: if SHA-256 matches, the verified file can be downloaded. If it does not match, HelixTrace fails closed and releases nothing.

The app also includes a strand sandbox where fixed reconstruction methods can be compared under the same evidence and search budget.

How I built it

The project is a Python package with a Streamlit interface, a command-line experiment runner, deterministic benchmark scripts, committed model provenance, and 151 automated tests.

The default encoder is reversible and guarantees exactly 50% GC content with no adjacent repeated bases. The reconstruction engine combines an order-independent trace medoid, global alignment, boundary-aware insertion handling, alignment consensus, and matched local-search refinements.

Every experiment reproduces from its seed. The original sequence creates the synthetic read clusters, then leaves the reconstruction path completely. It returns only after reconstruction to measure performance.

Where ML helps

The learned component is deliberately small and inspectable. Four deterministic methods produce plausible candidates, and a trained ridge model ranks them using read agreement, sequence features, candidate agreement, and biological summaries. It selects candidates; it does not invent DNA and never sees the hidden source during inference.

I kept this result honest. On a separate 120-experiment held-out split, the reranker reduced mean normalized edit distance by 11.56% versus basic consensus, but only 0.33% versus the strongest fixed candidate. Exact recovery did not improve. That is a small measured gain, not evidence that ML always wins.

How Sol was used

Codex powered by GPT-5.6 Sol was my main engineering partner. I used it to audit the rules and the existing scaffold, define a falsifiable product boundary, build the file-to-DNA-to-file pipeline, write adversarial tests, train and inspect the reranker, challenge scientific claims, run browser QA, deploy the free app, and prepare the submission.

The workflow was iterative: inspect, implement, test, benchmark, question an assumption, and revise. Sol also helped split bounded tasks across parallel agents and then integrate and verify the result.

There is an optional maintainer-only OpenAI Responses API analyst in the repository, but the public app does not need an API key or paid credits. That analyst can only interpret bounded precomputed metrics; it cannot alter reconstruction or declare success.

Results

In the browser demo, a five-byte proof file becomes 22 fragments and 242 noisy reads. All 22 fragments reconstruct exactly and the recovered SHA-256 matches.

A committed 48-file benchmark recovered 34 complete files and 794 of 816 fragments. With 11 reads per fragment and a 1% probability for each error type, all 12 files in that configuration recovered. With 7 reads and 2% error probability, only 2 of 12 recovered.

That gap matters: 97.3% exact fragments became only 70.8% complete files overall, because one wrong fragment is enough to fail the final integrity check.

Challenges

The hardest parts were handling variable-length evidence after insertions and deletions, keeping the original sequence out of the decoder, designing a reversible file format, and making success cryptographically testable.

Another challenge was deciding what not to claim. The prototype uses simulated reads, known fragment clusters, known ordering, and very small files. A polished interface cannot replace missing production layers or wet-lab evidence.

What I learned

Reconstruction should end in a user-verifiable outcome, not only a similarity score. Biological constraints are useful assumptions, not guarantees, and they can hurt when the source violates them. I also learned that a tiny honest ML result is more useful than an inflated one.

Most importantly, the project returned to the question I started with: not how to explain DNA storage, but how to recover the actual file reliably.

Limitations and what is next

HelixTrace is a controlled software prototype, not a wet-lab or production DNA-storage system. It does not yet include production error-correcting codes, demultiplexing, fragment-loss simulation, empirical sequencer calibration, or large-file support.

Next I would add explicit addressing and ECC, evaluate real clustered nanopore reads, expand the benchmarks across asymmetric error rates and payload sizes, and explore a compact sequence reconstructor with biological penalties in its training objective while keeping the deterministic engine as a control.

Built With

Share this project:

Updates