{"id":1402,"date":"2024-02-24T18:04:23","date_gmt":"2024-02-24T18:04:23","guid":{"rendered":"https:\/\/sinatootoonian.com\/?p=1402"},"modified":"2025-12-27T16:06:02","modified_gmt":"2025-12-27T16:06:02","slug":"wrangling-quartics-iii","status":"publish","type":"post","link":"https:\/\/sinatootoonian.com\/index.php\/2024\/02\/24\/wrangling-quartics-iii\/","title":{"rendered":"Wrangling quartics, III"},"content":{"rendered":"\n<p>We are trying to understand the connectivity solutions $Z$ found when minimizing the objective $$ {1 \\over 2 n^2 } \\|X^T Z^T Z X &#8211; C\\|_F^2 + {\\la \\over 2 m^2}\\|Z &#8211; I\\|_F^2.$$<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recap<\/h3>\n\n\n\n<p>We found in <a href=\"https:\/\/sinatootoonian.com\/index.php\/2024\/02\/19\/wrangling-quartics-ii\/\">the previous post<\/a> that solutions satisfy<br>$$ {1 \\over \\la&#8217;} \\left(S^2 \\wt Z_{UU}^2  S^2 &#8211;   S \\wt C_{VV} S \\right) +  I = \\wt Z_{UU}^{-1},\\tag{1}\\label{eqn:main}$$ where $\\wt Z_{UU} = U^T Z U$,$\\wt C_{VV} = V^T C V$, and $\\la&#8217; = {\\la n^2 \/ 2 m^2}.$<\/p>\n\n\n\n<p>Then,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We noticed that the left-hand side looks like an <a href=\"https:\/\/sinatootoonian.com\/index.php\/2024\/02\/12\/inverting-arrowhead-matrices\/\" data-type=\"post\" data-id=\"1071\">arrowhead matrix<\/a> and to determine $\\wt Z_{UU}$ we had to invert. <\/li>\n\n\n\n<li>Arrowhead matrices are determined by their first column or first row, $h$, so $\\wt Z_{UU}$ depended on this quantity. <\/li>\n\n\n\n<li>We found that if we used the observed value of $h$, then the approximation of $\\wt Z_{UU}$ was good. This suggests the arrowhead approximation is OK, if we get $h$ right.<\/li>\n\n\n\n<li>In practice we need to determine $h$ from the other quantities in the problem. The relationship of the vector $h$ to the other quantities in the problem is complex.<\/li>\n\n\n\n<li>We tried to approximate $h$ by its first element, that is $h \\approx h_1 e_1$, and the solving for $h_1$ in terms of the other parameters.<\/li>\n\n\n\n<li>The resulting estimate for $h_1$ was about 30 times less than its correct value!<\/li>\n\n\n\n<li>I guessed that this was due to how $\\wt Z_{UU}$ is sandwiched between two $S^2$ terms, so any errors, e.g. due to poor approximations, will get amplified and affect other parameter estimates.<\/li>\n<\/ul>\n\n\n\n<p>I then worked on trying to improve the approximation of $h$ &#8211; in particular by including a term to account, not for the values of all the other terms in $h$, but for their squared norm, which seemed to be the important quantity. I didn&#8217;t get very far with that.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A solution?<\/h2>\n\n\n\n<p>The solution I found today sidesteps this issue. Due to optimization tolerances, the solution to $\\Eqn{eqn:main}$ returned by the minimization procedure isn&#8217;t exact. We can look for the exact solution by running that equation as a damped iteration,<br>$$ Z_{t+1}^{-1} = \\alpha Z^{-1}_t + (1- \\alpha)\\left[{1 \\over \\la&#8217;} \\left(S^2 Z_t^2  S^2 &#8211;   S \\wt C_{VV} S \\right) +  I\\right].$$ Below I&#8217;ve plotted the before and after:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"558\" src=\"https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/damped_updates-1-1024x558.png\" alt=\"\" class=\"wp-image-1419\" srcset=\"https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/damped_updates-1-1024x558.png 1024w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/damped_updates-1-300x163.png 300w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/damped_updates-1-768x419.png 768w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/damped_updates-1-1536x837.png 1536w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/damped_updates-1-2048x1116.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The left two panels show $\\wt Z_{UU}$ returned by the optimization, and the corresponding recurrent weights $\\wt W_{UU}$. I uses $\\wt Z_{UU}$ to start the iteration. The plot in the middle shows that, after some transient divergence, the iterates get closer together (blue) and converge to a solution (red). The solution, shown on the right, satisfies $\\Eqn{eqn:main}$ at numerical precision. It&#8217;s clear that the initial and terminal solutions are quite different. For example $\\wt Z_{UU}$ seems to have a lot of off-diagonal elements, whereas these are suppressed in $\\wt Z_{UU}^*$. The latter also seems to have its first element almost at zero. This seems well located to cancel the effect of the sandwiching $S^2$ terms.<\/p>\n\n\n\n<p>What makes $\\Eqn{eqn:main}$ hard to solve is that $Z$ shows up in two places: as a $Z^{-1}$ on the righthand side, and as $Z^2$ on the left. The problems we were seeing last time were due (I believe) to errors in our estimate being amplified through the term on the left. Ideally, we&#8217;d like to be able to ignore one or the other term to have a hope of solving this equation. However, when we use the optimization solution, the term on the right is a little bigger than the term on the left. So we have to consider both.<\/p>\n\n\n\n<p>Interestingly, using the exact solution, the contribution of the term containing $Z^2$ is much smaller than that of the term on the right, by about a factor of 60 when measured in matrix norm. <\/p>\n\n\n\n<p><em>Is this just a happy coincidence?<\/em><\/p>\n\n\n\n<p>If we drop the $Z^2$ term, we get $$ \\wt Z_{UU}^{-1} &#8211; I = \\wt W_{UU} \\approx -{S \\wt C_{VV} S \\over \\la&#8217;}.$$ This is in fact in good agreement with the true value:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W_-1024x566.png\" alt=\"\" class=\"wp-image-1425\" srcset=\"https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W_-1024x566.png 1024w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W_-300x166.png 300w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W_-768x424.png 768w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W_-1536x849.png 1536w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W_-2048x1132.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is definitely not the case if we use the solution returned by the optimization:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W__-1024x566.png\" alt=\"\" class=\"wp-image-1429\" srcset=\"https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W__-1024x566.png 1024w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W__-300x166.png 300w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W__-768x424.png 768w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W__-1536x849.png 1536w, https:\/\/sinatootoonian.com\/wp-content\/uploads\/2024\/02\/W_vs_W__-2048x1132.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>We are trying to understand the connectivity solutions $Z$ found when minimizing the objective $$ {1 \\over 2 n^2 } \\|X^T Z^T Z X &#8211; C\\|_F^2 + {\\la \\over 2 m^2}\\|Z &#8211; I\\|_F^2.$$ Recap We found in the previous post that solutions satisfy$$ {1 \\over \\la&#8217;} \\left(S^2 \\wt Z_{UU}^2 S^2 &#8211; S \\wt C_{VV} S [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,30],"tags":[41,36,47,38,40],"class_list":["post-1402","post","type-post","status-publish","format-standard","hentry","category-blog","category-notes-blog","tag-approximation","tag-calculation","tag-damping","tag-matrix-inversion","tag-work"],"acf":[],"_links":{"self":[{"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/posts\/1402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/comments?post=1402"}],"version-history":[{"count":24,"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/posts\/1402\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/posts\/1402\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/media?parent=1402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/categories?post=1402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sinatootoonian.com\/index.php\/wp-json\/wp\/v2\/tags?post=1402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}