Jump to content

Model parameters (ANN): Difference between revisions

From Wikibase
Do not abbreviate to "neural network": a neural network can be biological. Link the ANN instead (via update-page on MediaWiki MCP Server)
No edit summary
Line 1: Line 1:
[[Category:Artificial neural network]]
[[Category:Artificial neural network]]
The '''model parameters''' of an [[artificial neural network (ANN)]] are the quantities learned during training, written collectively as $\theta$: the weights and biases of every layer. They are what distinguishes 1 trained model from another of the same architecture, and they are fixed once training ends.
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]].
 
In general, parameters do not change while the model is in use. They are only adjusted during [[#Training|training]] between iterations.


== Definition ==
== Definition ==


For a network of $N$ layers with widths $d_0,\cdots,d_N$, the parameters are the weights and biases of every layer,
For an [[artificial neural network (ANN)]] of $N$ layers each with widths $d_0,\cdots,d_N$, the '''parameters'''


$$
$$
\theta=\left\{\mathbf{W}^{(l)},\vec b^{(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}.
\qquad
\mathbf{W}^{(l)}\in\mathbb{R}^{d_l\times d_{l-1}},
\qquad
\vec b^{(l)}\in\mathbb{R}^{d_l},
$$
$$


so the parameter count is
<blockquote>
'''Distinction from hyperparameters''': The '''[[hyperparameter]]s''' of an [[artificial neural network (ANN)]] determines its '''architecture''', while the '''parameters''' its '''behaviour'''.
</blockquote>
 
== Parameter count ==


$$
$$
Line 20: Line 22:
$$
$$


The parameter count $|\theta|$ is the quantity that the [[large language model (LLM)#Scaling laws|scaling laws]] and the [[Chinchilla prescription]] scale, and the "very large parameter count" that defines a [[large language model (LLM)|large language model]] is this count.
== Training ==


== Role in the model ==
With [[gradient descent]], training is the iteration with step
 
Parameters turn an architecture into a particular function. The [[forward pass]] evaluates it as $f_\theta$, and predictions are conditional distributions indexed by $\theta$,


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


so $\theta$ appears as a subscript wherever the output distribution of the model is written.
<div class=center>
 
{| class="wikitable"
== Distinction from hyperparameters ==
|-
 
| $\eta' \in \mathbb{R}$
The number of layers $N$, the widths $d_l$, the [[activation function]] $\sigma$, and the learning rate $\eta$ are '''hyperparameters''': they fix the shape of $\theta$ and the manner of its training, but they are chosen rather than learned.
| '''effective learning rate''', generally on the scale of $10^{-5}\to 10^{-3}$
 
|-
== Distinction from state ==
| $\nabla_\theta L(\theta_i)$
 
| the '''local gradient''' at $\theta_i$, determined via [[backpropagation]]
Parameters are not state. They are set during training and do not change while the model is in use, whereas state is whatever a model carries between steps: the hidden state of a recurrent network, the fixed-size state of a state-space model, or the keys and values held by [[KV caching]]. A state-space model updates its state at every token; it does not update its parameters.
|}
 
</div>
== Training ==
 
Training is the search for the $\theta$ that minimises the [[language model loss|loss]], and [[gradient descent]] updates it in steps of the form
 
$$
\theta_{i+1}=\theta_i-\eta\nabla_\theta L(\theta_i),
$$


with [[backpropagation]] supplying $\nabla_\theta L$.
For a [[large language model (LLM)]], the loss function is generally [[language model loss]].

Revision as of 18:29, 11 November 2026

Languages: English · français · Esperanto

The model parameters of an artificial neural network (ANN), collectively denoted as $\theta$, are the weights and biases 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.

Definition

For an artificial neural network (ANN) of $N$ layers each with widths $d_0,\cdots,d_N$, 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.