{
  "source_file": "0930",
  "source_platform": "Dev.to",
  "author": "zeromathai",
  "title_listed": "How Neural Networks Work — From Perceptrons to Backpropagation",
  "keywords": "",
  "domain": "机器学习",
  "content_type": "技术教程",
  "is_paid_flag": "否",
  "url": "https://dev.to/zeromathai/how-neural-networks-work-from-perceptrons-to-backpropagation-1d6d",
  "publish_date": "2026-05-14",
  "corpus_stage": "",
  "notes": "",
  "id": "0004de67b0d8",
  "collected_at": "2026-10-02T13:50:55",
  "title": "How Neural Networks Work — From Perceptrons to Backpropagation - DEV Community",
  "body_markdown": "A neural network is not magic.\nIt is a system that transforms input into output through layers.\nThe real question is:\nHow does that system learn from mistakes?\nCore Idea\nA neural network takes data, passes it through connected layers, and produces an output.\nDuring training, it adjusts internal values so future outputs become better.\nThose internal values are mainly weights and biases.\nSo the simplest view is:\nInput → Layers → Output → Error → Update\nThat loop is the foundation of neural network learning.\nThe Key Structure\nA basic neural network looks like this:\nInput Layer → Hidden Layers → Output Layer\nEach layer transforms the data.\nA neuron usually computes:\nz = w · x + b\nThen an activation function transforms it:\na = activation(z)\nWhere:\nx = input\nw = weight\nb = bias\nz = raw score\na = activated output\nThis is the basic building block.\nImplementation View\nAt a high level, training works like this:\ntake input data\n\nrun forward propagation\n\ncompute prediction\n\ncompare prediction with target\n\ncompute loss\n\nrun backpropagation\n\nupdate weights and biases\n\nrepeat\nEnter fullscreen mode\nExit fullscreen mode\nThis is why neural networks are trainable.\nThey do not just compute outputs.\nThey use errors to adjust themselves.\nConcrete Example\nImagine a small model that predicts whether an email is spam.\nThe input features might include:\nsuspicious words\nsender reputation\nnumber of links\nmessage length\nThe network processes those inputs.\nIt predicts:\nspam probability = 0.82\nIf the real label is spam, the prediction is good.\nIf the real label is not spam, the network needs to adjust.\nBackpropagation tells the model which weights contributed to the mistake.\nThen training updates those weights.\nPerceptron vs MLP\nThe perceptron is the simplest starting point.\nIt takes inputs, applies weights, adds a bias, and produces an output.\nBut a single perceptron is limited.\nIt can only represent simple decision boundaries.\nA Multi-Layer Perceptron expands this idea.\nIt stacks multiple layers.\nPerceptron:\none basic computational unit\nsimple input-output mapping\nlimited representational power\nMLP:\nmultiple connected layers\nhidden representations\nmore expressive decision boundaries\nSo the MLP is where neural networks become more useful.\nForward Propagation vs Backpropagation\nThis comparison is the core of learning.\nForward propagation computes the prediction.\nBackpropagation computes how to improve it.\nForward propagation:\nmoves from input to output\ncalculates activations\nproduces prediction\ncomputes loss\nBackpropagation:\nmoves from loss backward\ncomputes gradients\nassigns error responsibility\nprepares parameter updates\nForward pass answers:\n“What did the model predict?”\nBackward pass answers:\n“What should change?”\nWhy Activation Functions Matter\nStacking linear layers is not enough.\nWithout activation functions, multiple layers can collapse into one linear transformation.\nThat means the model cannot represent complex patterns well.\nActivation functions add nonlinearity.\nThis lets neural networks learn curves, boundaries, and deeper representations.\nIn short:\nLinear layers calculate.\nActivation functions reshape.\nBoth are needed.\nWhat Actually Changes During Learning?\nWhen a neural network learns, it updates parameters.\nThe most important parameters are:\nweights\nbiases\nWeights control how strongly inputs affect the output.\nBiases shift the output.\nA simple update idea is:\nnew parameter = old parameter - learning rate × gradient\nThe gradient tells the direction.\nThe learning rate controls the step size.\nThat is the practical meaning of learning.\nFrom Neural Networks to Deep Learning\nA neural network becomes “deep” when it has many layers.\nBut depth alone is not enough.\nDeep learning depends on:\nlayered representations\nnonlinear activations\nbackpropagation\nparameter updates\nenough data and compute\nThe deeper the network, the more abstract its internal representations can become.\nFor example:\nIn image models:\nearly layers may detect edges\nmiddle layers may detect shapes\ndeeper layers may detect objects\nThat is why neural networks became the foundation of modern deep learning.\nRecommended Learning Order\nIf neural networks feel scattered, learn them in this order:\nPerceptron\nMulti-Layer Perceptron\nNeural Network\nForward Propagation\nBackpropagation\nActivation Function\nWeights and Biases\nModel Parameters\nDeep Learning\nThis order works because you first understand the basic unit.\nThen you understand the network.\nThen you understand computation, learning, and deep extensions.\nTakeaway\nA neural network is a trainable system of layered transformations.\nThe shortest version is:\nNeural Network = layers + activations + parameters + learning\nForward propagation makes predictions.\nBackpropagation computes corrections.\nWeights and biases store what the model has learned.\nIf you remember one idea, remember this:\nNeural networks learn by repeatedly predicting, measuring error, and updating internal parameters.\nDiscussion\nWhen learning neural networks, do you find it easier to start from the perceptron, or from the full forward/backpropagation training loop?\nOriginally published at zeromathai.com.\nOriginal article:\nhttps://zeromathai.com/en/neural-network-hub-en/\nGitHub Resources\nAI diagrams, study notes, and visual guides:\nhttps://github.com/zeromathai/zeromathai-ai",
  "metadata": {
    "title": "How Neural Networks Work — From Perceptrons to Backpropagation - DEV Community",
    "description": "A neural network is not magic.  It is a system that transforms input into output through layers.  The... Tagged with machinelearning, ai, deeplearning, neuralnetworks.",
    "keywords": "machinelearning, ai, deeplearning, neuralnetworks, software, coding, development, engineering, inclusive, community",
    "author": null,
    "og:type": "article",
    "og:url": "https://dev.to/zeromathai/how-neural-networks-work-from-perceptrons-to-backpropagation-1d6d",
    "og:title": "How Neural Networks Work — From Perceptrons to Backpropagation",
    "og:description": "A neural network is not magic.  It is a system that transforms input into output through layers.  The...",
    "og:site_name": "DEV Community",
    "og:image": "https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5sjrp194x01ypxfd9b4z.png",
    "twitter:site": "@thepracticaldev",
    "twitter:creator": "@",
    "twitter:title": "How Neural Networks Work — From Perceptrons to Backpropagation",
    "twitter:description": "A neural network is not magic.  It is a system that transforms input into output through layers.  The...",
    "twitter:card": "summary_large_image",
    "twitter:widgets:new-embed-design": "on",
    "twitter:image:src": "https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5sjrp194x01ypxfd9b4z.png"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [
    {
      "file": "attachments/0004de67b0d8/code/body-000.txt",
      "chars": 163,
      "language": "text"
    }
  ],
  "images": [],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://zeromathai.com/en/neural-network-hub-en/",
      "label": "https://zeromathai.com/en/neural-network-hub-en/",
      "type": "a"
    },
    {
      "href": "https://github.com/zeromathai/zeromathai-ai",
      "label": "https://github.com/zeromathai/zeromathai-ai",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:48:20Z",
  "source_url": "https://dev.to/zeromathai/how-neural-networks-work-from-perceptrons-to-backpropagation-1d6d",
  "papers": [],
  "actual_video_files": [],
  "body_chars": 5319,
  "expected_body_images": 0,
  "discovery_status": "ok",
  "delivery_status": "ok",
  "missing_reason": "",
  "raw_html": "attachments/0004de67b0d8/pages/source.html",
  "local_html": "attachments/0004de67b0d8/pages/article.html",
  "body_base_path": "attachments/0004de67b0d8/pages/",
  "body_markdown_path": "attachments/0004de67b0d8/pages/article.md"
}