# In a neural network, can colors be used for neurons in place of floating points and would there be any benefit in doing so?

Firstly, some context. I have been reading and watching videos on the subject for around 3 years, but I am still very much a beginner in machine learning and artificial intelligence. That said, I might not know what I'm even talking about here. So bear with me.

If I understand correctly, each node in a neural network (neuron) is represented by some floating point number between 0 and 1, that are arranged in layers and have corresponding weights. Right? While a color has RGB values, CMYK values, and HSV values that are all interrelated to each other.

My question is would there be any benefit to having each node represented by a color instead of a single floating point number?

My thinking is that each neuron could select any of the values (r, g, b, c, m, y, k, h, s, or v) contained within the color in some meaningful way, while the Alpha value could possibly represent the weight associated with that neuron.

Thoughts? Would it not work like that? Could you use it to have multiple congruent networks running on 3 different channels? Again, would there be any benefit to doing this than just using a single number? Or would it over-complicate (or even break) the network? Would it be useless?

Although I've also dabbled in Unity3D (which is how I got the idea in the first place), I'm too much of a beginner to know how to even begin an attempt at testing this myself.

• As you said, a color is a number (through RGB values). So you want to replace the weight of a neuron, a number, by a number ? It's not going to change anything. I think your confusion is from how computer and human see colors. For a computer, a color is just a number (or more exactly 3 numbers, R, G, B). The computer just turn on the right pixels based on these numbers for us human to see the color. But it's still just a number. So your proposition change nothing on how neural networks work. – Astariul Feb 14 '20 at 4:11
• I think it can be a great educational tool for people unfamiliar with NNs. – user9947 Feb 14 '20 at 6:07
• @Astariul Colors being numbers is exactly why I thought they could be used. What would be interesting is being able to "transform" and/or "mix" parallel NNs using various selectors (hue, cyan, red, alpha, etc.) to propagate to the next layer. – Martin Bocanegra Feb 25 '20 at 20:57
• @Astariul In other words, say you could have 3 instances running on each channel of your Color NN. For each neuron, you could simply select the same channel and functionality would be no different. However, you could take the hue (for example) of the 3 rgb channels to propagate a new value to the next layer's neurons. Make sense? – Martin Bocanegra Feb 25 '20 at 21:02
• @DuttaA I agree. At the very least, this could make for a useful way to represent your NNs visually. – Martin Bocanegra Feb 25 '20 at 21:03

## 1 Answer

To answer your question, I'll just simplify it and assume you are representing the activation of a neuron (the value it produces) by an RGB value. So a tuple with 3 values ranging from 0 to 1.

It's important to remember that every single machine learning model could be computed by a human on pen and paper using just numbers. So keeping that in mind, this neural network would essentially just be a combination of multiplying tuples of size 3 in a certain order (ignoring activation functions).

I will also assume that each RGB value has it's own unique set of incoming weights, like following: this essentially amounts to just have 3 unique neurons. There's no difference: All I did there was get rid of the circle. The calculations are no different. If you changed the calculation, say values are shared between the 3 RGB nodes, then you now just have 3 duplicate nodes. In all cases, you can just represent the equivalent calculation as a standard neural network.

However, in the same vein, in a convolutional neural network, if you create conv layers with an output of 3 channels, you can visualise their outputs as a colour image (assuming you are using an activation function that outputs numbers between 0 and 1), which can be cool to look at.

• Thank you! This is what I was thinking. Yes, I understand that when strictly using rgb you get the same functionality. I also understand that using something like cyan could simply be written into your network, taking the "blue neuron" and "green neuron" and running their values through the function to get a "cyan neuron". What I'm suggesting is that having these functions built-in might be useful. And, yes, I also thought this could be useful for visualization as well. – Martin Bocanegra Feb 25 '20 at 21:11