<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>James Nagy | Emory REU Computational Mathematics for Data Science</title><link>http://www.math.emory.edu/site/cmds-reuret/author/james-nagy/</link><atom:link href="http://www.math.emory.edu/site/cmds-reuret/author/james-nagy/index.xml" rel="self" type="application/rss+xml"/><description>James Nagy</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Mon, 27 Jun 2022 11:36:49 -0400</lastBuildDate><image><url>http://www.math.emory.edu/site/cmds-reuret/author/james-nagy/avatar_hu_76a68c1223ab11fd.png</url><title>James Nagy</title><link>http://www.math.emory.edu/site/cmds-reuret/author/james-nagy/</link></image><item><title>New algorithm helps make portable CT machine images clearer</title><link>http://www.math.emory.edu/site/cmds-reuret/projects/2021-tomography/</link><pubDate>Tue, 14 Dec 2021 00:00:00 +0000</pubDate><guid>http://www.math.emory.edu/site/cmds-reuret/projects/2021-tomography/</guid><description>&lt;p>This blog post was written by Mai Phuong Pham Huynh, Manuel Santana, and Ana Castillo and published with minor edits. The team was advised by Dr. James Nagy.
In addition to this post, the team has also given a &lt;a href="https://github.com/EmoryMLIP/emory-reu-ret-website/files/6874766/_REU2021__Tomo_Presentation.pdf" target="_blank" rel="noopener">midterm presentation&lt;/a> , created a &lt;a href="./img/REU_RETPoster.pptx.png">poster&lt;/a>, made a &lt;a href="https://youtu.be/qdcGe9MKCoI" target="_blank" rel="noopener">poster blitz video&lt;/a>, published &lt;a href="https://github.com/manuelarturosantana/TomoREU2021" target="_blank" rel="noopener">code&lt;/a>, written a &lt;a href="https://arxiv.org/abs/2109.01481" target="_blank" rel="noopener">paper&lt;/a>, and developed a &lt;a href="Tomography.Lesson.pdf">lesson plan&lt;/a>.&lt;/p>
&lt;p>Research done at the 2021 REU/RET summer program at Emory University has devised a way to make medical diagnoses more effectively. The work behind this new algorithm relies heavily upon mathematical techniques that connect numerical linear algebra with optimization methods.&lt;/p>
&lt;p>Some of the most important aspects of this work link branches of mathematics like calculus, statistics, algebra and geometry. The different contributions by mathematicians to these branches of mathematics were complementary and accelerated research in the area of image reconstruction. The results obtained from their work have offered other student mathematicians a different way to study these problems and shown that this is an effective way for radiology doctors to accurately diagnose illnesses and keep saving patients&amp;rsquo; lives. The goal of the Point-of-Care Tomographic Imaging research group is to develop numerical methods that would estimate the geometry parameters of a portable CT scanning device and to reconstruct the image. CT images in portable devices are a lot clearer. This work has been one of the most interesting pieces of work ever accomplished.&lt;/p>
&lt;h1 id="covid-19-and-imaging">COVID-19 and Imaging&lt;/h1>
&lt;p>The mathematical ideas involved in the Point-of-Care Tomographic Imaging project are of great importance. With these mathematical methods, imaging becomes a possibility with patients in all parts of the world, allowing them to live a healthy and happy life. To get better reconstructed images, the group considers a regularized linear least squares problem, to which the solution is approximated by using an alternating descent scheme known as block coordinate descent or (BCD). Each iteration of BCD has two steps. One BCD step solves a linear least square problem, and the next step solves the nonlinear problem.&lt;/p>
&lt;p style="font-size: 0.9rem;font-style: italic;"> &lt;img style="display: block;" src="https://live.staticflickr.com/65535/49679288857_200a679135_b.jpg" alt="Coronavirus">&lt;a href="https://www.flickr.com/photos/110751683@N02/49679288857">"Coronavirus"&lt;/a>&lt;span> by &lt;a href="https://www.flickr.com/photos/110751683@N02">Yu. Samoilov&lt;/a>&lt;/span> is licensed under &lt;a href="https://creativecommons.org/licenses/by/2.0/?ref=ccsearch&amp;atype=html" style="margin-right: 5px;">CC BY 2.0&lt;/a>&lt;a href="https://creativecommons.org/licenses/by/2.0/?ref=ccsearch&amp;atype=html" target="_blank" rel="noopener noreferrer" style="display: inline-block;white-space: none;margin-top: 2px;margin-left: 3px;height: 22px !important;">&lt;img style="height: inherit;margin-right: 3px;display: inline-block;" src="https://search.creativecommons.org/static/img/cc_icon.svg?image_id=6f5e7d78-bf4e-4b46-8ba9-c469af85860f" />&lt;img style="height: inherit;margin-right: 3px;display: inline-block;" src="https://search.creativecommons.org/static/img/cc-by_icon.svg" />&lt;/a>&lt;/p>
&lt;p>By the 1900’s mathematicians had already found ways to use these iterative reconstruction techniques to reconstitute an image. In 1917, Johann Radon introduced the Radon Transform, followed by Stefan Kaczmarz in 1937. Scientists Allan McLeod Cormack and Godfrey Newbold Hounsfield developed the first scanning device. These innovations each contributed to modern medical scanning technology.&lt;/p>
&lt;p>The medical field has greatly depended on these iterative reconstruction methods. In medical imaging, computed tomography (CT) techniques are becoming more and more popular for their ability to produce high quality images of the human body. CT methods use a combination of computer processes and mathematics to reconstruct images. The COVID-19 pandemic brought many challenges and setbacks to many doctors around the world and imaging played a vital role in helping diagnose the virus. Doctors have been able to use CT scans to diagnose and treat COVID-19 by examining the lungs of patients who are potentially infectious, or in recovery.&lt;/p>
&lt;h1 id="point-of-care-tomographic-imaging">Point-of-Care Tomographic Imaging&lt;/h1>
&lt;p>Since the first CT scanner was developed, CT scanning technology has evolved significantly. Now, there are portable CT scanners that can be transported anywhere without trouble. The idea of transporting huge heavy CT scanners to remote locations was always a difficult task for many doctors. Point-of-care tomographic imaging has allowed radiologists to add portable CT scanners to their departments to increase patient satisfaction and improve medical outcomes. Portable CT scanners can be used to do scans of a patient without moving the patient out of bed.&lt;/p>
&lt;p>A CT scanner is a device that is composed of a scanning gantry, x-ray generator, computer system, console panel and a physician’s viewing console. The scanning gantry is the part that will produce and detect x-rays. In a typical CT scan, a patient lays on a bed that moves through the gantry. An X-ray source rotates around the patient and shoots X-ray beams through the human body at different angles. These X-ray measurements are then processed on a computer using mathematical algorithms to create tomographic (cross-sectional) images of the tissues inside the body.&lt;/p>
&lt;p>Limitations arise when using these portable CT scanners for medical procedures since these devices require extensive care, such as regular calibration for effective performance. This is where the point-of-care tomographic imaging problem begins.&lt;/p>
&lt;h1 id="the-beginning-of-the-problem">The Beginning of the Problem&lt;/h1>
&lt;p align="center">
&lt;img width="300" height="300" src="https://user-images.githubusercontent.com/84742324/126915305-c8b40ba1-d37f-4317-9bf6-66e5155a8cd5.png">
&lt;/p>
&lt;p>Two parameters that relate to the geometry of portable CT scanning devices are:&lt;/p>
&lt;ol>
&lt;li>R - distance between source and detector and&lt;/li>
&lt;li>θ - orientation of source to detector.&lt;/li>
&lt;/ol>
&lt;p>During the CT acquisition process, the x-ray source rotates around the patient. Each time the x-ray source moves to a new position, these parameters change. In point-of-care imaging, these parameters are essential during the data imaging process. Imprecise data (unknown parameters) result in the reconstruction of poor quality images, while precise data (known parameters) yield a well reconstructed image.&lt;/p>
&lt;p>&lt;em>How were these geometry parameters estimated to obtain better reconstructed images?&lt;/em>&lt;/p>
&lt;p align="center">
&lt;img width="700" height="300" src="https://user-images.githubusercontent.com/84742324/126884434-a47ee15e-2df5-45f1-8b5f-f1af63e894ad.png">
&lt;/p>
&lt;p>The group considered solving a regularized linear least squares problem. The solution to this problem is approximated by using an alternating descent scheme known as block coordinate descent or (BCD). They used this alternating algorithm in which each iteration alternately solves a linear last squares problem (for the image) and a nonlinear least squares problem (for the geometry parameters). An alternate form of this algorithm was also studied as a fixed point iteration, with acceleration techniques used to improve convergence. Implementation and numerical examples were done using MATLAB to obtain results. To understand the background behind this problem, the connection between Beer’s Law and linear algebra needs to be studied.&lt;/p>
&lt;h1 id="beers-law--linear-algebra">Beer’s Law &amp;amp; Linear Algebra&lt;/h1>
&lt;p>The Beer-Lambert Law or Beer’s Law was first developed in 1729 by Pierre Bouguer, and in 1852, Beer added to the law. Beer’s law states that as an x-ray source emits an x-ray beam and it passes through an object, the beam loses energy exponentially. To create a 2-D image, an imaginary grid of pixels is placed atop the object, and an x-ray beam is then shot through the object. Beer’s Law is used to create a system of linear equations.&lt;/p>
&lt;p align="center">
&lt;img width="400" height="300" src="https://user-images.githubusercontent.com/84742324/126884449-423a5fc2-3aa9-4d37-84ca-a8d2c73e3f5a.png">
&lt;/p>
&lt;p>From Algebra, it is known that a system of equations has three types of solutions, infinitely many, exactly one, or no solution. When there is no solution, the system is called inconsistent, as opposed to consistent when there exists a solution. When there are more equations (x-rays) than unknowns (pixels), then the system is overdetermined. This is what happens in computed tomography. When there are more unknowns (pixels) than equations (x-rays), then the system is underdetermined.
In each equation, every unknown represents a physical property, called attenuation, for each pixel value. Pixels that have the same amount of material have the same attenuation. An image is then created from the pixels. The images obtained based on the attenuation values allow doctors to make more accurate diagnoses. For example, bones have a different attenuation than lungs.&lt;/p>
&lt;p>A system of linear equations can be solved in Precalculus by the Gauss-Jordan elimination method. In linear algebra, a matrix equation of the form Ax=b is solved to find x. Ideally, this can easily be done. Unfortunately, for this project, this might not be possible for several reasons: 1) b has noise in it, and 2) the exact matrix A may not be known because the parameters R and θ may be perturbed (for example, the CT machine may not be calibrated correctly). Matrix A may also be a huge matrix containing millions of rows and columns. Typical approaches learned in Pre-Calculus or a linear algebra class cannot be used to solve this problem. The tomographic imaging research group uses other methods to solve these large problems, referred to as ill-posed.&lt;/p>
&lt;p>An ill-posed problem is often referred to as one that is not well-posed. In the 20th Century, French mathematician Jacques Hadamard defined a well-posed problem as one having three properties: 1) a solution exists, 2) the solution is unique, 3) the solution depends continously on initial values. An ill-posed problem needs to be approached differently, e.g. -regularization. Tikhonov regularization is a common form of regularization for ill-posed problems.&lt;/p>
&lt;h1 id="the-linear--nonlinear-least-squares-problem">The Linear &amp;amp; NonLinear Least Squares Problem&lt;/h1>
&lt;p>Throughout the 1800s, mathematicians such as Legendre, Gauss, and Laplace contributed ideas to the method of least squares. For example, the method of least squares can be used to find the line that minimizes the sum of squared distances between teh line and the given data points.
In computed tomography, a problem arises that involves least squares, a regularized linear least squares problem. This regularized linear least squares problem is composed of x, the image, A(p), a matrix that is constructed by the geometry parameters, R and θ, b, the measured data, and a parameter α, called the regularization parameter. The nonlinear least squares problem does not include the regularization parameter.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./BCDgif.gif" alt="Example of BCD" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>The solution to this problem is found by the block coordinate descent (BCD). The BCD algorithm is an optimization algorithm that solves this problem iteratively. BCD works by minimizing the parameters R and θ and x one at a time. The linear least squares problem is considered first. It takes the initial parameters R and θ, generate matrix A, to get x, the image. Here the parameters, R and θ are known and x is approximated. Then, the nonlinear least squares problem is considered. Once x is known, then x is used to approximate the parameters, R and θ. In this latter phase, x is known and the parameters R and θ are approximated. The pattern continues until a good image is produced.&lt;/p>
&lt;h1 id="filter---based-regularization">Filter - Based Regularization&lt;/h1>
&lt;p>Since it is impossible to get data exactly from the detector due to numerous reasons, regularization is needed to lower the error the solution caused by noise in the data. Tikhonov regularization is one of the most common ways to handle these noise levels. The method is named after mathematician Andrey Tikhonov. Tikhonov worked in numerous topics and different fields of mathematics. His best contributions are in topology.&lt;/p>
&lt;p>Singular value decomposition (SVD) plays an important role in understanding the basic idea behind Tikhonov Regularization. The singular values of the matrix A are significant. To achieve good reconstructed images with small error, it is necessary to have the balance of large and small singular values; the large singular values have good information about the solution, but the small singular values cause errors to blow up.&lt;/p>
&lt;h1 id="matlab-toolboxes--implementation">MATLAB Toolboxes &amp;amp; Implementation&lt;/h1>
&lt;p>MATLAB was used in the project, including the optimization, signal processing, and image processing toolboxes. The IR Tools, AIR Tools II, and Imfil packages were also used.&lt;/p>
&lt;p>To simulate a problem, the IR tools package is used. IR tools also provide regularized linear least square solvers. Three of these linear least squares solvers are: 1) hybrid-LSQR algorithm, 2) IRN, 3) FISTA. To approximate the solution of the non-linear least squares problem two methods are used: 1)lsqnonlin, 2) imfil.&lt;/p>
&lt;p>The implementation of BCD used the IR Tools package and naming conventions. In the base IRtools package, the function PRset is used to set up options for computed tomography problems, where PRset is updated to accept values related to the BCD (inital guess for parameters). To simulate a CT problem with unknown geometry parameters PRtomo_var is used with the image size being n×n. PRtomo_var generates all the data necessary to simulate the inverse problem. IRset updates to include parameters for BCD, such as which acceleration technique to use, and IRbcd implements the BCD algorithm.&lt;/p>
&lt;p>The steps above permit the simulation and solving of a CT reconstruction experiment. With n=64 and perturbations added to the parameters R and θ, the test problem is generated. The image used is the Shepp-Logan image.&lt;/p>
&lt;p align="center">
&lt;img width="800" height="300" src="https://user-images.githubusercontent.com/84742324/126915614-ddf37d04-2973-4b8a-bb23-e086522b99bc.png">
&lt;/p>
&lt;p>After solving the problem with the BCD algorithm, it can be seen that the solution with the BCD resembles that of the true parameters solution.&lt;/p>
&lt;p align="center">
&lt;img width="600" height="300" src="https://user-images.githubusercontent.com/84742324/126915629-d2eb8ef4-77d6-4375-a404-6e3d1876e1bf.png">
&lt;/p>
&lt;h1 id="acceleration-techniques-tests--results">Acceleration Techniques: Tests &amp;amp; Results&lt;/h1>
&lt;p>Other mathematicians continue their work in these fields. Some of them introduced ideas on acceleration techniques to speed up the convergence rate of fixed point iteration problems. One of them is Donald G. Anderson, famous for his work on the Anderson Acceleration, also called Anderson mixing. In the tomographic imaging project, estimation of the geometry parameters can be viewed as a fixed point iteration technique. The research group used three fixed point acceleration schemes in their numerical experiments: 1) Irons-Tuck method, 2) Crossed - second method, 3) Anderson Acceleration. All these acceleration tests were performed and seemed to improve image resolution.&lt;/p>
&lt;p align="center">
&lt;img width="1000" height="500" src="https://user-images.githubusercontent.com/84742324/126915667-fbe60be2-9fa5-4fa1-a7fd-45e910d19ad2.png">
&lt;/p>
&lt;p>From tests performed, the acceleration techniques provided slightly better convergence, with the crossed secant method and Anderson Acceleration performing the best. The Irons-Tuck method converged much better in the angle parameters, but took much longer. The Irons-Tuck image seems to have the least background noise.&lt;/p>
&lt;p align="center">
&lt;img width="1000" height="300" src="https://user-images.githubusercontent.com/84742324/126915702-f55dcd15-4a71-4f4c-bbbd-480734a73394.png">
&lt;/p>
&lt;h2 id="poster-blitz-video">Poster Blitz Video&lt;/h2>
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/qdcGe9MKCoI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>&lt;/iframe>
&lt;h2 id="more-about-the-team">More About the Team&lt;/h2>
&lt;h3 id="mai-phuong-pham-huynh">Mai Phuong Pham Huynh&lt;/h3>
&lt;p>Mai is a rising junior at Emory University, majoring in Applied Mathematics and Statistics. Her research focus is on numerical analysis and scientific computing. In her free time, she enjoys listening to violin concertos, doing giant Jigsaw puzzles, and searching for vintage vinyl records from the 50s-90s.&lt;/p>
&lt;p align='center'>
&lt;img width=500px, height=auto src="img/IMG_6452.jpeg" class='center'>
&lt;/p>
&lt;h3 id="manuel-santana">Manuel Santana&lt;/h3>
&lt;p>Manuel is a rising senior at Utah State University. His research interests are in all areas of computational and applied math. When not doing math he enjoys European handball, pickleball, raquetball, and cooking with his wife Emily.&lt;/p>
&lt;p align='center'>
&lt;img width=500px, height=auto src="img/linkedInProfile.jpg" class='center'>
&lt;/p>
&lt;h3 id="ana-castillo">Ana Castillo&lt;/h3>
&lt;p>Ana Castillo is in her 10th year teaching. She is certified to teach Spanish and Mathematics grades 6-12 in the states of Texas, Tennessee and Illinois. She is working for Proximity Learning, a company that has allowed her to teach virtually in different school districts in the United States. She has been a participant of the Park City Mathematics Institute Teacher Leadership Program (PCMI TLP) and part of a team that runs a Math Teachers’ Circle in the Rio Grande Valley Area. In her spare time, she enjoys taking long walks, listening to classical music (Vivaldi), spending time with her pets (dogs &amp;amp; donkeys), cooking, reading, writing and traveling.&lt;/p>
&lt;p align="center">
&lt;img width="300" height="400" src="https://user-images.githubusercontent.com/84742324/127031174-4f5717a8-00ee-40df-b342-73f16f2f30c1.jpg">
&lt;/p></description></item><item><title>Low-Precision Algorithms for Image Processing</title><link>http://www.math.emory.edu/site/cmds-reuret/projects/2022-mixed-precision/</link><pubDate>Mon, 27 Jun 2022 11:36:49 -0400</pubDate><guid>http://www.math.emory.edu/site/cmds-reuret/projects/2022-mixed-precision/</guid><description>&lt;p>This post was written by &lt;a href="https://github.com/kristinagxy" target="_blank" rel="noopener">Xiaoyun Gong&lt;/a>, &lt;a href="https://github.com/RileyCYZ" target="_blank" rel="noopener">Yizhou Chen&lt;/a>, and &lt;a href="https://github.com/zoejix" target="_blank" rel="noopener">Xiang Ji&lt;/a> and published with minor edits. The team was advised by Dr. &lt;a href="https://github.com/jnagy1" target="_blank" rel="noopener">James Nagy&lt;/a>. In addition to this post, the team has also created slides for a &lt;a href="REUmidterm_presentation.pdf">midterm presentation&lt;/a>, a &lt;a href="https://www.dropbox.com/s/139l0u7zi6eloao/mixed-precision.mp4?dl=0" target="_blank" rel="noopener">poster blitz&lt;/a> video, &lt;a href="https://github.com/kristinagxy/REU_code" target="_blank" rel="noopener">code&lt;/a>, and a &lt;a href="">paper&lt;/a>.&lt;/p>
&lt;h2 id="in-one-sentence">In One Sentence:&lt;/h2>
&lt;p>Our group works on experimenting with iterative methods for solving inverse problems at different precision levels.&lt;/p>
&lt;h2 id="background-why-low-precision">Background: Why Low Precision?&lt;/h2>
&lt;p>What is the most important aspect for an excellent gaming experience? A lot of people would answer real-time! Everyone wants their games to be fast, and it is always a bummer that the screen freezes during a critical combat. This is why we are investigating low precision arithmetic: to decrease the computation time and speed things up.&lt;/p>
&lt;p>Nowadays, most computer systems operate on double precision (64-bit) arithmetic. However, if we decrease the number of bits for each number to 16 bits or even lower, the processing time can be much significantly reduced, although the benefit comes at the cost of a loss of accuracy.&lt;/p>
&lt;p align="center">
&lt;img src="img/IEEE.png" alt="drawing" width="500"/>
&lt;/p>
&lt;p>
&lt;em>Using tensor cores for mixed-precision scientific computing.
Oct-2021. url: https://developer.nvidia.com/blog/tensor-cores-mixed-precision-scientific-computing/
&lt;/em>
&lt;/p >
&lt;h2 id="simulating-low-precision">Simulating Low Precision&lt;/h2>
&lt;h3 id="matlab-function-chop">Matlab function chop&lt;/h3>
&lt;p>To simulate low precision arithmetic on our 64-bit computers, we have imported a MATLAB package called &lt;a href="https://www.mathworks.com/matlabcentral/fileexchange/70651-chop?s_tid=mwa_osa_a" target="_blank" rel="noopener">chop&lt;/a>. The toolbox allows us to explore single precision, half precision, and other customized formats. Each input needs to be transformed, but the real work comes from chopping each operation. The code below is a toy example of how to calculate $x + y \times z$ in half precision with chop.&lt;/p>
&lt;p align="center">
&lt;img src="img/chop_overview.png" alt="drawing" width="300"/>
&lt;/p>
&lt;h3 id="blocking">Blocking&lt;/h3>
&lt;p>When the number is being chopped from double precision to half precision, a lot of bits are dropped (from 64 bits to 16 bits). This would certainly cause a level of inaccuracy, so in order to reduce the errors, a method called blocking is used. Blocking is the same as breaking a large operation into smaller chunks, where each is computed independently and the result is then summed.&lt;/p>
&lt;p>We compute the inner product for each precision and block size for 20 times and calculate the average. The errors are calculated as the differences between the result of using the chopped version of inner product function and the built-in function in matlab.&lt;/p>
&lt;p align="center">
&lt;img src="img/blocksize.png" alt="draw" width="700"/>
&lt;/p>
On the left-hand side of the graph where the size of the vector is 1000, the errors of half precision are the largest because it has the least bits. If we take a closer look at only half precision, we get the graph on the right with different vector sizes. The errors decrease sharply when the blocking method is introduced. However, larger block sizes do not necessarily mean lower errors, as the graph suggested: the errors increase again as the block size keeps growing. That is because when the block size is large, it's the same as doing no blocking at all. For example, for a size-500 vector, once the block size reaches 500, it just means putting the whole vector into the first block, the same as when blocking is not introduced. Therefore, the line becomes flat from 500. We use 256 as our default block size in our codes because the matrix dimension is rather large in our problem.
&lt;h2 id="inverse-problems-and-iterative-methods">Inverse Problems and Iterative Methods&lt;/h2>
&lt;p>Inverse problems are problems where our goal is to find the internal or hidden information (inputs) from outside measurements (results). The internal data can be approximated by iterative methods, a repeating implementation of the same system of equations, with variables getting updated each round, hoping the value generated can be closer to the true value we desire each term.&lt;/p>
&lt;h3 id="conjugate-gradient-method">Conjugate Gradient Method&lt;/h3>
&lt;p>The &lt;a href="https://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf" target="_blank" rel="noopener">Conjugate Gradient algorithm&lt;/a> (CG) aims to solve the linear system Ax = b where A is SPD (symmetric and positive definite),transforming the problem of finding solution to an optimization problem where we want to minimize $\phi(x)=\frac{1}{2}x^{T}Ax-x^{T}b$. This can be easily seen from $\nabla \phi (x) = 0$ -&amp;gt; $Ax-b=0$.&lt;/p>
&lt;p>In each step, the method provides us with a search direction and a step-length so that the error of this iteration is A-orthogonal to the search direction of the previous iteration. Eventually, it will converge to the minimal point. The CGLS algorithm is the least-squares version of the CG method, applied to the normal equation A&lt;sup>T&lt;/sup>Ax = A&lt;sup>T&lt;/sup>b. However, CGLS requires computing inner products, which can overflow for large-scale problems in low precision.&lt;/p>
&lt;h3 id="chebyshev-semi-iterative-method">Chebyshev Semi-Iterative Method&lt;/h3>
&lt;p>The Chebyshev Semi-Iterative (CS) Method requires no inner product computation, which is great because inner products can cause overflow easily in low precision. But there is always the trade-off! The CS method requires the user to have an idea of the range of the matrix A&amp;rsquo;s eigenvalues. The result given by CS is a linear combination of all solutions in each iteration, and the weights are obtained from the Chebyshev polynomial, which has the favorable property to ensure that the result obtained in each iteration of CS is smaller than an upper bound.&lt;/p>
&lt;h2 id="experiment">Experiment&lt;/h2>
&lt;h3 id="ir-tools">IR Tools&lt;/h3>
&lt;p>We modify the CGLS method in the &lt;a href="https://github.com/jnagy1/IRtools.git" target="_blank" rel="noopener">IRtool&lt;/a> package in Matlab so that it can operate in lower precision, and we use two test problems in the same package to investigate how the method performs at lower precision, mainly half precision.&lt;/p>
&lt;h3 id="image-deblurring-using-cgls">Image Deblurring Using CGLS&lt;/h3>
&lt;p>First, we use our modified version of CGLS without regularization to solve the image deblurring problem. In this application, we solve Ax = b, where b is an observed blurred image, A is a matrix that models the blurring operation, and x is the desired clean image. We didn’t add any noise to b in the problem of Ax = b at the beginning, and the graphs are demonstrated below.&lt;/p>
&lt;p align="center">
&lt;img src="img/blur no noise.png" alt="draw" width="600"/>
&lt;/p>
&lt;p>We use our modified version of CGLS for single and half precision, and the graph in single precision is similar to the graph in double precision. However, for half precision, the background is not the same as that in the double-precision or single-precision graph; it contains more artifacts.&lt;/p>
&lt;p>We also plot the error norms of the solution at each iteration using different precision levels.&lt;/p>
&lt;p align="center">
&lt;img src="img/enrm blur no noise.png" alt="draw" width="600"/>
&lt;/p>
&lt;p>From the graph, all three error norms overlap from the beginning until around the 20th iteration, where the half-precision errors begin to deviate from those in single and double precision. The difference is due to the round-off errors of half precision, which add up and take over. Besides, the error norms for half precision terminates at the 28th iteration because overflow of inner products causes NaNs (Not a Number) to be computed during the iteration.&lt;/p>
&lt;p>After investigating the idealized situations where there is no noise in the observed image, we then apply our code to problems that contains additive random noise to see how it is likely to perform in real life. That is, we try to compute x from the observed image b = Ax + noise.&lt;/p>
&lt;p>For half precision, with 0.1% noise, the picture looks almost the same as the one that contains no noise. However, if the noise level is increased to 1%, the background has substantially more artifacts, while the middle object is still identifiable. Noise has taken over the black background but not the satellite yet. Eventually, the whole image is flushed with the noisy artifacts with 10% noise; the picture no longer contains any meaningful information. Notice that the results below are generated using x from the best iteration, that is the iteration with the smallest error norms, not from the last iteration.&lt;/p>
&lt;p align="center">
&lt;img src="img/Best cgls fp16 64 m noise.png" alt="draw" width="700"/>
&lt;/p>
&lt;p>Now we turn our attention to the error norm, the difference between the original image and the one our algorithm generates at each iteration. When 0.1% noise is added, as the number of iterations goes up, the error norm reduces significantly across all three formats. Intriguingly, for images with 1% or 10% noise, the best reconstruction is not the last iteration but somewhere along the middle (it’s around the 50th iteration for 1% and 10th for 10%). The reason behind the phenomenon is that while we are transforming the output image, b, the blended noise also gets inverted along each iteration. Eventually, the random data accumulate and dominate the solution at some point. We are showing the results where the error norm is the smallest to see what is the best possible solution we can compute. However, in reality the true x is not known, meaning we don&amp;rsquo;t know the error norms, so we can only show results from the last iteration, not from the best iteration.&lt;/p>
&lt;p align="center">
&lt;img src="img/3.png" alt="draw" width="700"/>
&lt;/p>
&lt;!--
### Tomography Reconstruction Using CGLS
Below is the result of CGLS on the tomography reconstruction test problem at different precision levels. For double and single precision, the reconstruction is doing well, yet for fp16, we start to get this completely blue picture from the first iteration caused by overflow of Inf/-Inf.
&lt;p align="center">
&lt;img src="img/tomo_plot.png" alt="draw" width="800"/>
&lt;/p>
Our solution to this issue is to rescale A and b by dividing both by 100. And we get the result below:
&lt;p align="center">
&lt;img src="img/tomo_rescale.png" alt="draw" width="300"/>
&lt;/p>
which is still blurry but at least the shape is visible :)
Then we add noise to the right-hand side b, and plot the error norms below:
&lt;p align="center">
&lt;img src="img/error_tomo.png" alt="draw" width="800"/>
&lt;/p>
As in the image deblurring problem, the error norms first decrease and then increase. In the cases with noise, this is mainly because noise starts to take over in the later part of the iteration. However, we still see the same behavior in the noise-free test problems at half precision, which is because the truncation errors accumulate as the iteration goes on.
-->
&lt;h3 id="image-deblurring-using-cs">Image Deblurring Using CS&lt;/h3>
&lt;p>In order to prevent the occurrence of overflow, we experiment with the CS algorithm (where no inner products are needed) and use chop for lower precision. Tikhonov regularization is applied to CS after we find out that the algorithm performs poorly due to the close-to-zero singular values of A when it&amp;rsquo;s ill-conditioned. Now we are solving:
$$\min_{x} {||Ax-b||_2^2+\lambda^2||x||_2^2}$$ where $\lambda$ is a parameter that needs to be chosen. Here we show experiments for the case with 10% noise, and we use $\lambda$ = 0.199.&lt;/p>
&lt;p>From the graph below, it is clear that even with 10% noise, the half-precision image looks very similar to that in double precision, better than what we have using CGLS (results from the last iteration).&lt;/p>
&lt;p align="center">
&lt;img src="img/cs_reg_0.1_blur.png" alt="draw" width="500"/>
&lt;/p>
For the image deblurring problem, we further comfirm the similarity by plotting the error norms.
&lt;p align="center">
&lt;img src="img/cs_reg_0.1_blur_Enrm.png" alt="draw" width="300"/>
&lt;/p>
We can see that the error norms of the three precision levels overlap, illustrating that the result in half precision is close to that in double precision.
&lt;!--
### Tomography Reconstruction Using CS
The result for the tomography reconstruction problem using CS is showed below.
&lt;p align="center">
&lt;img src="img/cs_reg_0.1_tomo.png" alt="draw" width="500"/>
&lt;/p>
Although there is no inner product in CS, we still have overflow in half precision, which is because the matrix A is too large. Therefore, we rescale A and b by diving both of by 100 again, and the algorithm successfully runs to the end without generating NaNs. The image in half precision is as good as its counterpart in double precision, displaying clear boundaries and backgrounds. The error norms also overlap among the three precision levels.
-->
&lt;h3 id="image-deblurring-using-cgls-with-regularization">Image Deblurring Using CGLS with regularization&lt;/h3>
&lt;p>To fairly compare CGLS and CS, we add Tikhonov regularization to CGLS and run the test problem again. The diagrams are listed below.&lt;/p>
&lt;p align="center">
&lt;img src="img/cg_reg_blur_64_0.1_m.png" alt="draw" width="500"/>
&lt;/p>
&lt;p align="center">
&lt;img src="img/cg_reg_m_0.1_blur_Enrm.png" alt="draw" width="300"/>
&lt;/p>
The diagram for half precision looks much better than that produced by CGLS without regularization. However, difference still presents between half and double precision in the background. At the end of the iteration for half precision, the error norms still increase again. If we zoom in the graph of the error norms for CS and CGLS with regularization, we can see that the error norms at half precision converge for CS but increases rapidly for CGLS, suggesting that for half precision, CS is a better choice, especially when the noise level is high. When the noise level is close to zero, CS becomes susceptible because of the accumulation of round-off errors. However, for double precision, the CGLS method with regularization is clearly more stable. Therefore, CGLS with regularization is more suitable for double precision.
&lt;p align="center">
&lt;img src="img/Zoom in of Enrm for cs and cg.png" alt="draw" width="500"/>
&lt;/p>
We performed similar experiments with an image reconstruction problem from tomography; see our paper for further details!
&lt;h2 id="more-about-us">More about us&lt;/h2>
&lt;h3 id="yizhou-chen">Yizhou Chen&lt;/h3>
&lt;p align="center">
&lt;img src="img/bioRiley.png" alt="draw" width="300"/>
&lt;/p>
Hi! My name is Yizhou, but I go by Riley as well. I'm a rising junior at Emory University, double majoring in Applied Math and Physics. My interest is in computational Math &amp; computational Physics. Outside work I enjoy watching sitcoms and my favourite one is Frasier! I am an animal person and I have a toy poodle who's nine years old. I also love cycling and hiking.
&lt;h3 id="xiaoyun-gong">Xiaoyun Gong&lt;/h3>
&lt;p align="center">
&lt;img src="img/gxy.jpeg" alt="drawing" width="300"/>
&lt;/p>
Hello I am Xiaoyun Gong. I am a rising senior majoring in Applied Mathematics and Statistics. I am interested in math and I also enjoy coding!! In my free time I like watching anime (most recent favorite is Made in Abyss) and drawing. I like sweet food and I am a cat person. 🐱
&lt;h3 id="xiang-ji">Xiang Ji&lt;/h3>
&lt;p align="center">
&lt;img src="img/Zoe_bio.png" alt="drawing" width="300"/>
&lt;/p>
Hi, I am Xiang Ji, but you can also call me Zoe. I am a rising junior at Emory University who is double majoring in applied mathematics and statistics and art history. My research interest is in computational mathematics and image processing. I enjoy going to art museums and watching movies. It's quite fun doing research this summer!</description></item><item><title>James Nagy</title><link>http://www.math.emory.edu/site/cmds-reuret/author/james-nagy/</link><pubDate>Mon, 27 Jun 2022 11:36:49 -0400</pubDate><guid>http://www.math.emory.edu/site/cmds-reuret/author/james-nagy/</guid><description>&lt;p>James G Nagy is a Samuel Candler Dobbs Professor and Chair of the Department of Mathematics at Emory University.&lt;/p></description></item></channel></rss>