Profitable Bitcoin Predictions: Intelletic’s Hierarchical Neural Network

to find truffles, employ pigs

When the pig catches a scent, pay attention — or someone else might beat you to the truffle.

However, new breakthroughs in biological machine learning, or “Third Wave AI”, can say:
“There’s an X% chance the price will go up by at least $Y sometime in the next Z minutes”
.

When X > 50, that’s enough information to turn quite a profit. And the tech behind it is mind-blowing, so much I absolutely had to dig more into it.

AI is Tough Competition

Proprietary trading algorithms have been at play in big Wall Street firms for a while. They tend to edge out day traders and can outcompete rivals with High Frequency Trading platforms that exchange in microseconds.

But in such a competitive environment, there’s always a bigger fish.
I believe that Hierarchical Temporal Memory networks — unsupervised “cortical algorithms” — will soon blow contemporary neural networks out of the water.

The reasoning is simple:

Temporal Memory systems are:
1) uniquely proficient at detecting and learning patterns
2) incredibly resistant to noise.

The great challenge of financial prediction is sifting through vast amounts of noise to detect meaningful patterns.

I had the opportunity the other day to chat with the folks at Intelletic.
They’re a fascinating fintech company that uses cortical learning (HTM networks) to offer “Price Prediction Alerts” for that digital disruptor investors love and hate: Bitcoin.

Their goal is quite simple: democratize the power of AI in crypto trading and other financial assets such as futures, currencies and equities. They plan to offer ~800 assets in 7 classes.

The cortical AI at play is also promising for many other industries involving noise-heavy data streams: autonomous vehicles, drone swarm coordination, healthcare, climate studies, sports and the like.

However, it offers some unique advantages in the fractious world of finance: this continuous-learning biological model also avoids the “black box” transparency issue that many high-performing AI systems face.

Intelletic gave me some great insight into how and why their tech works, and what makes it a truly compelling development in biological computing. After years of development, they’ve arrived at a multi-stage system that considers diverse input data and predicts along different parallel time frames.

Warnings Before the Wave

Intelletic’s HTM model doesn’t try to continuously predict the exact price 5 or 10 minutes from now — the market is much too volatile.
Think of it as an algorithm that constantly “sniffs” the market, and occasionally picks up on “scents” that triggers an alert.

PPAs are directional timed forward-looking alerts predicting long (rise) or short (fall) in the near future.
They give you:

  1. a heads up: “Oi mate, Bitcoin’s about to rise or fall quite soon!”
  2. the exact time frame, or “active period” in which it’ll change
  3. several confidence intervals — probabilities that it will change by at least $X at some point within the active period

Crucially, these confidence intervals aren’t predictions — they’re observations of how the price has actually changed during previous alerts of this type.

There are three lengths of PPA based on “bar” size. A bar is simply 5, 30 or 60 minutes.
PPAs predict 15 bars ahead, so the time frame becomes:
active_period = 15 * bar_size
A 5-minute alert will look 75 minutes into the future.

So if your friendly HTM net gives you a 30-minute long with 75% confidence of $57, it’s saying:
“During 75% of previous 30-minute long alerts, Bitcoin rose by at least $57 at some point during the next 7.5 hours”.

In this graph, focus on the real BTC price above & the PPAs (green / red) below. The X axis is time in both cases.

Actual price above, predicted alert periods below

Have a look at the grey oval in the middle:
The red bar is a 30-minute short, predicting a price drop during its 7.5 hour active period.
The longer green bar below the oval is a 60-minute long, predicting a price rise during its 15 hour active period.

The actual Bitcoin price above dropped during the 30-minute short, but starts to rise afterwards. This illustrates how PPAs deal with an inherently volatile market: Several can be active at once, overlapping with different periods and directions.

The overlap, or contradiction of two PPAs at the same time is simply because cryptocurrencies are notoriously fickle. So many factors go into shifting the price — from the president tweeting about #Bitcoin to a banker in Kazakhstan selling a $4 million portfolio.

Intelletic avoids continuous predictions, because chances are, there isn’t huge activity going on every moment.

Instead, their confidence intervals enable smart stop-based trading that overcomes ambiguity.

These PPAs can serve as a powerful tool to create automatic buy/sell thresholds, or give you a general feeling towards the direction of the market.

