Inspiration

NeuralFM puts the power of AI in the palm of your hand.

Software is magic. Machine Learning is magic squared. The incredibly amazing thing is, normal people who can't write software, can train Neural Networks.

A new force was just introduced to the Universe, and so far it's been used to sell you more products and rig presidential elections.

What if instead of megacorps controlling the AI's in your world — you controlled them?

A few weeks ago I started this hackathon making Metanet News, a fun watering hole for the BSV ecosystem that mixed a bunch of blockchain interoperability techniques.

To decide what stories to show, I created a Neural Network, and to make that easier, I built a backend classifier studio: https://twitter.com/synfonaut/status/1289031278478520320

I gotta say...I impressed myself.

It turns out building a Neural Network is simple with the right tools. With just a handful of clicks, I had full control over what information was flowing into my timeline.

I realized with a tool like this, anybody could easily control the information coming into their world. This had big implications.

There was one problem though. I realized that even with a great Neural Network Studio, it wouldn't be enough to give people control over AI. To do that, you'd have to open up the entire pipeline: data sources, feature extractors, parameter normalization, classifications and neural networks.

Programmers still have too much control (as we've seen with BTC). A complex system like this needs incredibly stable foundations with strong data guarantees to not be compromised. Luckily, BSV is a perfect fit.

At this point it was clear what had to be done: the frontend wasn't the product, the backend was.

And NeuralFM was born.

What it does

NeuralFM gives you control over the AI's in your life in three ways:

1. An Information Feed You Control

When you vote on your feed, you're training an AI that you own.

You have full control of everything that goes into the AI you create. You can use one of the many pre-configured assets (data sources, feature extractors, neural networks, etc...) from the marketplace or if you're a developer create your own.

Most users will remix other user's channels and fork them, modifying just the components they need, to create a new channel (Machine Learning components are surprisingly reusable).

With NeuralFM, your timeline is under your control.

2. Information Channels To Find Similar Content

Finding new information on NeuralFM is as easy as twisting a knob or clicking a button.

This is because unlike traditional radio, NeuralFM constantly reshuffles the channels based on the predictions and similarities between them.

Imagine infinite radio stations, where the channels that are next to each other are most similar, helping you find exactly what you're looking for, and slice through filter bubbles.

That's NeuralFM.

3. A User-generated AI Marketplace

Every action you take on NeuralFM is bringing you closer to the information you want, but it's also creating intellectual property you own.

Most users will be able to create AI's for the marketplace with the click of a few buttons, enabling them to earn money from tasks they're already doing.

Every aspect of the system, the source code, the data, the plugins, the platform, is open — and every aspect of the system is Intellectual Property owned by the users — creating a decentralized user-generated AI marketplace on Bitcoin.

How I built it

NeuralFM has a few pieces of technology that are pretty interesting.

Neural Networks

Neural Networks are the core of NeuralFM, and the primary library used is Brain.js — a great library for creating multi-layered perceptron, RNN and various other Neural Networks. Networks can be trained in the browser or on server farms with GPUs, making them flexible for many situations.

One noteworthy part is, Brain.js has a JSON serializable data format, meaning you can easily export trained Neural Networks. They're incredibly tiny! These exported neural networks are your intellectual property.

Caldera

The last major UI innovation in programming languages was React. It made building real-time UIs dramatically simpler — but it came with a hidden cost. Instead of simply rendering on the server, every action introduced an additional client<->server API call or RPC wrapper. This stuff adds up in terms of weighing down application development.

Lately, a new paradigm has emerged: server-rendered real-time applications. Imagine React on the server with real-time updates. Every update is "diffed" on the server and pushed over a WebSocket. At first, this seems kind of crazy, but after you use it, it's amazing. Here's a real-time chat room in 38 lines (https://powping.com/posts/6639080c3af6113dc3b62223a822c976d57ef73e2fb22ea559f0567ed3c55841).

NeuralFM is a real-time application, but everything is happening on the server thanks to Caldera.

Datapay and MAP v2

A core part of the NeuralFM system is to put the state of the system on-chain for data integrity. To accomplish this, a system export script was created (source code + classifications + data), and a sha256 hash taken of each item. The result is formatted into a MAP v2 object using the new Array "ADD" command, and then everything is pushed to Bitcoin with Datapay.

Bitcoin

Bitcoin SV provides the foundation for the entire system, from a stable protocol to data integrity, to intellectual property, to payments — NeuralFM wouldn't be possible without BSV.

Human bias is all over algorithms, intentional or not — the solution is to start tracking the bias in a way that anybody can audit: the public ledger.

Bitcoin also allows users to create IP that they own, while still keeping the data integrity of the system. This allows a novel marketplace to take form: private intellectual property (capitalism) combined with public goods (open source).

This is an example of why I believe Bitcoin is the "capitalism socialists want and the socialism capitalists want", it's a fair system that enables both extremes (capitalism and public goods help each other).

And of course, Bitcoin payments enable endless monetization on top of channels, paymails and the marketplace.

<3 Bitcoin

Challenges I ran into

As mentioned I ended up discovering NeuralFM while working on Metanet News, so some of my plans changed halfway through. Typically I would just extend the timeline, but with the deadline it made me scramble (it's 5:30am, less than 4 hours to the deadline :).

The data pipeline had some tricky normalization bugs. I ended up finding one "bag of words" text classification bug after writing dozens of tests around core logic. This ate up some time but was good practice because it helped me understand what parts of the system need to be analyzed most carefully and snapshotted on-chain.

One snag with Caldera ("server-side React"), is that client-side Javascript is more difficult, so certain cryptocurrency libraries need special attention. I was able to find a novel (hacky) solution that enabled MoneyButton, HandCash, etc.. despite being server-rendered.

Also building NeuralFM as a platform, I wanted to create a plugin architecture, so I stored Neural Networks in a flexible format in the database. Unfortunately, because the data sources also need to be very flexible (they can be anything), I decided to use MongoDB. Little did I know MongoDB can only have 64 indexes, so a more efficient data indexing model is needed that can scale linearly with models. Right now I'm doing some hacks to save index spaces that aren't ideal. Postgres with JSON column probably would have been a safer choice.

Accomplishments that I'm proud of

The Neural Network Studio is incredible. The feeling of building a Neural Network is like playing with putty. You quickly start to see dimensions emerge in your data that you didn't know were there. I've found so much great information I originally missed since starting this project.

Also, I think the concept is really cool. AI is this big new powerful thing and democratizing it while trying to solve fake news, filter bubbles, disinformation—all while creating open markets, and open data standards is exactly my kind of project!

Lastly, I'm proud that I shipped. There were some moments where I wasn't sure that would be the case :)

What I learned

I learned I should set more deadlines for myself. I work for myself, build for my customers and usually just ship stuff when it's ready. But I've been moving with a sense of urgency these last few weeks and it's been a good change of pace—I've accomplished an incredible amount of work in a short period.

I learned to only experiment with one new piece of technology per project. In NeuralFM, I used Bitcoin and Neural Networks and that should have been enough new technology for one MVP. Caldera did make for a good learning experience and I'm glad I used it, but not being familiar with the technology added to crunch-mode.

Also, I learned I really love building on Bitcoin. I always thought I did, but right before the hackathon, I was working on my other business (Mac Productivity), learning how to manage teams, thinking about "distribution" on traditional platforms. That's all great.

But Bitcoin is something special. A new force in the world. I feel incredibly grateful to be able to dedicate the time to experiment and understand this amazing technology.

What's next for NeuralFM

AI is taking over the world, and NeuralFM wants to put it in your control.

Instead of being big and scary, it's going to be open and personal.

I have big ambitions with NeuralFM but understand the first few steps are most important.

My primary goal is to build up a base of users who use NeuralFM every day to find their most interesting information.

The plan is to start with Bitcoin, Metanet, Proof of Work and Decentralized Apps, then expand to more mainstream topics like politics and entertainment. I think this will be great for growing the Bitcoin SV ecosystem when people find out they can get paid for what they're already doing (paymail will be a key enabler here).

A top priority is deeper integration with more BSV services, wallets and data sources.

Soon after, more normalizers, extractors, classifiers and neural networks will be added so everybody using NeuralFM can start building more complex models.

Once a steady stream of consumers and channel creators are using the site: everything goes open source.

NeuralFM is a multi-sided marketplace, and it's easier to bootstrap the consumer side first. If consumers are using it, developers will come, pouring gasoline on the fire.

That's the plan. Use Bitcoin to wrestle AI under our control.

Thanks for reading! Long Live Bitcoin ✌️

Built With

Share this project:

Updates