Model parameters (ANN): Difference between revisions
Point the neural network link at the existing ANN page (via update-page on MediaWiki MCP Server) |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Artificial neural network]] | [[Category:Artificial neural network]] | ||
The '''model parameters''' of an [[artificial neural network (ANN) | 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. | |||
== Base case == | |||
$$ | 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}. | |||
$$ | $$ | ||
<blockquote> | |||
'''Distinction from hyperparameters''': The '''[[hyperparameter]]s''' of an [[artificial neural network (ANN)]] determines its '''architecture''', while the '''parameters''' its '''behaviour'''. | |||
</blockquote> | |||
== | === 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 | \theta_{i+1}=\theta_i-\eta'\nabla_\theta L(\theta_i), | ||
$$ | $$ | ||
<div class=center> | |||
{| class="wikitable" | |||
|- | |||
| $\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]] | |||
|} | |||
</div> | |||
For a [[large language model (LLM)]], the loss function is generally [[language model loss]]. | |||
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.