Truffle Hunting

Pigs have superb senses of smell, and truffles contain androstenol, a hormone found in male pig saliva. You can see where this is going.

Female pigs have historically been used to detect and dig up valuable truffles hidden underground. They eat the truffles, sometimes — perhaps as consolation for failing to find a potential paramour — but I have been told they (like machine learning models) can be trained to minimize losses.

Dogs are also used because they don’t eat truffles, but there’s something unshakably amusing about the image of a porcine gourmand betraying its handler in search of romance.

You borrow a hog from your French friend, because what else is there to do? He tells you that you may only gather a truffle if you truly believe in the pig, though if you doubt an attempt that finds a truffle, you will face dire consequences.

He’s said weirder things before, however, so you spend half an hour wandering the forest, watching your convex companion happily snuffle along the ground.

Then the beast catches a scent. It gets excited and sets off like blazes to start digging. Remembering your friend’s rule of believing in the pig, you hurry behind it, hoping to grab the prize before your companion devours it.

You gingerly push the pork aside — Jean-Gaspard’s hogs are notoriously quick eaters — and unearth a small Piedmont white truffle.

The musky, garlicky aroma reminds you to feed the pig some scraps of the sandwich you had for lunch. Perhaps it’ll learn not to eat the precious fungus in the future for hope of similar rewards.

One hour later the pig catches another scent, and you watch it rooting through the soil. However, you can’t shake the feeling that no truffle is to be found.

The hog finds a single mud-stained Giuseppe Zanotti sneaker. Stranger things have happened, certainly. You remember Gaspard’s warning and feel strangely relieved.

Pigs as an AI Model

This tale of hoggish detection mirrors the use of AI to predict cryptocurrency prices. No, really.

Like the pig only occasionally catching a scent, PPAs don’t happen every 5 minutes. Large price spikes don’t occur all the time — there isn’t a truffle under every tree.

The HTM model picks up on 1 of 6 unique ‘scents’: long or short over a 1.25, 7.5 or 15 hour active period.

We can equate ‘waiting for the pig to dig’ with ‘waiting for the price to change’.

If you truly believe in the pig as Jean-Gaspard dictated, you buy some Bitcoin on a long PPA, and sell some coin on a short, setting price stops at a level based on how much risk you want to take — how much you’re willing to gain or lose.

Similarly, ‘Bitcoin moving in the direction of the PPA’ is ‘finding a truffle’.
The size of the truffle is simply how much BTC’s price changed — your margin or opportunity for profit.

did you know you can invest in truffles? i didn’t until i wrote this.

Steps Toward AI “Hierarchy”

The interesting thing about Hierarchical Temporal Memory networks is that they’re not truly ‘Hierarchical’ yet. We haven’t yet figured out how to stack them in an ordered input-output cycle like our brains connect layers of the neocortex and perirhinal cortex together.

Many HTM nets currently in use, like NuPIC’s gym power consumption example, are one HTM net working in relative isolation.
The encoder --> spatial_pooler --> temporal_memory --> output flow is hierarchical in the same way the layers of a standard neural network are.

However, Intelletic’s model is defined as a “multi-level triplet process”, an HTM core aided by additional non-biological components. The details are proprietary code, but it’s safe to say there’s other machine learning algorithms aiding with the HTM’s input and/or output.

This allows them to develop a “manifold input sensor” that constantly sniffs at numerous streams of data from diverse sources.
This is akin implanting a bionic nose in the pig that allows it to sniff truffles even further away and deeper underground.

For example, the “triggers” for an alert are more complex than
if price_change / minutes >= X: trigger_alert() . The model considers the volatility and movement of the most recent prices, and multiple thresholds must be met before a PPA is triggered.

The ‘triplet’ aspect is that the HTM is actually 3 near-identical models sniffing at the same time. Each is tuned to process bars of different 5, 30 or 60 minute lengths, and looks 1.25, 7.5 or 15 hours ahead.

This allows the models to discern different types of alerts based on length, which is a huge boon in a volatile market that sways to both human and trading-bot input.

source

Short-term dips could be from a banker selling off their whole stash, and long-term climbs (encompassing those dips) could be from a trending hashtag creating interest and new buyers.

