As Prediction Markets scale across different metrics, the adoption of Artificial Intelligence across trading strategies, research and algorithms become even more inevitable. There are already multiple examples of AI tools such as our Polyfacts custom LLM for Prediction Markets,
Hence worth taking a look at the foundational concept that guides these systems.
Deep Neural Networks
Neural networks are computational models designed based on the neurons in the human brain and are widely used to recognize patterns and make decisions by processing data through connected layers or nodes
A neural network consists of 3 components. The Input, Processing (Hidden Layers) & Output. When there's more than one hidden layer between the input and output, it is called a Deep Neural Network.
The hidden layers are made up of neurons (or nodes) that receive information from the Input component and classifies this information based on weight. The weight helps the network determine how important that piece of information is in order to generate an output based on that. Mathematically,
Weighted sum = (Input1 × Weight1) (Input2 × Weight2) ... Bias
Say, you’re deciding on whether to go to a Restaurant, you naturally would consider factors such as the following and assign Weights (assuming 0-1 scale here) to them based on how important they are for the context you’re trying to reason through,
Weather: 0.2
Hunger: 0.5
Budget: 0.7
Friends Available: 0.3
I.e, It would be nice to have a good weather but regardless, weather isn’t of high importance to your brain for this decision, and the same approach for the other values.
Values of the current Factors of the situation,
It’s sunny - 1 (How actually sunny it is)
You’re very hungry - 0.9 (How hungry you really are)
Budget - 0.2 (bear market😂)
Friends available - 1
Weighted Sum = (1 × 0.2) (0.9 × 0.5) (0.2 × 0.7) (1 × 0.3)
= 0.2 0.45 0.14 0.3 = 1.09
A pre-set assumption could be, if score over 1, go out and less than 1, stay in. Although, this is an over-simplification as it goes through an Activation Function to determine whether the weighted sum should be considered final or not
From an AI model perspective, Say you’re trying to request an LLM draft up an email to your supervisor about a project delay, the LLM breaks your input into individual tokens so if your input was,
“Draft an email to my supervisor about the project delay”
It becomes,
[“Draft”, “an”, “email”, “to”, “my”, “supervisor”, “about”, “the”, “project”, “delay”]
Each token then gets a numerical representation based on patterns learnt in its training data. Depending on the purpose & process of how the model was trained, it determines which of those individuals words are the most important. “Email” might get a high weight because it’s the core object you’re asking for
The next step it takes to arrive at a weighted sum is known as Contextual Understanding. Not really planning to go deep on this specific topic in this post but I hope this example gave some sort of clarification
Another important phase of execution within the hidden Layer is the Activation Function. The purpose is to help the neuron decide whether the weighted sum is valid enough to be sent as an output or in other words, determine if the system is sending out a sensible response based on the task
The amount of built-in hidden layers are important because the system can check more accurately for errors as the output of each layer becomes the input for the next layer until the final output layer is reached, allowing for more correction filters
When a model is just being trained, it makes random weight guesses as it doesn’t have a basis of “truth” yet so It learns by comparing the output to the correct answer by using a loss function
As this process is repeated, the layers are able to recognize patterns that serve as a precedent for them to assign weights to tokens in the best way possible, allowing the network recognize patterns and give useful outputs!