Jump to content

Model parameters (ANN): Difference between revisions

From Wikibase
No edit summary
No edit summary
 
Line 1: Line 1:
[[Category:Artificial neural network]]
[[Category:Artificial neural network]]
The '''model parameters''' of an [[artificial neural network (ANN)]], collectively denoted as $\theta$, are the [[artificial neuron#Mathematical_representation|'''weights''' and '''biases ''']] that connect individual [[artificial neuron]]s, learnt during [[#Training|traning]].
The '''model parameters''' of an [[artificial neural network (ANN)]], collectively denoted as $\theta$, are the [[artificial neuron#Mathematical_representation|'''weights''', '''biases ''', and other adjustable parameters]] that connect individual [[artificial neuron]]s, learnt during [[#Training|traning]].


In general, parameters do not change while the model is in use. They are only adjusted during [[#Training|training]] between iterations.
In general, parameters do not change while the model is in use. They are only adjusted during [[#Training|training]] between iterations.


== Definition ==
== Base case ==


For an [[artificial neural network (ANN)]] of $N$ layers each with widths $d_0,\cdots,d_N$, the '''parameters'''
For a simple [[artificial neural network (ANN)]] of $N$ layers each with $d_0,\cdots,d_N$ [[artificial neuron]]s, obtained by [[artificial neuron#Layer_composition|basic layer composition]] and [[feedforward algorithm]], where each neuron satisfies


{{#content:Q3075|noNote}}
Let $\mathbf{W}^{(l)}, \vec b^{(l)}$ represent [[artificial neuron#Basic_form|'''weights''' and '''biases''']] of layer $l$,
then the '''parameters'''
$$
$$
\theta=\left\{\mathbf{W}^{(l)} \in\mathbb{R}^{d_l\times d_{l-1}},\vec b^{(l)} \in \mathbb{R}^{d_l}\right\}_{l=1}^{N}.
\theta=\left\{\mathbf{W}^{(l)} \in\mathbb{R}^{d_l\times d_{l-1}},\vec b^{(l)} \in \mathbb{R}^{d_l}\right\}_{l=1}^{N}.
Line 16: Line 21:
</blockquote>
</blockquote>


== Parameter count ==
=== Parameter count ===


$$
$$
Line 22: Line 27:
$$
$$


== Training ==
=== Training ===


With [[gradient descent]], training is the iteration with step
With [[gradient descent]], training is the iteration with step

Latest revision as of 11:42, 17 November 2026

The model parameters of an artificial neural network (ANN), collectively denoted as $\theta$, are the weights, biases , and other adjustable parameters that connect individual artificial neurons, learnt during traning.

In general, parameters do not change while the model is in use. They are only adjusted during training between iterations.

Base case

For a simple artificial neural network (ANN) of $N$ layers each with $d_0,\cdots,d_N$ artificial neurons, obtained by basic layer composition and feedforward algorithm, where each neuron satisfies

$$\begin{gathered}a = f\left(z \right)\\ \text{Basic form}: z = \sum_{i=1}^{n} w_i x_i + b\end{gathered}$$

Let $\mathbf{W}^{(l)}, \vec b^{(l)}$ represent weights and biases of layer $l$,

then the parameters $$ \theta=\left\{\mathbf{W}^{(l)} \in\mathbb{R}^{d_l\times d_{l-1}},\vec b^{(l)} \in \mathbb{R}^{d_l}\right\}_{l=1}^{N}. $$

Distinction from hyperparameters: The hyperparameters of an artificial neural network (ANN) determines its architecture, while the parameters its behaviour.

Parameter count

$$ |\theta|=\sum_{l=1}^{N}\left(d_{l-1}d_l+d_l\right). $$

Training

With gradient descent, training is the iteration with step

$$ \theta_{i+1}=\theta_i-\eta'\nabla_\theta L(\theta_i), $$

$\eta' \in \mathbb{R}$ effective learning rate, generally on the scale of $10^{-5}\to 10^{-3}$
$\nabla_\theta L(\theta_i)$ the local gradient at $\theta_i$, determined via backpropagation

For a large language model (LLM), the loss function is generally language model loss.