Discrete-length trends may also have distinct patterns that precede them, so a tripartite model casts a wider net and buffers against ambiguity.

What Makes an AI “Trustworthy”?

Now for the most important question:
Why should anyone trust AI to predict prices?

The short answer is that PPAs don’t tell you:
“I predict the price will rise $X soon”.

They only say:
“I’ve detected an alert. During Z% of previous alerts, the price rose/fell by at least $X at some point in the next Y hours.
It also changed by $M in K% of those alerts […]”.

The former is a prediction, while a PPA is a recorded observation — a calculation based on what actually happened in the past.

You could then bet that there’s a 75% chance of the price (at some point) changing by $X, and with an auto-stop selling point you’d make a profit >75% of the time — if the model is consistent with itself and reality.

Internal Consistency

A PPA calculates confidence intervals based off what happened during past PPAs.

So to trust in the model, we first need to know that the model is consistent with itself: that a new 5-minute_short alert is picking up on the same “scent” as previous 5-minute_shorts.

You’d undoubtedly feel more assured of this if you watch this delightful tutorial on HTMs, but for simplicity’s sake, keep in mind that HTMs are unsupervised, continuous-learning algorithms. This model takes in unlabeled data as it streams in — no batching or retraining — and classifies it either as “nothing” or “1 of 6 PPAs”.

It learns from each prediction, strengthening synapses between neurons in the model’s cell columns:

Every time it sniffs out a scent, it gets better at discerning that specific scent in the future.

Further proof of internal consistency is encoded in the confidence intervals for each PPA. The 75%, 50%, 25% and 10% intervals offered in each PPA are all well above 0 .
These figures are only above 0 because each alert is consistent enough with past alerts — to a great enough degree they consistently predict the same directions of movement.

3D reconstruction of neurons in cortical columns: the architectural guide used for HTM networks

External Consistency

So the model’s new PPAs are consistent with its past PPAs. But do they actually predict real-world change in a meaningful way?
Are the predictions consistent with reality?

This is the neat part: Intelletic’s HTM transcends this concern entirely.

A 75% confidence of $30 on a 5-minute_long isn’t a prediction. It’s an observation:
“in 75% of past 5-minute_longs, BTC rose by at least $30 at some point during the 1.25 hour active period”.

So your PPA innately has external consistency built into it — it tells you what price changes actually occurred in the past during these alerts.

If you believe in the model’s internal consistency, then you already have external consistency based on real-world measures.

Making Your Own Decisions

Ultimately, Intelletic stresses that their predictions aren’t a bot to entrust all your decisions to, but a source of information and insight into the flowing currents of a volatile market.

But these are black box models — abstruse ML algorithms that can’t transparently communicate what they’re picking up on or why.

To be fair, the pig can’t tell you exactly what chemical compounds it sniffs, either. PPAs either happen or they don’t, and they can’t exactly tell you the proprietary triggers that set off the alert.

Where PPAs offer transparency, however, is their confidence intervals based on past results.

You’ll be given an alert, prices drawn from observations:
“an X% chance the price will change by at least $Y in the next Z minutes”.

“Did the pig actually sniff out a truffle?”
The model’s already externally consistent, because BTC changed by >$Y in X% of past alerts.

“Is the pig just sniffing out a sneaker?”
If you trust the model’s internal consistency — which the past-observation-calculations help reinforce — then you believe that the alert is detecting the same “phenomena” / truffle scent that it’s seen before.

———————————————————————

Intelletic is looking to launch relatively soon at a price even blokes like me can afford. Until then I’ll be continuing to beta test. Right now the PPAs come in neat JSON containers, so I’m putting together a Python script to pipe them into Tableau / some standard trading software.

I’m personally quite excited about the future of deep(er) learning algorithms applied to the world at large.
Most data is unlabeled, and we tend to care about problems involving patterns and noise, which HTM handles exceptionally well due to its biologically-informed architecture. “Mimic the form to get the function”, so to speak.

And remember, the question isn’t “will machine learning usurp the role of stock traders entirely” but “when” and “how”.
The “why”, of course, is that algorithms don’t need to be paid.

data scientist, machine learning engineer. passionate about ecology, biotech and AI. https://www.linkedin.com/in/mark-s-cleverley/