--- title: "Scientific Data Science" center: true theme: black transition: slide margin: 0.04 revealOptions: transition: 'slide' css: - css/custom.css --- # Scientific Data Science #### An Emerging Symbiosis Sam Foreman May, 2022 ::: block [](https://github.com/saforem2) [](https://samforeman.me) [](https://twitter.com/saforem2) ::: --- # Outline 1. [Issues with current scientific workflows](#Science%20Workflows) - [How ML can help](#Possibilities) 2. [Current Workflows](#Current%20Workflows) 3. [Advanced Workflows](#Advanced%20Workflows) - [MLOps](#MLOps), [Distributed Training](#Distributed%20Training), etc. 4. [Illustrative Example](#Identifying%20Phase%20Transitions%201%20https%20doi%20org%2010%201038%20nphys4035) - [Current Research / Future Plans](#Anomalous%20Magnetic%20Moment%20of%20the%20Muon) --- # Science Workflows ::: block - Increasingly dependent on computing and data analysis / statistics - **Issues**: - Science research is manually guided - This is slow! - Depends on good ideas and large effort - Publications are static - Not all research code is public - Reproducibility? - Not always clear how to proceed - Error prone and labor-intensive ::: ![](assets/science-workflow.svg) --- # šŸ¤” Current Issues - Research publications are static - Mistakes are inevitable - Reproducibility issues are common - Versioning - Which code version made which reports? - Jupyter Notebooks - Better - Still must be manually ran, cell by cell - Useful as a "playground" for: - testing ideas, - debugging code - making / fine-tuning plots - Can we do better? note: - FAIR - v1, v2.4, ..., v3-final-1, ... - Prone to human error - Dependencies evolve and become incompatible - Depends on users making - May not reflect most up-to-date changes --- # Possibilities - Better data $\longrightarrow$ better science - Dynamic resource management - Specialized hardware - AI Accelerators - **Use ML to guide experiments** - Real-time data analysis - Predictive modeling - Advanced simulations - Heterogeneous architectures - Specialized hardware - AI Testbeds note: - Good idea - Seems promising - ML Still difficult - Barrier for entry - Difficulty getting started - Hard to ensure results - No working theory - Error prone - Unpredictable --- # ML Workflow ![](assets/frontend-workflow.svg) ::: block **Idea**: Automate this as much as possible and remove aspects prone to human error ::: note: --- # Current Workflows - Try new architecture, play with hyperparameters, repeat - Largely still manually guided - ML Engineering - Large "research institutes" - DeepMind, FAIR / Meta, Nvidia, etc - Hard to compete - Access to large scale systems - Iterative refinement of huge models - Operate in parallel over grad students / postdocs ![](assets/deepmind-workflow.svg) --- # Advanced Workflows - Real-time data analysis - Used to guide / plan future experiments - Dynamic allocation of resources - Improved efficiency, less time spent idle - **More science per watts** [`[1]`](https://publications.anl.gov/anlpubs/2009/12/65724.pdf) - Possible solutions? - Scaling up - New parallelism techniques? - Hyperparameter optimization, [DeepHyper](https://deephyper.org) - ML Ops tools / libraries - šŸ¤— [huggingface](https://huggingface.co) - [Weights & Biases]((https://wandb.ai) - [openai](https://openai.com) 1. [Argonne Leadership Computing Facility ā€¢ 2008 annual report](https://publications.anl.gov/anlpubs/2009/12/65724.pdf) note: APS Upgrade Physics + ML - Geometric Deep Learning - Heavily influenced by symmetry considerations - should be amenable to goemetric analysis - Relatively easy to prototype / try new models - esp on toy problems - Typically the refinement stage is most involved --- ::: block > Polaris is well equipped to help move the ALCF into the exascale era of computational science by accelerating the application of AI capabilities to the growing data and simulation demands of our users. **Polaris will also provide a broader opportunity to help prototype and test the integration of HPC with _real-time experiments and sensor networks_.** > > ā€” Michael E. Papka, ALCF director [`[1]`](https://www.alcf.anl.gov/news/argonne-national-laboratory-and-hewlett-packard-enterprise-prepare-exascale-era-new-testbed) ::: ::: block 1. [Argonne National Laboratory and Hewlett Packard Enterprise prepare for exascale era with new testbed supercomputer Argonne Leadership Computing Facility](https://www.alcf.anl.gov/news/argonne-national-laboratory-and-hewlett-packard-enterprise-prepare-exascale-era-new-testbed) ::: --- # Alternatives? - Dynamic reports: - Grow and change over time (**alive**) - Present results **with context** seamlessly - Central hub for team - Arbitrarily customizable - Live-updating - Having dynamic "reports" that can grow and change - Experiment tracking - [TensorBoard](https://tensorboard.org) - [Weights and Biases](https://wandb.ai) - [Neptune](https://neptune.ai/product) - [Comet](https://www.comet.ml/site/data-scientists/) note: - Empirical DL research + Scientific Research could be more effective with reports that are alive & with researchers adding to it - Make sense of the countless recipes researchers have and move towards systematizing these ideas - For DataScience team @ ALCF: - Centralized hub for: - Storing and versioning models from multiple projects - displaying real-time machine performance - Share ideas / models with team - Borrowing / fine tuning --- # šŸ“Š ML Ops **Goal**: Allow researchers to focus on their science / model development without all the boilerplate. --- ### MLOps --- --- ### Distributed Training ![](assets/avgGrads.svg) --- # Distributed Training ![](assets/data-parallel.svg) ![](assets/model-parallel.svg) --- # Ongoing work --- # Standard Model - Electricity & Magnetism, Strong and Weak Interactions, elementary particles - (Lattice) QCD: - Theory of the **strong** interactions between quarks and gluons - āŒ Analytically intractable - āœ… Discretize space-time onto lattice ![](assets/nucleus.svg) ![](assets/feynman.svg) note: 1. Background / Interesting Work - Why its interesting? - What I've learned - What aspects are relevant outside of domain expertise 2. Ongoing Work - Lattice QCD - Common history with HPC - Mutually beneficial 3. Plans for future research ---
::: block #### Anomalous Magnetic Moment of the Muon[^quanta] ::: $$a_{\mu} = \frac{(g_{\mu} - 2)}{2}$$ #### New physics? ::: block [ā€˜Last Hopeā€™ Experiment Finds Evidence for Unknown Particles Quanta Magazine](https://www.quantamagazine.org/last-hope-experiment-finds-evidence-for-unknown-particles-20210407/) :::
note: muon g-2 --- ### Muon $g-2$ from Lattice QCD - From BNL [`[1]`](https://arxiv.org/abs/2002.12347): ::: block $$a_{\mu}^{\mathrm{exp}} = 11659209.1(5.4)(3.3)\times 10^{-10}$$ ::: - Hunt for Beyond Standard Model (BSM) physics - Upcoming experiments at Fermilab and JPARC aim to reduce uncertainty by factor of four ::: block 1. Leading hadronic contribution to the muon magnetic moment from lattice QCD [arXiv:2002.12347](https://arxiv.org/abs/2002.12347) ::: note: - Lattice QCD historically has been in lock-step with developments in HPC --- # Contributions - Calculate using first principles from Lattice QCD (LQCD) - LQCD _may_ be able to resolve the current tension between the standard models' experiments and predictions ![](./assets/feynman.svg) ::: block **One Photon Correction** $\mu$ emits and reabsorbs a virtual photon (largest effect) ::: ::: block **Hadronic Vacuum Polarization** Virtual photon splits into (anti)-hadron pair (quarks, hard to calculate) ::: note: - Hadronic Vacuum Polarization (HVP) Contribution - The blobs (quark loops) represent all possible intermediate hadronic states ($\rho$, $\pi\pi$, $\ldots$) - Not calculable in perturbation theory - Can be calculated from: - First principles using **lattice QCD** $$a_{\mu}(\mathrm{HVP}) = \left(\frac{\alpha}{\pi}\right)^{2}\int_{0}^{\infty} dq^{2}\, f(q^{2}) \hat{\Pi}(q^{2})$$ --- ## Lattice QCD ::: block 1. **Gauge Field Generation**: Use Markov Chain Monte Carlo (MCMC) methods for sampling _independent_ gauge field (gluon) configurations. ::: 2. **Propagator calculations**: Compute how quarks propagate in these fields (_quark propagators_) 3. **Contractions**: Method for combining quark propagators into correlation functions and observables. note: - Calculations in LatticeQCD proceed in 3 steps: - Non-perturbative approach to solving the QCD theory of the strong interaction between quarks and gluons. --- # More statistics! - Lattice QCD _may_ help resolve this tension - Currently limited by computing power - New algorithms + ML seem promising... - See [`[1]`](https://arxiv.org/abs/2202.05838) for a broad overview of prospects 1. [Applications of Machine Learning to Lattice Quantum Field Theory arXiv:2202.05838](https://arxiv.org/abs/2202.05838) note: - LQCD may help resolve the existing tension between the standard model predictions and experiments - For many key applications the necessary LQCD calculations are limited by available computing resources --- # BMW Collaboration ![](assets/bmw_supercomputer.jpg) ::: block 2. The JUWELS supercomputer at the JĆ¼lich Research Center in Germany, used to calculate the anomalous magnetic moment of the muon ::: --- ## LQCD @ ALCF (2008) > The **Blue Gene/P** at the ALCF has tremendously accelerated the generation of the gauge configurationsā€”in many cases, by a factor of 5 to 10 over what has been possible with other machines. > Significant progress has been made in simulations with two different implementations of the quarksā€”domain wall and staggered. [`[1]`](https://publications.anl.gov/anlpubs/2009/12/65724.pdf) 1. [Argonne Leadership Computing Facility ā€¢ 2008 annual report](https://publications.anl.gov/anlpubs/2009/12/65724.pdf) --- # `l2hmc-qcd` ::: block pyTorch hydra tensorflow
arxiv arxiv
l2hmc-qcd codefactor
hits
::: --- #### Markov Chain Monte Carlo (MCMC) $$x \sim \mathcal{N}(0, \mathbb{1})$$ ![](assets/samples/mh1d.svg) --- **Markov Chain Monte Carlo** (MCMC)
[`[slide w/ src]`](#Metropolis-Hastings%20in%20Python) ![](./assets/samples/samples-100.svg) ![](./assets/samples/samples-1000.svg)
![](./assets/samples/samples-10000.svg) ![](./assets/samples/samples-1e06.svg)
--- ### Hamiltonian Monte Carlo (HMC) $$\begin{align} \dot{x} &= +\partial_{v} H\\\\ \dot{v} &= - \partial_{x} H \end{align}$$ ![](assets/hmc1.svg) --- ### HMC [](https://chi-feng.github.io/mcmc-demo/app.html) --- --- #### Integrated Autocorrelation time: $\textcolor{#FF2052}{\tau_{\mathrm{int}}}$ We can measure the performance by comparing $\tau_{\mathrm{int}}^{Q}$ for the **trained model** to **HMC**. ::: block **Note**: Lower is better ::: ![|650](./assets/autocorr_new.svg) ![charge_histories](./assets/charge_histories.svg) --- ### Integrated Autocorrelation Time ![](./assets/tint1.svg) ::: block Comparison of $\tau_{\mathrm{int}}^{Q}$ for **trained models** vs **HMC** with different trajectory lengths, $N_{\mathrm{LF}}$, at $\beta = 4, 5, 6, 7$ ::: --- # Interpretation ![](assets/ridgeplots.svg) ::: block Deviation in $x_{P}$ Topological charge mixing Artificial influx of energy ::: Illustration of how different observables evolve over a single L2HMC trajectory. --- # `l2hmc-qcd` arxiv arxiv arxiv - Source code publicly available - Both `pytorch` and `tensorflow` implementations with support for distributed training, automatic checkpointing, etc. - Generic interface, easily extensible - Work in progress scaling up to 2D, 4D $SU(3)$ --- # References [^melko]: Carrasquilla, J., Melko, R. [Machine learning phases of matter](https://doi.org/10.1038/nphys4035). _Nature Phys_ **13,** 431ā€“434 (2017). [^alcf]: [Argonne National Laboratory and Hewlett Packard Enterprise prepare for exascale era with new testbed supercomputer Argonne Leadership Computing Facility](https://www.alcf.anl.gov/news/argonne-national-laboratory-and-hewlett-packard-enterprise-prepare-exascale-era-new-testbed) [^quanta]: [ā€˜Last Hopeā€™ Experiment Finds Evidence for Unknown Particles Quanta Magazine](https://www.quantamagazine.org/last-hope-experiment-finds-evidence-for-unknown-particles-20210407/) [^hmc]: https://chi-feng.github.io/mcmc-demo/app.html --- # Thank you! Feel free to reach out! [foremans@anl.gov](mailto:///foremans@anl.gov) ::: block [](https://github.com/saforem2) [](https://github.com/saforem2) [](https://samforeman.me) [](https://twitter.com/saforem2) ::: --- # BACKUPS --- # Metropolis-Hastings in Python ```python import numpy as np def prob(x: float) -> float: denom = np.sqrt(2 * np.pi ** 2) return np.exp(-0.5 * (x ** 2)) / denom def metropolis_hastings(steps: int = 1000): x = 0. # initialize config samples = np.zeros(steps) for n in range(steps): xp = x + np.random.randn() # generate proposal if np.random.rand() < (prob(xp) / prob(x)): x = xp # accept if xp more likely samples[i] = x # collect our samples return samples ``` ### $1\times10^{6}$ samples in $< 4s$! ```python >>> %timeit metropolis_hastings(int(1e6)) 3.85 s Ā± 173 ms per loop (mean Ā± std. dev. of 7 runs, 1 loop each) ``` --- # Motivation - For independent samples: $$\langle \mathcal{O}\rangle \propto\int\left[\mathcal{D}x\right]\mathcal{O}(x)e^{-S(x)} \simeq\frac{1}{N}\sum_{n=1}^{N}\mathcal{O}(x_{n})$$ $$\Rightarrow \sigma^{2}=\frac{1}{N}\text{Var}\left[\mathcal{O}(x\right)]$$ - Accounting for autocorrelations: $$\sigma^{2}=\frac{\textcolor{#0091ea}{\tau_{\mathrm{int}}^{\mathcal{O}}}}{N}\text{Var}\left[\mathcal{O}(x)\right]$$ - $\tau_{\mathrm{int}}^{\mathcal{O}}$ is known to scale exponentially as we approach physical lattice spacing. --- ## Algorithm 1. `input`: $\textcolor{#AE81FF}{x}$ 2. Resample $\textcolor{#FD971F}{\mathbf{v}} \sim \mathcal{N}(0, \mathbb{1})$ 3. construct $\textcolor{#FF5252}{\xi} = (\textcolor{#AE81FF}{x}, \textcolor{#FD971F}{\mathbf{v}})$ 4. Generate proposal $\xi^{\ast}$ by passing initial $\xi$ through $N_{\mathrm{LF}}$ **leapfrog layers**: ::: block $\textcolor{#FF5252}{\xi}\hspace{1pt}\xrightarrow[\mathrm{LFL}]{}\xi_{1} \longrightarrow\cdots \longrightarrow \xi_{N_{\mathrm{LF}}} = \textcolor{#0091ea}{\xi^{\ast}}$ ::: 3. Compute the **Metropolis-Hastings** (MH) acceptance (with Jacobian $\mathcal{J}$) ::: block $A(\textcolor{#0091ea}{\xi^{\ast}}|\textcolor{#ff5252}{\xi})=\mathrm{min}\left[1, \frac{p(\textcolor{#0091ea}{\xi^{\ast}})}{p(\textcolor{#ff5252}{\xi})}\mathcal{J}\left(\textcolor{#0091ea}{\xi^{\ast}},\textcolor{#ff5252}{\xi}\right)\right]$ ::: 4. `if training`: 1. Evaluate the **loss function** $\mathcal{L}\gets \mathcal{L}_{\theta}(\textcolor{#ff5252}{\xi^{\ast}}, \textcolor{#ff5252}{\xi})$ and backprop 2. Evaluate MH criteria and assign the next state in the chain by ::: block $\mathbf{x}_{i+1}\gets \begin{cases} \textcolor{#0091ea}{\mathbf{x}^{\ast}} \small{\text{ w/ prob }} A(\textcolor{#ff5252}{\xi^{\ast}}|\textcolor{#0091ea}{\xi}) \hspace{26pt}āœ… \\\\ \textcolor{#ff5252}{\mathbf{x}} \hspace{14px}\small{\text{ w/ prob }} 1 - A(\textcolor{#ff5252}{\xi^{\ast}}|\textcolor{#0091ea}{\xi}) \hspace{11pt}āŒ \end{cases}$ ::: --- ### Lattice Gauge Theory
##### Link variables $U_{\mu}(x) = e^{i x_{\mu}(n)}\in U(1)$,
with `\(x_{\mu}(n)\in[-\pi,\pi]\)`

##### Wilson Action `\(S_{\beta}(x) = \beta\sum_{P} 1 - \cos \textcolor{#0091Ea}{x_{P}}\)` `\(x_{P}= x_{\mu}(n) + x_{\nu}(n+\hat{\mu})-x_{\mu}(n+\hat{\nu})-x_{\nu}(n)\)`
![|700](assets/plaq.drawio.svg) ::: block
Topological Charge
**Continuous:** $Q_{\mathbb{R}} = \frac{1}{2\pi}\sum_{P} \sin x_{P}\in\mathbb{R}$ $\hspace{10pt}$ **Discrete:** $Q_{\mathbb{Z}} = \frac{1}{2\pi}\sum_{P} \left\lfloor x_{P}\right\rfloor\hspace{18px}\in\mathbb{Z}$ $\hspace{45pt}$ with $\left\lfloor x_{P}\right\rfloor = x_{P}-2\pi\left\lfloor\frac{x_{P}+\pi}{2\pi}\right\rfloor$ ::: --- # Networks - Stack gauge links as `x.shape = [Nb, 2, Nt, Nx, 2]` ::: block $$x_{\mu}(n) \gets \left[\cos(x), \sin(x)\right]$$ ::: - $x$ network: - $\Lambda^{\pm}$ $(x, v) \rightarrow \left[S_{x}, T_{x}, Q_{x}\right]$ - $S_{v}, T_{v}, Q_{v}$ used to update $v$ L2HMC update - $v$ network: - $\Gamma^{\pm}$ $(x, \partial_{x}U) \rightarrow \left[S_{v}, T_{v}, Q_{v}\right]$ - $S_{x}, T_{x}, Q_{x}$ used to update $x$ L2HMC update --- # $x$ Networks $\textcolor{#42A5F5}{\Lambda^{\pm}}$: ::: block `input`: $(\textcolor{#42A5F5}{x}, \textcolor{#FD971F}{v})$ ::: ::: block $$\begin{align} h_{1} &= \sigma\left(W_{x}\, \textcolor{#42A5F5}{x} + W_{v}\, \textcolor{#FD971F}{v} + b\right) \\\\ h_{2} &= \sigma\left(W_{1} h_{1} + b_{1}\right) \\\\ \quad\vdots& \\\\ h_{n} &= \sigma\left(W_{n} h_{n} + b_{n}\right) \\\\ \textcolor{#00CF53}{S_{x}} &= \textcolor{#ff5252}{\lambda_{S}}\tanh\left(W_{S} h_{n} + b_{S} \right) \\\\ \textcolor{#00CF53}{Q_{x}} &= \textcolor{#ff5252}{\lambda_{Q}}\tanh\left(W_{Q} h_{n} + b_{Q} \right) \\\\ \textcolor{#00CF53}{T_{x}} &= W_{T} h_{n} + b_{T} \end{align}$$ ::: ::: block `output`: $\textcolor{#00CF53}{S_{x}, T_{x}, Q_{x}}$ ::: **Note**: $\textcolor{#ff5252}{\lambda_{S}}$, $\textcolor{#ff5252}{\lambda_{Q}}$ are trainable parameters --- ## Loss Function ::: block - Maximize the _expected squared charge difference_: ::: block $$\mathcal{L}(\theta) = \textcolor{#228BE6}{\mathbb{E}_{p(\xi)}}\left[-\textcolor{#FA5252}{{\delta Q}}^{2}_{\textcolor{#FA5252}{\mathbb{R}}}(\xi', \xi)\cdot A(\xi'|\xi)\right]$$ ::: - $\textcolor{#FA5252}{\delta Q_{\mathbb{R}}}$ is the tunneling rate ::: block $$\textcolor{#FA5252}{\delta Q_{\mathbb{R}}}(\xi',\xi)=\left|Q_{\mathbb{R}}(x') - Q_{\mathbb{R}}(x)\right|$$ ::: - $A(\xi'|\xi)$ is probability of accepting the proposal $\xi'$. ::: block $$A(\xi'|\xi) = \min\left(1, \frac{p(\xi')}{p(\xi)}\left|\frac{\partial \xi'}{\partial \xi^{T}}\right|\right)$$ ::: ::: --- # Interpretation ![](assets/Hf_ridgeplot.svg) --- # Interpretation ![](./assets/plaqsf_ridgeplot.svg) --- ## Plaquette analysis: $x_{P}$ ![](assets/plaqsf_vs_lf_step1.svg) --- #### Identifying Phase Transitions [`[1]`](https://doi.org/10.1038/nphys4035) ![](assets/ising/configs.svg) ![](assets/ising/network-dropout.svg) 1. Carrasquilla, J., Melko, R. [Machine learning phases of matter](https://doi.org/10.1038/nphys4035). _Nature Phys_ **13,** 431ā€“434 (2017). --- ### Identifying Phase Transitions[^melko] ![](assets/ising/summary.svg) --- ### Identifying Phase Transitions[^melko] ![](assets/classification-net.jpg) --- ### Identifying Phase Transitions[^melko] ![](assets/ising/pca.svg) --- ### Renormalizing Images [`[1]`](https://arxiv.org/abs/1807.10250), [`[2]`](https://arxiv.org/abs/1410.3831) ![](assets/cifar10/frog.svg) ![](assets/cifar10/frog-gray.svg) ![](assets/cifar10/frog-025.svg) ![](assets/cifar10/frog-005.svg) ![](assets/cifar10/frog-075.svg) 1. Foreman, S., Giedt, J., Meurice, Y., & Unmuth-Yockey, J. (2018). Examples of renormalization group transformations for image sets. _Physical Review E_, _98_(5), 052129.Foreman, S., Giedt, J., Meurice, Y., & Unmuth-Yockey, J. (2018). Examples of renormalization group transformations for image sets. Physical Review E, 98(5), 052129. [`arXiv:1807.10250`](https://arxiv.org/abs/1807.10250) 2. Mehta, P., & Schwab, D.J. (2014). An exact mapping between the Variational Renormalization Group and Deep Learning. [`arXiv:1410.3831`](https://arxiv.org/abs/1410.3831) note: Hinton's "deep belief networks" works, in a particular case, exactly like the renormalization group and seems to be closely related to the "information bottleneck" --- # Tensor Networks ![](assets/renormalization/tm1.svg) ![](assets/renormalization/nb-insert.svg) --- ### `l2hmc`: LeapfrogLayer ![](assets/leapfrog-layer-excalidraw.svg) ![750](assets/update_steps.svg) ![](assets/network_functions.svg) --- ## Algorithm 1. `input:` $x$ (lattice configuration) 2. $v\sim\mathcal{N}(0, \mathbb{1})$ 3. $(x'',v'') \gets \texttt{TransitionKernel}(x, v)$: 1. $v' = \textcolor{#ff5252}{\Gamma^{\pm}}\left[x, \partial_{x}U\right]$ 2. Update $x$ in two parts: $$\begin{align} x' &= m_{A}\odot x + m_{B}\odot\textcolor{#0091ea}{\Lambda^{\pm}}\left[x, v'\right]\\\\ x'' &= m_{B}\odot x' + m_{A}\odot \textcolor{#0091ea}{\Lambda^{\pm}}\left[x', v'\right] \end{align}$$ 3. $v'' = \textcolor{#ff5252}{\Gamma^{\pm}}\left[x'', \partial_{x}U''\right]$ --- # Detail ::: block 1. **Update** $v$: $$v' = v \cdot \exp\left[\varepsilon \textcolor{#ff5252}{S_{v}}\left(x, \partial_{x}U\right)\right] - \frac{\varepsilon}{2} \bigg[\partial_{x} U\cdot \exp\left[\varepsilon \textcolor{#ff5252}{Q_{v}}\left(x, \partial_{x}U\right)\right] + \textcolor{#ff5252}{T_{v}}\left(x, \partial_{x}U\right)\bigg]$$ 2. **Update** $x$ (in two parts): Update first half of $x$: $$x' = x_{A} + \bigg\{x_{B}\cdot\exp\left[\varepsilon \textcolor{#00CCFF}{S_{x}}(x_{B}, v')\right] + \varepsilon\cdot\big[v'\cdot \exp\left[\varepsilon \textcolor{#00CCFF}{Q_{x}}\left(x_{B}, v'\right)\right] + \textcolor{#00CCFF}{T_{x}}\left(x_{B}, v'\right)\big]\bigg\}$$ Update second half of $x$: $$x'' = x'_{B} + \bigg\{x'_{A}\cdot\exp\left[\varepsilon \textcolor{#00CCFF}{S_{x}}(x'_{A}, v')\right] + \varepsilon\cdot\big[v'\cdot \exp\left[\varepsilon \textcolor{#00CCFF}{Q_{x}}\left(x'_{A}, v'\right)\right] + \textcolor{#00CCFF}{T_{x}}\left(x'_{A}, v'\right)\big]\bigg\}$$ 3. **Update** $v$: $$v'' = v' \cdot \exp\left[\varepsilon \textcolor{#ff5252}{S_{v}}\left(x'', \partial_{x}U\right)\right] - \frac{\varepsilon}{2} \bigg[\partial_{x} U\cdot \exp\left[\varepsilon \textcolor{#ff5252}{Q_{v}}\left(x'', \partial_{x}U''\right)\right] + \textcolor{#ff5252}{T_{v}}\left(x'', \partial_{x}U''\right)\bigg]$$ ::: --- # Gauge Equivariance ::: block - Transform untraced plaquettes (matrix valued) $P'_{\mu\nu}(x)\gets P_{\mu\nu}(x)$ ::: block $$P_{\mu\nu}(x) \equiv U_{\mu}(x)\,U_{\nu}(x+\hat{\mu})\,U^{\dagger}(x+\hat{\nu})\,U^{\dagger}(x)$$ ::: - Change back to links and update gauge configuration ::: block $$U'_{\mu}(x) = P'_{\mu\nu}(x)P^{\dagger}_{\mu\nu}(x)U_{\mu}(x)$$ ::: --- ## Topological Charge $Q$ **Field Theoretic Definition**: $$Q = \int d^{4}x q(x)$$ where $$q(x) = \frac{1}{32\pi^{2}} \varepsilon_{\mu\nu\rho\sigma} \mathrm{Tr}\left[F_{\mu\nu} F_{\rho\sigma}\right]$$ --- # Topological Charge ::: block - Discretize $Q$ on the lattice as ::: block $$ Q = a^{4} \sum_{x} q_{L}(x) $$ ::: - Discretize $q_{L}$ using $C_{\mu\nu}^{\mathrm{plaq}}(x)$ ::: block $$ q_{L}^{\mathrm{plaq}} = \frac{1}{32\pi^{2}} \varepsilon_{\mu\nu\rho\sigma}\mathrm{Tr}\left(C_{\mu\nu}^{\mathrm{plaq}} C_{\rho\sigma}^{\mathrm{plaq}}\right) $$ ::: - Where $C_{\mu\nu}^{\mathrm{plaq}}(x)$ is the imaginary part of the plaquette: ::: ![](./assets/qplaq.svg) --- #### Center for Complex Systems Research @ UIUC ::: block - [Alfred HĆ¼bler](https://en.wikipedia.org/wiki/Alfred_H%C3%BCbler) [`[1]`](https://nosh.northwestern.edu/conferences/schedule.pdf) - Neural nets in 2006! [`[2]`](https://meetings.aps.org/Meeting/MAR06/Event/42791) - Energy conversion, storage - Resulted in a publication [`[3]`](https://doi.org/10.1063/1.5009698) - And a patent! [`[4]`](https://experts.illinois.edu/en/publications/energy-storage-in-quantum-resonators) ::: ::: block 1. [Understanding Complex Systems Workshop 2004](https://nosh.northwestern.edu/conferences/schedule.pdf) 2. [2006 APS March Meeting - Scaling Properties of Topological Neural Nets](https://meetings.aps.org/Meeting/MAR06/Event/42791) 3. A. Hubler, **S. Foreman**, J. Liu, & L. Wortsmann Large Energy Density in Three-Plate Nanocapacitors due to Coulomb Blockade J. Appl. Phys, 2018 4. Liu, Jiaqi; Hubler, Alfred W; **Foreman, Samuel A**; Ott, Katharina. [**Energy storage in quantum resonators**](https://experts.illinois.edu/en/publications/energy-storage-in-quantum-resonators) U.S. Patent No.: _9741492_. Aug 22, 2017. ::: note: - Heavily influenced my trajectory --- ## [](https://www.github.com/quda/quda) QUDA [![DOI](https://zenodo.org/badge/1300564.svg)](https://zenodo.org/badge/latestdoi/1300564) Multi-GPU Support[`[1]`](https//arxiv.org/1109.2935/abs), with: - adaptive multigrid[`[2]`](https//arxiv.org/abs/2104.05615) - block CG[`[3]`](https://arxiv.org/abs/1710.09745) - the Mƶbius MSPCG solver[`[4]`](https://arxiv.org/1612.07873) 1. R. Babich, M. A. Clark, B. Joo, G. Shi, R. C. Brower, and S. Gottlieb, "Scaling lattice QCD beyond 100 GPUs," International Conference for High Performance Computing, Networking, Storage and Analysis (SC), 2011 [arXiv:1109.2935[hep-lat]](https://arxiv.org/1109.2935/abs). 2. Jiqun Tu, M. A. Clark, Chulwoo Jung, Robert Mawhinney, "Solving DWF Dirac Equation Using Multi-splitting Preconditioned Conjugate Gradient with Tensor Cores on NVIDIA GPUs," published in the Platform of Advanced Scientific Computing (PASC21) [arXiv:2104.05615[hep-lat]](https://arxiv.org/abs/2104.05615). 3. M. A. Clark, A. Strelchenko, A. Vaquero, M. Wagner, and E. Weinberg, "Pushing Memory Bandwidth Limitations Through Efficient Implementations of Block-Krylov Space Solvers on GPUs," Comput. Phys. Commun. 233 (2018), 29-40 [arXiv:1710.09745 [hep-lat]](https://arxiv.org/abs/1710.09745). 4. M. A. Clark, B. Joo, A. Strelchenko, M. Cheng, A. Gambhir, and R. Brower, "Accelerating Lattice QCD Multigrid on GPUs Using Fine-Grained Parallelization," International Conference for High Performance Computing, Networking, Storage and Analysis (SC), 2016 [arXiv:1612.07873 [hep-lat]](https://arxiv.org/1612.07873). 5. M. A. Clark, R. Babich, K. Barros, R. Brower, and C. Rebbi, "Solving Lattice QCD systems of equations using mixed precision solvers on GPUs," Comput. Phys. Commun. 181, 1517 (2010) [arXiv:0911.3191 [hep-lat]](https://arxiv.org/abs/0911.3191). --- ::: block ### $SU(3)$: Plaquettes ::: ![](./assets/plaquetteUxy.svg) ![](./assets/plaquetteUtx.svg) --- ## Non-Compact Projection[^1] Project $x \in[-\pi, \pi]$ onto $\mathbb{R}$ using a transformation $z = g(x)$: $$z = \tan\left(\frac{x}{2}\right) $$ Perform the update in $\mathbb{R}$: $$ z' = m^{t}\odot z + \bar{m}^{t}\odot \left[\alpha z + \beta\right]$$ Project back to $[-\pi, \pi]$ using $x = g^{-1}(z)$: $$ x = 2 \tan^{-1}(z) $$ [^1]: [arXiv:2002.02428](https://arxiv.org/abs/2002.02428) --- ## Non-Compact Projection [arXiv:2002.02428](https://arxiv.org/abs/2002.02428) Combine into a single update: $$x' = \textcolor{#228BE6}{m^{t}}\odot x + \textcolor{#FA5252}{\bar{m}^{t}}\odot\left[2\tan^{-1}\left(\alpha\tan\left(\frac{x}{2}\right)\right)+\beta\right]$$ With corresponding Jacobian: $$ \frac{\partial x'}{\partial x} = \frac{\exp(\varepsilon s_{x})}{\cos^{2}(x/2)+exp(2\varepsilon s_{x})\sin(x/2)} $$ --- ### HMC: Leapfrog Integrator - Hamiltonian: $H(x, v) = S(x) + \frac{1}{2} v^{2}$ - Target distribution: $\textcolor{#42a5f5}{p(x)\propto e^{-S(x)}}$, $p(v)$ $\propto e^{-\frac{1}{2}v^{2}}$ $\Longrightarrow$ $$p(x, v) \propto \textcolor{#42A5F5}{e^{-S(x)}} \cdot \textcolor{e^{-\frac{v^{2}}{2}}} = e^{-H(x, v)}$$ - Hamilton's equations: $$\dot{x} = \partial_{v} H,\quad \dot{v} = - \partial_{x} H$$ - Leapfrog Integrator (step size $\varepsilon$) ::: block 1. Half-step $\textcolor{#26A69A}{v}$ update: $\,\tilde{v} \,= v + \frac{\varepsilon}{2} \partial_{x} U$ 2. Full-step $\,\textcolor{#AB47BC}{x}$ update: $x' = x + \varepsilon \tilde{v} $ 3. Half-step $\textcolor{#26A69A}{v}$ update: $v' \,= \tilde{v} + \frac{\varepsilon}{2} \partial_{x} U$ ::: ---