random_matrix_adaption_parameterized_interdependence
Bases: parameterized_interdependence
A parameterized interdependence function using random matrix adaptation.
Notes
Formally, given a parameter vector \(\mathbf{w} \in R^l\) of length \(l\), we can partition it into two vectors \(\lambda_1\) and \(\lambda_2\). These two vectors will define two diagonal matrices \(\Lambda_1 = diag( \lambda_1) \in R^{m \times m}\) and \(\Lambda_2 = diag(\lambda_2) \in R^{r \times r}\).
These two sub-matrices will fabricate a parameter matrix of shape \(m \times m'\) as follows:
\[ \begin{equation} \xi(\mathbf{w}) = \Lambda_1 \mathbf{A} \Lambda_1 \mathbf{B}^\top \in R^{m \times m'}, \end{equation} \]
where matrices \(\mathbf{A} \in R^{m \times r}\) and \(\mathbf{B} \in R^{m' \times r}\) are randomly sampled from the Gaussian distribution \(\mathcal{N}(\mathbf{0}, \mathbf{I})\). The required length of vector \(\mathbf{w}\) is \(l_{\xi} = m + r\).
Attributes:
Name | Type | Description |
---|---|---|
r |
int
|
Rank of the random matrix approximation. |
Methods:
Name | Description |
---|---|
__init__ |
Initializes the random matrix adaptation parameterized interdependence function. |
Source code in tinybig/interdependence/parameterized_interdependence.py
__init__(r=2, name='random_matrix_adaption_parameterized_interdependence', *args, **kwargs)
Initializes the random matrix adaptation parameterized interdependence function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
r
|
int
|
Rank of the random matrix approximation. Defaults to 2. |
2
|
name
|
str
|
Name of the interdependence function. Defaults to 'random_matrix_adaption_parameterized_interdependence'. |
'random_matrix_adaption_parameterized_interdependence'
|
*args
|
tuple
|
Additional positional arguments for the parent class. |
()
|
**kwargs
|
dict
|
Additional keyword arguments for the parent class. |
{}
|