In the field of Artificial Intelligence (AI), Neural Networks (also known as ANNs) were inspired by the way in which biological systems process data. However, due to the lack of extraneous limitations, such as those found in biological systems, ANNs provide an excellent model for statistical pattern recognition. The components of ANNs are various, but the two most critical components are the weight and the bias. In this article, we will discuss the factors of weights and neural network bias in detail.

## Artificial neural networks and their constituent parts

Multiple parts, including those listed below, make up ANNs.

**Inputs:**To create predictions, a neural network is often fed them in the form of characteristics extracted from a dataset.**Weights:**Indeed, the feature values have a monetary value associated with them as they are of utmost importance in providing the neural network with the data it needs to be trained. They are essential in conveying the importance of each feature used in the training process.**Bias:**Neural networks can modify activation functions in two-dimensional planes through the use of bias. This allows the activation functions to be shifted to the left or right. Further details about this process will be made available at a later date.**Summing up:**As a mathematical operation, it is defined as the product of the weight and the biassed characteristics.**Purpose of activation:**Non-linearity in the neural network model is essential.

## In a neural network, what exactly does “bias” mean?

A neural network‘s bias is the product of a constant and the summation of all the features and weights. Its purpose is to act as a counterbalance to any other influences that may be at play. To optimise the model, it is beneficial to invert the activation function from either the positive or negative side.

## In neural networks, why do we introduce bias?

To begin comprehending bias in neural networks, let’s first talk about simple neural networks composed of a single hidden layer.

For each given neural network, the function Y=f(X), where X and Y are two vectors with independent components (feature vector and output vector), is computed. Furthermore, the provided neural network can be expressed as Y=f if the weight ‘W’ is specified for the given X vector (X,W).

## Improving neural networks by introducing bias

Considering the previously described circumstances, it is possible to adjust the output values of a neural network by adding a bias ‘b’ to the function if the neural network makes erroneous predictions. This would result in a function of the form y = f(x) + b, which includes all of the predictions made by the neural network, but with an offset of ‘b’.

Adding another input to the neural network layer results in the function being expressed as y = f(x1, x2). As x1 and x2 are unrelated variables, the biases of each variable, b1 and b2, should be treated independently. This allows the neural network to be expressed as y = f(x1, x2) + b1 + b2.

### In a neural network, there is only one bias allowed per layer.

This document will address the issue of determining whether or not a neural network’s bias is unique. To illustrate this concept, consider a network with n inputs and a feature vector X = [x1, x2,….,xn], and systematic errors represented by b1, b2,….,bn. A neural network with a single hidden layer would compute the function Y = f(X,W) + (b1+ b2+….bn), where W is a weight matrix.

It is widely accepted that the scalar product of scalers is equal to ‘b.’ Therefore, the linear combination of (b1+ b2+….bn) can be expressed as a single numerical value, which can be expressed as Y = f(X,W) + b. This demonstrates that each layer of a neural network has its own independent bias.

In the next paragraph, we will focus on neural networks having more than one hidden layer.

### Incorporation of bias into the activation function

If the bias component were incorporated into the activation function instead of the output, it could prevent the neurons in a neural network from remaining inactive when the input takes on certain values. This is because the activation function would no longer be linear, allowing more flexibility in the neural network’s response to the input.

## Artificial intelligence biases

Machine learning may be affected by the following biases:

### Bias in algorithms

When algorithms are constructed in an inadequate manner, they can introduce bias into the machine learning process, resulting in a decrease in the accuracy of the outcomes.

### Statistics bias

This analysis suggests that there is an issue with the training dataset, such as a disproportion in the distribution of data points for a particular class in the case of classification tasks, or a dearth of data points for the model to use in training its algorithmic models.

### Bias due to poor anchoring

If the data and measurements used to train the models are based on subjective opinion rather than objective criteria, the accuracy of the predictions generated is significantly reduced. Furthermore, it can be difficult to locate datasets which employ this subjective opinion-based standard.

### Disparity in resource availability

When the modeller creates the dataset, including the data that they are already familiar with, this can lead to bias. For example, in the healthcare field, a dataset that has been constructed with knowledge of a particular medical condition cannot be used to accurately predict the outcomes of other medical conditions.

### An example of the cognitive bias known as confirmation

This happens when the modeller choose their data in a way that confirms their existing worldview, which in turn leads to inaccurate forecasts.

### Negative discrimination

It happens when the modeller fails to account for crucial information while training the model.

## Deep learning and bias: a case study

In the 2019 study, “Potential Biases in Machine Learning Algorithms Using Electronic Health Record Data,” the potential implications of bias on deep learning algorithms in healthcare are explored. The paper examines three distinct types of bias, namely, selection bias, measurement bias, and confounding bias. Selection bias occurs when the sample population does not reflect the characteristics of the population of interest, while measurement bias occurs when the data collection process is flawed or incomplete. Lastly, confounding bias occurs when the relationship between two variables is not accurately represented in the data.

**Patients Not Recognised by Algorithms and Missing Data**The discrepancies between the datasets and the machine learning algorithms may be due to a lack of uniformity in the original data source, such as electronic health records. This could be caused by the data source not adhering to a consistent data format. Consequently, these discrepancies may arise, resulting in the current situation.**Inadequate Sample Size and Overestimation:**The lack of data from a sufficient number of patients is the root cause of bias in healthcare. Excluding patients of a particular race or ethnicity can be a major contributing factor to prejudice and discrimination. It is therefore essential that healthcare professionals ensure that the data they use is representative of the population they are serving in order to ensure that their conclusions are valid and unbiased.**Caused by Misclassification and Measuring Errors:**The training dataset may be tainted by bias if the data is of poor quality or if healthcare personnel input data inconsistently.

## Preventing and mitigating bias in deep learning

To lessen the effects of bias in deep learning, use one of these approaches:

- Selecting an appropriate model for use in machine learning.
- There is no evidence of class imbalance in the training dataset.
- Careful attention is paid to data processing.
- In the course of the machine learning process, no information is lost.

In this session, we explored the formulation of neural networks, the purpose of activation functions, the use of bias to reduce errors, and the potential consequences of not properly integrating activation functions into neural networks. We discussed how to select the appropriate machine learning model after a thorough data analysis and how to correctly prepare data in order to avoid potential model training errors. Ultimately, our goal is to ensure that neural networks are accurately implemented and that activation functions are properly incorporated in order to optimise machine learning results.