Linear Step and Baseline Bias hero
Lesson 1The Artificial Neuron & Activations

Linear Step and Baseline Bias

Baseline bias offsets that establish independent starting thresholds, completing the linear step and shifting dot products along the decision threshold.

In Topic 1, we calculated the raw dot product (w⋅xw \cdot x) by multiplying script genre features by audience influence weights, yielding raw scores of +9.5+9.5 for 'Die Hard in Space' and −1.5-1.5 for 'The Notebook 2'.

In that setup, audience influence on individual genres was what determined the movie's score:

Raw Score=w⋅x\text{Raw Score} = w \cdot x

However, whether a movie becomes a hit rarely depends on audience preferences alone.

What if the entire movie industry is in a box-office slump, and theater attendance is down across the board? In a cold market, it's harder for any movie to become a hit—regardless of its script or genres. Conversely, during the holidays when theater attendance is high in general, a positive baseline makes it easier for any movie to become a hit.

That background climate affects the outcome, yet it has nothing to do with any individual script. It is an industry-wide baseline condition.

That starting offset is simply an independent baseline influence, known as the bias (bb).


The Linear Step: Adding Baseline Bias

To account for baseline conditions, every artificial neuron adds an independent scalar parameter called the bias (bb) to its accumulated dot product:

z=∑i=1nwixi+b=w⋅x+bz = \sum_{i=1}^n w_i x_i + b = w \cdot x + b

The resulting value (zz) is called the linear score. In neural networks, calculating this score is known as the linear step.

Notice the two distinct components of the linear score:

  1. Feature Evidence (w⋅xw \cdot x): The raw score contributed by the input features and weights.
  2. Baseline Bias (bb): An independent offset that shifts the score up or down regardless of the inputs.

Depending on the environment, the baseline bias can take on three states:

  • Negative Bias (b<0b < 0): Acts as a hurdle. It lowers the linear score, demanding stronger feature evidence to cross zero.
  • Positive Bias (b>0b > 0): Acts as a head start. It raises the linear score, making it easier to cross zero.
  • Zero Bias (b=0b = 0): A neutral baseline where the outcome relies purely on the raw dot product (z=w⋅xz = w \cdot x).

Applying Baseline Bias to Our Movie Predictor

Now, let's put concrete numbers on our movie studio scenario.

Recall our audience influence weights (ww) across the fixed genre order [Action, Romance, Comedy, Sci-Fi]:

w=[5.0−2.01.04.0](Action Weight)(Romance Weight)(Comedy Weight)(Sci-Fi Weight)w = \begin{bmatrix} 5.0 \\ -2.0 \\ 1.0 \\ 4.0 \end{bmatrix} \begin{matrix} \text{(Action Weight)} \\ \text{(Romance Weight)} \\ \text{(Comedy Weight)} \\ \text{(Sci-Fi Weight)} \end{matrix}

Imagine the movie industry enters a severe box-office slump where theater attendance drops across the board. To model this harsh market climate, our studio predictor introduces a negative baseline hurdle:

b=−2.0b = -2.0

Let's evaluate how this market slump hurdle affects our two scripts:

🎬 'Die Hard in Space': Linear Score

FeatureFeature Value
(x)
Weight
(w)
Product
(wi · xi)
Dot Product
(w · x)
Industry Bias
(b)
Linear Score
(z = w · x + b)
Action1.0+5.0+5.0+9.5−2.0+7.5
Romance0.0−2.00.0
Comedy0.5+1.0+0.5
Sci-Fi1.0+4.0+4.0

🎬 'The Notebook 2': Linear Score

FeatureFeature Value
(x)
Weight
(w)
Product
(wi · xi)
Dot Product
(w · x)
Industry Bias
(b)
Linear Score
(z = w · x + b)
Action0.0+5.00.0−1.5−2.0−3.5
Romance1.0−2.0−2.0
Comedy0.5+1.0+0.5
Sci-Fi0.0+4.00.0

The industry slump hurdle penalizes both films equally by −2.0-2.0. 'Die Hard in Space' maintains a strong positive score of +7.5+7.5, while 'The Notebook 2' is pushed deeper into negative territory at −3.5-3.5.


Previous
Vectors and Dot Products In Practice