DEV Community

Cover image for I Taught Open-Source AI to Listen to the Ghosts of Broken Machines
Ashutosh Kumar
Ashutosh Kumar

Posted on

I Taught Open-Source AI to Listen to the Ghosts of Broken Machines

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is our team submission for the Hacktoberfest Open-Source AI Challenge — Week 4: Ghost in the Machine.

What I Built

A machine stops talking when its experiment ends. Its sensors do not.

Somewhere in the UCI hydraulic systems archive, experiment 735 left behind sixty seconds of pressure, flow, temperature, vibration, and power measurements. The pressure rises, levels off, falls, and rises again. The recording has a known experimental condition—but what happens if an AI model tells a different story?

That question became ECHO-17: The Machine That Remembers, an interactive, open-AI-powered forensic lab for real historical machine recordings.

Instead of asking visitors to trust a classification badge, ECHO-17 lets them:

  1. Recover a case from a real archive and replay six measured sensor signals across sixty seconds.
  2. Summon its Ghost Signature: an overlaid, actual training recording selected as a reference—not a fabricated “healthy” curve.
  3. Ask the model to classify the recorded cooler condition and inspect the evidence behind its answer.
  4. Reveal the original condition only after the diagnosis, so the prediction can be checked against the experimental record.
  5. Read a forensic narrative grounded in measured evidence, with an open-weight Gemma model selecting which observations deserve attention.

The most memorable case is also a mistake. On Cycle 735, our Random Forest predicts near failure (3% cooler condition). The archived experimental label, revealed afterward, is reduced efficiency (20% cooler condition). The prediction does not disappear or quietly change. ECHO-17 shows the disagreement.

That is our interpretation of Ghost in the Machine: the ghost is a real signal from the past, still capable of questioning what an AI believes today. This is historical condition classification, not a prediction of when a machine will fail.

Demo

▶ Explore the live ECHO-17 forensic lab

The public demo is hosted on Render's Free plan. Its first request may be slower after inactivity.

For the quickest tour, open Machine Archive → Cycle 0735 → Signal Laboratory, then try Reveal Ghost Signature → Run AI diagnosis → Generate investigation → Reveal Actual Condition.

ECHO-17 machine archive showing real held-out historical recordings

The archive: 441 held-out cycles, six measured channels, and sixty seconds per recording.

Pressure replay for Cycle 735 with an actual training reference overlaid

Two real recordings, not a simulated waveform: the selected cycle and its training-only reference.

Random Forest diagnosis of Cycle 735 before the recorded condition is revealed

The prediction appears first. The experiment's recorded answer remains concealed.

Cycle 735 reveal showing disagreement between the prediction and recorded cooler condition

The reveal: a wrong prediction becomes an opportunity to inspect the evidence.

The hosted app serves saved Random Forest inference and genuinely generated, prevalidated Gemma reports. It labels these results as precomputed; the Render server does not claim to run live Gemma or GPU inference. We also verified real Gemma inference locally through Ollama.

Code

GitHub: ashu1osh9/echo-17

Public Demo Release

The repository includes the React/FastAPI application, real-data preparation and validation scripts, documented modeling workflows, tests, deployment configuration, and a third-party attribution file.

The repository was created during the October 26–31 challenge window.

How I Built It

1. Start with evidence, not an invented haunting

We used UCI 447, Condition Monitoring of Hydraulic Systems, by Helwig, Pignanelli, and Schuetze (2015), licensed under CC BY 4.0.

The source provides 2,205 aligned experimental cycles and original sensor recordings. Our interface does not synthesize their waveforms.

Six physical channels—pressure (PS1), flow (FS1), inlet and outlet temperature (TS1/TS2), vibration (VS1), and motor power (EPS1)—each contribute six statistics:

  • Mean
  • Standard deviation
  • Minimum
  • Maximum
  • 5th percentile
  • 95th percentile

That gives 36 sensor-only features. Cycle IDs, component-condition labels, and stability targets are not model inputs.

Our stratified split (seed 42) keeps 1,764 training cycles separate from 441 held-out cycles.

The baseline is a 250-tree Random Forest with balanced subsample class weights.

Held-out baseline result Measured value
Accuracy 99.32%
Macro-F1 0.9932
Correct / incorrect cycles 438 / 3

All three baseline errors—cycles 2, 735, and 1467—are retained for inspection.

For Cycle 735, the Random Forest assigns 50.4% of its uncalibrated class probability to near failure and 49.6% to reduced efficiency.

The margin is tiny.

Neither number is a calibrated failure risk, and the cooler-condition percentages are experimental class labels, not forecasts of imminent breakdown.

2. Give the recording a Ghost Signature

A waveform can look unusual without proving a cause.

Our Ghost Signature therefore compares the case against an actual full-cooler-efficiency recording from the training split, selected with training-only standardization.

The held-out label is not used to pick the reference.

For Cycle 735, the selected reference is training Cycle 1850.

On the inlet-temperature channel TS1, the aligned-preview mean difference is +17.6889 °C, with RMSE 17.6902 °C.

