DEV Community

Cover image for Neural Networks, Explained Simply — Part 1: What Even Is a Neural Network?
Sanjay Singh
Sanjay Singh

Posted on Originally published at zyvop.com

Neural Networks, Explained Simply — Part 1: What Even Is a Neural Network?

Neural Network Series · Part 1 · ~5 min read

You already run a neural network every time you decide whether to grab an umbrella. By the end of this post, you'll see exactly how — and be able to explain the whole idea to a friend in plain, everyday language.

TL;DR: Picture a tiny voting system — each input gets a say, some inputs count more than others, and if the votes add up high enough, the answer is yes. A neural network is just thousands of these tiny voters connected together.

The problem neural networks solve

Say you want a computer to tell a cat photo from a dog photo. Easy for you — you just look. But writing that as strict rules is a nightmare: cats have pointy ears, but so do some dogs; cats are small, but Chihuahuas exist. Every rule has an exception.

Neural networks exist for exactly this kind of fuzzy problem. Instead of hand-writing rules, we show the computer thousands of examples and let it work out the pattern itself.

Start with one decision, not a whole brain

Forget "network" for a second. Let's build the smallest piece: a single artificial neuron.

Here's a decision you make all the time: should I go for a walk today? Some things matter more to you than others — rain might cancel your walk instantly, but "a little cold" alone won't stop you. In other words, some factors carry more weight than others.

Score each factor 1 (yes) or 0 (no), and give each a weight for how much it matters:

Factor Value Weight
Not raining 1 × 3
Not too cold 1 × 1
Have free time 0 × 2

Multiply and add: (1×3) + (1×1) + (0×2) = 4.

One more ingredient: bias. Real neurons also add a fixed number before deciding — think of it as personal tendency, added no matter what the weather's doing (some people need less convincing to skip a walk than others). Say our bias is −1: 4 + (−1) = 3.

Now the neuron compares that total to a threshold — this comparison step is called activation. If the rule is "3 or higher means go," then 3 ≥ 3 fires: go for a walk.

A single neuron: inputs are weighted, summed, adjusted by a bias, then passed through activation to produce an output

That's the whole trick:

weighted sum → add bias → compare to a threshold → decision

(One simplification worth flagging: real networks usually swap the hard yes/no cutoff for something smoother that allows a range of outputs, not just on/off. Same job either way — turning a raw number into a signal the next layer can use — we'll dig into exactly how later in the series.)

Every neuron in every neural network — spam filters, image recognizers, ChatGPT-style models — is a version of this same move, repeated millions of times.

From one neuron to a network

A neural network is many neurons connected in layers, where one neuron's output feeds the next layer's input:

A layered neural network: three inputs feed a hidden layer of three neurons, which combine into one final output

Each hidden neuron learns to notice a different pattern — maybe one becomes sensitive to "rain," another to "weekends," another to a combination no human would think to program directly. Stack enough layers, and the network captures genuinely complex patterns, like the difference between a cat and a dog photo.

Where do the weights come from?

Great question — it's the whole subject of Part 2. Short preview: the network starts with random, bad weights and improves a little every time it's shown an example and corrected. That process is training, which is why neural networks need so much data: they're not programmed, they're practiced into being good.

Quick recap

  • A neuron multiplies each input by a weight, adds them up, adds a bias, then checks the result against a threshold (activation).

  • A neural network is layers of neurons, so simple decisions combine into complex ones.

  • Weights and biases aren't hand-coded — they're learned through training (next post).

Try it yourself

Let's run one more example together — this time, you plug in the numbers.

Decision: Should I order coffee right now?

Factor Your value (1 or 0) Weight
Feeling tired ? × 3
It's before noon ? × 1
Already had one today ? × −2

Bias: −1. Threshold: 2 (2 or higher = order it).

One new wrinkle: that last weight is negative. If "already had one today" = 1, that piece works out to 1 × −2 = −2 — instead of adding to the total, it subtracts, pulling the decision toward "no." That's how a network can end up saying no just as easily as it says yes.

Now try it with your own 1s and 0s: do the math (weighted sum + bias) and check it against the threshold.

Next up: How Neural Networks Actually Learn — where we open up training and demystify backpropagation. Follow along so you don't miss it.


Published via ZyVOP — Write once in Markdown, auto-backup to GitHub, and syndicate to Dev.to, Medium & Hashnode in 1 click.

Top comments (0)