# Compression Challenges in Large Scale Partial Differential Equation Solvers
## 5 Mass Storage
### Adjoint Solutions  
Adjoint, or dual, equations are important in PDE-constrained optimization problems, e.g., optimal control in electrophysiology [71] or inverse problems [72; 73], and goal-oriented error estimation [74]. Consider the abstract variational problem  
\[\text{find}\ x\in X\ \text{such that}\ c(x;\varphi)=0\ \forall\varphi\in\Phi, \tag{7}\]  
for a differentiable semilinear form \(c:X\times\Phi\to Z\) with suitable function spaces \(X,\Phi,Z\), and a quantity of interest given as a functional \(J:X\to\mathbb{R}\). During the numerical solution, Equation (7) is typically only fulfilled up to a nonzero residual \(r\), i.e., \(c(x;\varphi)=r\). Naturally the question arises, how does the residual \(r\) influence the quantity of interest \(J(x)\). For instationary PDEs, answering this question leads to solving an adjoint equation backwards-in-time. As the adjoint operator and/or right-hand sides depend on the solution \(x\), storage of the complete trajectory is needed, thus requiring techniques to reduce the enormous storage demand for large-scale, real-life applications. We note in passing, that, obviously, compression is not only useful for storage on disk, but can also be used in-memory, thus allowing more data to be kept in RAM and potentially avoiding disk access.  
Lossy compression for computing adjoints can be done using transform coding as discussed in Section 4.2. In addition to the spatial smoothness, correlations in time can be exploited for compression. Since the stored values are only accessed backwards in time, following the adjoint equation integration  
Figure 6: Comparison of quantization errors, i.e., error in the reconstructed solution yielding the same \(H^{-1}\) error norm. Left: hierarchical basis. Right: wavelets. Using the \(H^{-1}\) norm to measure the error allows larger pointwise absolute reconstruction errors compared to the \(L^{\infty}\) error metric, thus higher compression factors.  
direction, it is sufficient to store the state at the final time and its differences between successive time steps. This predictive coding with a constant state model, also known as delta encoding, can be efficiently implemented, requiring only to keep one additional time step in memory. Linear or higher order models can be used for prediction in time as well, but already the most simple delta encoding can significantly increase--in some cases double--the compression factor at very small computational cost. For more details and numerical examples we refer to [21; 34].  
Before presenting examples using lossy compression for PDE-constrained optimization and goal-oriented error estimation, let us briefly mention so-called checkpointing methods for data reduction in adjoint computations, first introduced by [PERSON] and [PERSON] [75], and [PERSON] [76]. Instead of keeping track of the whole forward trajectory, only the solution at some intermediate timestep is stored. During the integration of the adjoint equation, the required states are re-computed, starting from the snapshots, see, e.g., [77] for details. This increases the computational cost for typical settings (compression factors around 20) by two to four additional solves of the primal PDE. Moreover, due to multiple read- and write-accesses of checkpoints during the re-computations for the adjoint equation, the reduction in memory _bandwidth_ requirements is significantly smaller. We refer the reader to [34] for a more detailed discussion and additional references.