These values describe a measured difference; they do not establish a physical root cause.

Nor does a full-efficiency cooler imply that every other component in the reference was healthy.

3. Let Gemma interpret—but never invent—the evidence

We ran Gemma 3 1B (Q4_K_M) locally with Ollama on CPU and verified genuine reports for Cycle 735 and Cycle 5.

Gemma receives a bounded evidence packet:

  • Measured sensor statistics
  • Saved model predictions
  • Training-reference comparisons

The recorded target class stays out of its prompt until the visitor chooses to reveal it separately.

Crucially, Gemma does not author arbitrary numerical conclusions.

It selects evidence references and an uncertainty framing in a validated structure.

Pydantic checks the response, and the backend renders factual numbers directly from the recorded evidence.

A report separates observations, comparisons, model prediction, hypotheses, and limitations.

Invalid or unavailable LLM results are clearly labeled rule-based / non-LLM fallback, not passed off as Gemma.

For a lightweight public deployment, four actual local Gemma reports (cycles 5, 735, 2, and 1467) were saved and are revalidated before serving.

This preserves genuine model work without pretending that our small Render instance is running the LLM.

4. An optional, license-respecting foundation-model study

We also performed a genuine TabPFN-3.5 experiment on the same saved split in a separate Colab GPU workflow.

That study is not the public app's classifier.

We have kept its restricted model weights and outputs out of the hosted release while public-use and output permissions remain unconfirmed under the separate Prior Labs terms.

The code documents the research workflow without relabeling Random Forest outputs as TabPFN predictions.

5. Turn the investigation into a usable product

Frontend

React, TypeScript, Vite, and Recharts power the sensor replay, channel selection, Ghost Signature overlay, diagnosis, reveal, and model evaluation.

Backend

FastAPI provides real archive IDs, measured-signal endpoints, saved predictions, validation, and ground-truth reveal.

Local open-weight AI

Gemma 3 through Ollama, with deterministic validation and honest fallback behavior.

Deployment

One Render Docker web service serves the static frontend and API, loading a checked RF-only public data bundle without restricted model weights.

The release checks reported:

  • 85 passing backend tests
  • 14 passing frontend tests
  • Successful production build
  • Passing RF-only API verification checks

We also manually exercised the hosted Cycle 735 replay, Ghost overlay, diagnosis, Gemma report, and recorded-condition reveal.

Why Does Open Innovation Matter?

An opaque prediction API could return a label.

It could not, by itself, make this case reproducible or explain what it actually saw.

Here the recordings are real and openly credited, the feature definitions are inspectable, the saved split and baseline failures are documented, and the investigation can be rebuilt with different classifiers.

Running Gemma locally makes the evidence flow explicit and avoids silently shipping the entire investigation to a closed remote model.

Strict backend validation gives us an even more important freedom:

We can disagree with the AI and still know where every reported number came from.

Open innovation also means respecting boundaries.

ECHO-17's application code uses the MIT license, UCI data retains its CC BY 4.0 attribution, and Gemma/TabPFN are governed by their own respective model terms.

“Open-weight” does not automatically mean unrestricted redistribution or unrestricted production use.

My Agent Session

We used OpenAI Codex as a development assistant to iterate through:

  • Real-data validation
  • The Random Forest baseline
  • Frontend integration
  • GPU research preparation
  • Genuine local Gemma execution
  • Automated tests
  • Release safety checks
  • Render deployment preparation

We kept reproducibility and evidence logs in docs/RUN_LOG.md rather than presenting generated claims as tests.

We have not included a DevRelay session recording because none was published.

The Spirit of It

Cycle 735 did not tell us a ghost story in words.

It left a pressure trace, some temperatures, and a recorded experimental label.

Years later, our classifier gave a different answer.

For a moment, the interesting question stopped being:

“How accurate is this model?”

And became:

“What would it take to verify what it says?”

The ghost is not the failure. The ghost is the evidence we almost forgot to inspect.

That is what ECHO-17 is built to remember.

Prize Categories

Best Use of Gemma

Genuine local Gemma 3 evidence selection through Ollama, structured validation, grounded reports, and honest precomputed/fallback labeling.

Best Use of Render

A working public frontend and FastAPI forensic demo deployed as a single Render Docker service.

We are not claiming the TabPFN partner category in this public submission while the applicable output/public-use licensing questions remain unresolved.

Team and Credits

This is one submission from our two-person team participating in Hacktoberfest 2026 Week 4.

Team Members

1. @ashu1osh

Submitting team member.

2. @ishani_karpoor_21c50c88bc

Teammate.

We credit Helwig, Pignanelli, and Schuetze for the UCI dataset, Google for Gemma, Ollama for local inference, Prior Labs for the separate TabPFN research model, and the open-source Python/React ecosystem.

The implementation builds on its documented starter and used Codex assistance. We do not claim to have invented the underlying models.

Further attribution and license details are available in THIRD_PARTY_NOTICES.md.


Explore ECHO-17

Live Interactive Demo

GitHub Source Code

Every machine leaves a trace. ECHO-17 gives that trace a voice.

Top comments (0)