1

Hi Everyone in Math Community,

I am a newcomer to this community, and this is the first time I have asked a question.

We are working on a neural network and trying to find a reasonable loss function for our project. Currently, we aim to utilize the outputs' symmetric correlation coefficient matrix in calculating loss. The diagonal of the correlation coefficient matrix is 1, and the range of other elements in the matrix is [-1, 1]. For example, $$ \begin{bmatrix} 1 & 0.1 & 0.6 \\ 0.1 & 1 & -0.4 \\ 0.6 & -0.4 & 1 \end{bmatrix} $$

The goal of the loss is to lead the upper triangular matrix elements in each row to a monotonic decrease from left to right.

For example, $$ \begin{bmatrix} \mathbf{1} & \mathbf{0.5} & \mathbf{-0.1} \\ 0.5 & \mathbf{1} & \mathbf{0.4} \\ -0.1 & 0.4 & \mathbf{1} \end{bmatrix} $$ Therefore, we need a measurement function to map the matrix to a scalar. The scalar aims at providing the distance between the current matrix and the target matrix. It will work as an optimization guide for the neural network, and thus we can obtain the correlation coefficient matrix as demanded.

I would appreciate it if someone could provide me with suggestions on writing a good question or the measurement function.

Thanks!

  • Is the target a specific numerical matrix or a class of matrices? If the former, does it depend upon the original matrix? – Greg Martin Jul 03 '22 at 07:20
  • @GregMartin Hi, the target is a class of matrices. Any matrix with decreasing elements in each row is acceptable. We hope that the correlation coefficient matrix after optimization meets the requirement. – Heming Du Jul 03 '22 at 08:16
  • Ok, so if $a_{i,j}$ is the entry in the $i$th row and $j$th column, then you want each $a_{i,j}-a_{i,j+1}$ $(1\le i\le n,, i\le j\le n-1)$ to be nonnegative. Therefore the function $\sum_{i=1}^n \sum_{j=i}^{n-1} \max{0,a_{i,j+1}-a_{i,j}}$ equals $0$ if the matrix has the form you want (with possible ties) and is positive otherwise, so you could aim to minimize it. Does that function suffice? – Greg Martin Jul 03 '22 at 18:08

0 Answers0