[{"data":1,"prerenderedAt":1064},["ShallowReactive",2],{"/blog/neurons-weights-and-biases-in-neural-nets-with-analogies":3,"authors":1044},{"id":4,"title":5,"author":6,"body":7,"category":1030,"date":1031,"description":1032,"extension":1033,"image":1034,"meta":1035,"navigation":1036,"path":1037,"reviewer":1038,"seo":1039,"slug":1040,"status":1041,"stem":1042,"__hash__":1043},"blog/blog/neurons-weights-and-biases-in-neural-nets-with-analogies.md","Neurons, weights and biases with analogies","nyior-clement",{"type":8,"value":9,"toc":1021},"minimark",[10,20,23,26,31,34,47,50,56,59,70,73,77,80,349,352,363,369,372,383,386,389,400,403,406,410,417,420,423,426,429,950,982,985,988,994,997,1001,1004,1007,1010,1014],[11,12,13,14,19],"p",{},"A neuron does not “understand” digits, faces, or words. It just takes in numbers,\ncombines them, and produces a new number.\nThat is the job of neurons in a ",[15,16,18],"a",{"href":17},"/guides/neural-networks/what-are-neural-networks","neural network",".",[11,21,22],{},"They turn raw inputs into signals the next layer can use. When you stack many neurons across layers,\nthose simple signals can add up to surprisingly powerful behaviour.",[11,24,25],{},"The goal of this post is simple: To help you build a clear, intuitive picture of what a neuron is,\nwhat weights do, and what a bias does, using two everyday analogies.",[27,28,30],"h2",{"id":29},"a-neuron-as-a-chef","A neuron as a chef",[11,32,33],{},"Think of a neuron as a chef in a restaurant.",[35,36,37,41,44],"ul",{},[38,39,40],"li",{},"Ingredients come in. These are the inputs.",[38,42,43],{},"The chef mixes them in specific quantities. These are the weights.",[38,45,46],{},"Then the chef adds a personal touch. That is the bias.",[11,48,49],{},"Two chefs can receive the same ingredients but produce different meals. Because they use different\nquantities and different personal touch.",[11,51,52],{},[53,54],"img",{"alt":30,"src":55},"/images/blogs/neurons-weights-biases/neuron-as-chef-analogy.png",[11,57,58],{},"That is exactly what is happening in a neural network.",[35,60,61,64,67],{},[38,62,63],{},"Each neuron receives numbers.",[38,65,66],{},"Each neuron mixes them differently.",[38,68,69],{},"Each neuron produces its own output score.",[11,71,72],{},"Now let’s talk about those “quantities”, the weights and that “personal touch”, the bias.",[27,74,76],{"id":75},"weights-a-non-technical-view","Weights: A non-technical view",[11,78,79],{},"Suppose you are deciding whether to attend a party and your decision depends on three factors:",[35,81,82,195,272],{},[38,83,84,194],{},[85,86,89,119],"span",{"className":87},[88],"katex",[85,90,93],{"className":91},[92],"katex-mathml",[94,95,97],"math",{"xmlns":96},"http://www.w3.org/1998/Math/MathML",[98,99,100,114],"semantics",{},[101,102,103],"mrow",{},[104,105,106,110],"msub",{},[107,108,109],"mi",{},"x",[111,112,113],"mn",{},"1",[115,116,118],"annotation",{"encoding":117},"application/x-tex","x₁",[85,120,124],{"className":121,"ariaHidden":123},[122],"katex-html","true",[85,125,128,133],{"className":126},[127],"base",[85,129],{"className":130,"style":132},[131],"strut","height:0.5806em;vertical-align:-0.15em;",[85,134,137,141],{"className":135},[136],"mord",[85,138,109],{"className":139},[136,140],"mathnormal",[85,142,145],{"className":143},[144],"msupsub",[85,146,150,185],{"className":147},[148,149],"vlist-t","vlist-t2",[85,151,154,180],{"className":152},[153],"vlist-r",[85,155,159],{"className":156,"style":158},[157],"vlist","height:0.3011em;",[85,160,162,167],{"style":161},"top:-2.55em;margin-left:0em;margin-right:0.05em;",[85,163],{"className":164,"style":166},[165],"pstrut","height:2.7em;",[85,168,174],{"className":169},[170,171,172,173],"sizing","reset-size6","size3","mtight",[85,175,177],{"className":176},[136,173],[85,178,113],{"className":179},[136,173],[85,181,184],{"className":182},[183],"vlist-s","​",[85,186,188],{"className":187},[153],[85,189,192],{"className":190,"style":191},[157],"height:0.15em;",[85,193],{},": How close the party is.",[38,196,197,271],{},[85,198,200,219],{"className":199},[88],[85,201,203],{"className":202},[92],[94,204,205],{"xmlns":96},[98,206,207,216],{},[101,208,209],{},[104,210,211,213],{},[107,212,109],{},[111,214,215],{},"2",[115,217,218],{"encoding":117},"x₂",[85,220,222],{"className":221,"ariaHidden":123},[122],[85,223,225,228],{"className":224},[127],[85,226],{"className":227,"style":132},[131],[85,229,231,234],{"className":230},[136],[85,232,109],{"className":233},[136,140],[85,235,237],{"className":236},[144],[85,238,240,263],{"className":239},[148,149],[85,241,243,260],{"className":242},[153],[85,244,246],{"className":245,"style":158},[157],[85,247,248,251],{"style":161},[85,249],{"className":250,"style":166},[165],[85,252,254],{"className":253},[170,171,172,173],[85,255,257],{"className":256},[136,173],[85,258,215],{"className":259},[136,173],[85,261,184],{"className":262},[183],[85,264,266],{"className":265},[153],[85,267,269],{"className":268,"style":191},[157],[85,270],{},": How tired you are.",[38,273,274,348],{},[85,275,277,296],{"className":276},[88],[85,278,280],{"className":279},[92],[94,281,282],{"xmlns":96},[98,283,284,293],{},[101,285,286],{},[104,287,288,290],{},[107,289,109],{},[111,291,292],{},"3",[115,294,295],{"encoding":117},"x₃",[85,297,299],{"className":298,"ariaHidden":123},[122],[85,300,302,305],{"className":301},[127],[85,303],{"className":304,"style":132},[131],[85,306,308,311],{"className":307},[136],[85,309,109],{"className":310},[136,140],[85,312,314],{"className":313},[144],[85,315,317,340],{"className":316},[148,149],[85,318,320,337],{"className":319},[153],[85,321,323],{"className":322,"style":158},[157],[85,324,325,328],{"style":161},[85,326],{"className":327,"style":166},[165],[85,329,331],{"className":330},[170,171,172,173],[85,332,334],{"className":333},[136,173],[85,335,292],{"className":336},[136,173],[85,338,184],{"className":339},[183],[85,341,343],{"className":342},[153],[85,344,346],{"className":345,"style":191},[157],[85,347],{},": How much you like the people attending.",[11,350,351],{},"You do not weigh these equally.",[35,353,354,357,360],{},[38,355,356],{},"Distance might matter a little.",[38,358,359],{},"Tiredness might matter a lot.",[38,361,362],{},"Friends might matter even more.",[11,364,365],{},[53,366],{"alt":367,"src":368},"A neuron with inputs and their associated weights","/images/blogs/neurons-weights-biases/neuron-inputs-weights.png",[11,370,371],{},"Each factor pushes your decision in one direction or the other, with different strengths.\nThose “strengths” are weights. You might mentally combine them like this:",[35,373,374,377,380],{},[38,375,376],{},"A nearby party nudges you toward going.",[38,378,379],{},"Being very tired pulls you strongly toward staying home.",[38,381,382],{},"Close friends pull you back toward going.",[11,384,385],{},"You do not consciously multiply numbers. But you are doing something similar. You are combining\nsignals. Each signal has a different importance. You end up with one internal score: “Do I go or not?”",[11,387,388],{},"A neuron does the same thing, but more mathematically.",[35,390,391,394,397],{},[38,392,393],{},"Each input number is multiplied by its weight.",[38,395,396],{},"All those weighted inputs are summed.",[38,398,399],{},"The result is a single score that reflects how strong the overall evidence is.",[11,401,402],{},"If the evidence points strongly in one direction, the neuron responds strongly. If\nthe evidence is weak or conflicting, the neuron barely responds.",[11,404,405],{},"So when we say “this neuron cares more about certain inputs”, we mean something very\nliteral: Those inputs have larger weights, so they contribute more to the neuron’s final score.",[27,407,409],{"id":408},"bias-the-baseline-tendency","Bias: the baseline tendency",[11,411,412,413,19],{},"There is one more piece before the neuron makes a decision: the ",[414,415,416],"strong",{},"bias",[11,418,419],{},"The bias is a built-in offset. It controls how easily or how hard a neuron\nresponds. When a neuron responds strongly enough to pass a meaningful signal\nforward, we say the neuron activates (or fires). These two words mean the\nsame thing, and from this point on, we will mostly use the term activation.",[11,421,422],{},"Even before looking at the inputs, the neuron starts with a small push toward\neither activation or silence. A positive bias makes activation easier. The neuron\nneeds less evidence from its inputs to activate. A negative bias makes activation\nharder. The inputs must collectively be stronger before the neuron responds.",[11,424,425],{},"In simple terms, the bias sets the neuron’s default tendency. It decides whether\nthe neuron is eager to activate or cautious, even before any inputs are considered.",[11,427,428],{},"The bias is usually added to the weighted sum. Mathematically, the neuron computes:",[85,430,433],{"className":431},[432],"katex-display",[85,434,436,535],{"className":435},[88],[85,437,439],{"className":438},[92],[94,440,442],{"xmlns":96,"display":441},"block",[98,443,444,532],{},[101,445,446,449,453,457,464,467,473,476,479,481,487,489,495,497,499,502,504,506,513,515,521,523,525,528],{},[107,447,448],{},"z",[450,451,452],"mo",{},"=",[450,454,456],{"stretchy":455},"false","(",[104,458,459,462],{},[107,460,461],{},"w",[111,463,113],{},[450,465,466],{},"⋅",[104,468,469,471],{},[107,470,109],{},[111,472,113],{},[450,474,475],{"stretchy":455},")",[450,477,478],{},"+",[450,480,456],{"stretchy":455},[104,482,483,485],{},[107,484,461],{},[111,486,215],{},[450,488,466],{},[104,490,491,493],{},[107,492,109],{},[111,494,215],{},[450,496,475],{"stretchy":455},[450,498,478],{},[450,500,501],{},"⋯",[450,503,478],{},[450,505,456],{"stretchy":455},[104,507,508,510],{},[107,509,461],{},[107,511,512],{},"n",[450,514,466],{},[104,516,517,519],{},[107,518,109],{},[107,520,512],{},[450,522,475],{"stretchy":455},[450,524,478],{},[107,526,527],{},"b",[529,530,531],"mtext",{}," ",[115,533,534],{"encoding":117},"z = (w_1 \\cdot x_1) + (w_2 \\cdot x_2) + \\cdots + (w_n \\cdot x_n) + b ",[85,536,538,561,625,684,742,800,820,879,937],{"className":537,"ariaHidden":123},[122],[85,539,541,545,549,554,558],{"className":540},[127],[85,542],{"className":543,"style":544},[131],"height:0.4306em;",[85,546,448],{"className":547,"style":548},[136,140],"margin-right:0.044em;",[85,550],{"className":551,"style":553},[552],"mspace","margin-right:0.2778em;",[85,555,452],{"className":556},[557],"mrel",[85,559],{"className":560,"style":553},[552],[85,562,564,568,572,614,618,622],{"className":563},[127],[85,565],{"className":566,"style":567},[131],"height:1em;vertical-align:-0.25em;",[85,569,456],{"className":570},[571],"mopen",[85,573,575,579],{"className":574},[136],[85,576,461],{"className":577,"style":578},[136,140],"margin-right:0.0269em;",[85,580,582],{"className":581},[144],[85,583,585,606],{"className":584},[148,149],[85,586,588,603],{"className":587},[153],[85,589,591],{"className":590,"style":158},[157],[85,592,594,597],{"style":593},"top:-2.55em;margin-left:-0.0269em;margin-right:0.05em;",[85,595],{"className":596,"style":166},[165],[85,598,600],{"className":599},[170,171,172,173],[85,601,113],{"className":602},[136,173],[85,604,184],{"className":605},[183],[85,607,609],{"className":608},[153],[85,610,612],{"className":611,"style":191},[157],[85,613],{},[85,615],{"className":616,"style":617},[552],"margin-right:0.2222em;",[85,619,466],{"className":620},[621],"mbin",[85,623],{"className":624,"style":617},[552],[85,626,628,631,671,675,678,681],{"className":627},[127],[85,629],{"className":630,"style":567},[131],[85,632,634,637],{"className":633},[136],[85,635,109],{"className":636},[136,140],[85,638,640],{"className":639},[144],[85,641,643,663],{"className":642},[148,149],[85,644,646,660],{"className":645},[153],[85,647,649],{"className":648,"style":158},[157],[85,650,651,654],{"style":161},[85,652],{"className":653,"style":166},[165],[85,655,657],{"className":656},[170,171,172,173],[85,658,113],{"className":659},[136,173],[85,661,184],{"className":662},[183],[85,664,666],{"className":665},[153],[85,667,669],{"className":668,"style":191},[157],[85,670],{},[85,672,475],{"className":673},[674],"mclose",[85,676],{"className":677,"style":617},[552],[85,679,478],{"className":680},[621],[85,682],{"className":683,"style":617},[552],[85,685,687,690,693,733,736,739],{"className":686},[127],[85,688],{"className":689,"style":567},[131],[85,691,456],{"className":692},[571],[85,694,696,699],{"className":695},[136],[85,697,461],{"className":698,"style":578},[136,140],[85,700,702],{"className":701},[144],[85,703,705,725],{"className":704},[148,149],[85,706,708,722],{"className":707},[153],[85,709,711],{"className":710,"style":158},[157],[85,712,713,716],{"style":593},[85,714],{"className":715,"style":166},[165],[85,717,719],{"className":718},[170,171,172,173],[85,720,215],{"className":721},[136,173],[85,723,184],{"className":724},[183],[85,726,728],{"className":727},[153],[85,729,731],{"className":730,"style":191},[157],[85,732],{},[85,734],{"className":735,"style":617},[552],[85,737,466],{"className":738},[621],[85,740],{"className":741,"style":617},[552],[85,743,745,748,788,791,794,797],{"className":744},[127],[85,746],{"className":747,"style":567},[131],[85,749,751,754],{"className":750},[136],[85,752,109],{"className":753},[136,140],[85,755,757],{"className":756},[144],[85,758,760,780],{"className":759},[148,149],[85,761,763,777],{"className":762},[153],[85,764,766],{"className":765,"style":158},[157],[85,767,768,771],{"style":161},[85,769],{"className":770,"style":166},[165],[85,772,774],{"className":773},[170,171,172,173],[85,775,215],{"className":776},[136,173],[85,778,184],{"className":779},[183],[85,781,783],{"className":782},[153],[85,784,786],{"className":785,"style":191},[157],[85,787],{},[85,789,475],{"className":790},[674],[85,792],{"className":793,"style":617},[552],[85,795,478],{"className":796},[621],[85,798],{"className":799,"style":617},[552],[85,801,803,807,811,814,817],{"className":802},[127],[85,804],{"className":805,"style":806},[131],"height:0.6667em;vertical-align:-0.0833em;",[85,808,501],{"className":809},[810],"minner",[85,812],{"className":813,"style":617},[552],[85,815,478],{"className":816},[621],[85,818],{"className":819,"style":617},[552],[85,821,823,826,829,870,873,876],{"className":822},[127],[85,824],{"className":825,"style":567},[131],[85,827,456],{"className":828},[571],[85,830,832,835],{"className":831},[136],[85,833,461],{"className":834,"style":578},[136,140],[85,836,838],{"className":837},[144],[85,839,841,862],{"className":840},[148,149],[85,842,844,859],{"className":843},[153],[85,845,848],{"className":846,"style":847},[157],"height:0.1514em;",[85,849,850,853],{"style":593},[85,851],{"className":852,"style":166},[165],[85,854,856],{"className":855},[170,171,172,173],[85,857,512],{"className":858},[136,140,173],[85,860,184],{"className":861},[183],[85,863,865],{"className":864},[153],[85,866,868],{"className":867,"style":191},[157],[85,869],{},[85,871],{"className":872,"style":617},[552],[85,874,466],{"className":875},[621],[85,877],{"className":878,"style":617},[552],[85,880,882,885,925,928,931,934],{"className":881},[127],[85,883],{"className":884,"style":567},[131],[85,886,888,891],{"className":887},[136],[85,889,109],{"className":890},[136,140],[85,892,894],{"className":893},[144],[85,895,897,917],{"className":896},[148,149],[85,898,900,914],{"className":899},[153],[85,901,903],{"className":902,"style":847},[157],[85,904,905,908],{"style":161},[85,906],{"className":907,"style":166},[165],[85,909,911],{"className":910},[170,171,172,173],[85,912,512],{"className":913},[136,140,173],[85,915,184],{"className":916},[183],[85,918,920],{"className":919},[153],[85,921,923],{"className":922,"style":191},[157],[85,924],{},[85,926,475],{"className":927},[674],[85,929],{"className":930,"style":617},[552],[85,932,478],{"className":933},[621],[85,935],{"className":936,"style":617},[552],[85,938,940,944,947],{"className":939},[127],[85,941],{"className":942,"style":943},[131],"height:0.6944em;",[85,945,527],{"className":946},[136,140],[85,948,531],{"className":949},[136],[11,951,952,953,981],{},"Where ",[85,954,956,969],{"className":955},[88],[85,957,959],{"className":958},[92],[94,960,961],{"xmlns":96},[98,962,963,967],{},[101,964,965],{},[107,966,527],{},[115,968,527],{"encoding":117},[85,970,972],{"className":971,"ariaHidden":123},[122],[85,973,975,978],{"className":974},[127],[85,976],{"className":977,"style":943},[131],[85,979,527],{"className":980},[136,140]," is the bias.",[11,983,984],{},"But why is the bias needed? Because sometimes, even if all inputs are zero or small,\nyou still want the neuron to have a baseline tendency to activate.",[11,986,987],{},"Back to the party example. Even if the party is not close, you are somewhat tired, and\nthe guest list is unknown, you might still go. Because you are generally social.\nThat “default tendency” is the bias. In other words, some people are naturally social.\nEven with weak reasons, they lean toward going. Others need strong reasons to say yes.\nThat baseline inclination is the bias.",[11,989,990],{},[53,991],{"alt":992,"src":993},"Weights and biases visualised with the party analogy","/images/blogs/neurons-weights-biases/weights-and-biases-analogy.png",[11,995,996],{},"Your final decision comes from combining the factors, weighting them, adding your baseline\ntendency, and seeing where you land. A neuron does the same thing, just with numbers.",[27,998,1000],{"id":999},"bringing-it-all-together","Bringing it all together",[11,1002,1003],{},"The chef analogy and the party analogy are describing the same underlying idea.",[11,1005,1006],{},"A neuron takes in inputs, weighs how much each one matters, adds a baseline push,\nand produces an output score. Many neurons doing this in layers is how a neural\nnetwork turns raw numbers into a useful prediction.",[11,1008,1009],{},"If you want the full story, including how layers work together and how these weights\nand biases are learned during training, read our detailed neural networks guide on Guidely.",[27,1011,1013],{"id":1012},"recommended-reading","Recommended reading",[35,1015,1016],{},[38,1017,1018],{},[15,1019,1020],{"href":17},"What are neural networks?",{"title":1022,"searchDepth":1023,"depth":1023,"links":1024},"",2,[1025,1026,1027,1028,1029],{"id":29,"depth":1023,"text":30},{"id":75,"depth":1023,"text":76},{"id":408,"depth":1023,"text":409},{"id":999,"depth":1023,"text":1000},{"id":1012,"depth":1023,"text":1013},null,"2026-04-09","Learn what neurons, weights, and biases really are in neural networks. Simple analogies and clear explanations.","md","/images/blogs/neurons-weights-biases/neurons-weights-and-biases-thumbnail.png",{},true,"/blog/neurons-weights-and-biases-in-neural-nets-with-analogies","patrick-fleith",{"title":5,"description":1032},"neurons-weights-and-biases-in-neural-nets-with-analogies","latest","blog/neurons-weights-and-biases-in-neural-nets-with-analogies","PFcJ8Y0iKHz_-gufqY_bu5RHRd_11v_mPls9doQZ2oE",{"id":1045,"authors":1046,"extension":1033,"meta":1055,"stem":1062,"__hash__":1063},"authors/authors.md",[1047,1051],{"name":1048,"slug":6,"bio":1049,"image":1050},"Nyior Clement","Nyior Clement is a self-taught AI engineer with a strong background in software engineering and developer education. He loves taking complex ideas, understanding them deeply, and explaining them in a way anyone can follow. He’s now building Guidely, a community helping people from all backgrounds learn and grow with AI.","/images/authors/nyior_clement.jpg",{"name":1052,"slug":1038,"bio":1053,"image":1054},"Patrick Fleith","Patrick Fleith is a Freelance Senior AI Engineer. Right now he builds AI applications to improve space mission design and operations. His expertise lies in large language models and time series analysis. Patrick contributes to the community by creating AI-ready datasets. He is also the creator of datafast, an open-source Python library for synthetic dataset generation.","/images/authors/patrick_fleith.png",{"path":1056,"title":1057,"description":1022,"body":1058},"/authors","Authors",{"type":8,"value":1059,"toc":1060},[],{"title":1022,"searchDepth":1023,"depth":1023,"links":1061},[],"authors","dLvyBuVmmT1YPL_LXOzKeNK-CQ_ayU9JxtPI_z7YXm8",1775751449542]