[ https://issues.apache.org/jira/browse/SYSTEMML1761?page=com.atlassian.jira.plugin.system.issuetabpanels:alltabpanel
]
Matthias Boehm updated SYSTEMML1761:

Description:
There are existing rewrites and fused operators for weighted squared loss (wsloss). However,
for the wsloss type {{NONE}}, i.e., without weights {{sum((X(U%*%t(V)))^2)}}, the implementation
is not sparsityexploiting leading to huge (unnecessary) computation overhead for the outerproductlike
multiply of factors. As it turns out, this expression can be rewritten into a sparsityexploiting
form as follows:
{code}
sum ((X  U %*% t(V)) ^ 2)
> sum(X^2)  sum(2 * (X * (U%*%t(V)))) + sum((U%*%t(V))^2)
> sum(X^2)  sum(2 * (X * (U%*%t(V)))) + sum ((t(U) %*% U) * (t(V) %*% V))
{code}
This task aims to change the blocklevel wsloss NONE implementation to exploit this logical
rewrite by computing {{sum(X^2)  sum(2 * (X * (U%*%t(V))))}} in a sparsityexploiting pass
over nonzeros in X and a subsequent correct for {{+ sum ((t(U) %*% U) * (t(V) %*% V))}} via
two tsmm operations.
was:
There are existing rewrites and fused operators for weighted squared loss (wsloss). However,
for the wsloss type {{NONE}}, i.e., without weights {{sum((X(U%*%t(V)))^2)}}, the implementation
is not sparsityexploiting leading huge (unnecessary) computation overhead. As it turns out
this expression can be rewritten into a sparsityexploiting form as follows:
{code}
sum ((X  U %*% t(V)) ^ 2)
> sum(X^2)  sum(2 * (X * (U%*%t(V)))) + sum((U%*%t(V))^2)
> sum(X^2)  sum(2 * (X * (U%*%t(V)))) + sum ((t(U) %*% U) * (t(V) %*% V))
{code}
This task aims to change the blocklevel wsloss NONE implementation to exploit this logical
rewrite by computing {{sum(X^2)  sum(2 * (X * (U%*%t(V))))}} in a sparsityexploiting pass
over nonzeros in X and a subsequent correct for {{+ sum ((t(U) %*% U) * (t(V) %*% V))}} via
two tsmm operations.
> Sparsityexploiting weighted squared loss w/o weights
> 
>
> Key: SYSTEMML1761
> URL: https://issues.apache.org/jira/browse/SYSTEMML1761
> Project: SystemML
> Issue Type: Task
> Reporter: Matthias Boehm
>
> There are existing rewrites and fused operators for weighted squared loss (wsloss). However,
for the wsloss type {{NONE}}, i.e., without weights {{sum((X(U%*%t(V)))^2)}}, the implementation
is not sparsityexploiting leading to huge (unnecessary) computation overhead for the outerproductlike
multiply of factors. As it turns out, this expression can be rewritten into a sparsityexploiting
form as follows:
> {code}
> sum ((X  U %*% t(V)) ^ 2)
> > sum(X^2)  sum(2 * (X * (U%*%t(V)))) + sum((U%*%t(V))^2)
> > sum(X^2)  sum(2 * (X * (U%*%t(V)))) + sum ((t(U) %*% U) * (t(V) %*% V))
> {code}
> This task aims to change the blocklevel wsloss NONE implementation to exploit this logical
rewrite by computing {{sum(X^2)  sum(2 * (X * (U%*%t(V))))}} in a sparsityexploiting pass
over nonzeros in X and a subsequent correct for {{+ sum ((t(U) %*% U) * (t(V) %*% V))}} via
two tsmm operations.

This message was sent by Atlassian JIRA
(v6.4.14#64029)
