% Created 2026-10-13 Tue 07:53
% Intended LaTeX compiler: pdflatex
\documentclass[usenames,dvipsnames,colorlinks,aspectratio=169]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{color}
\usepackage{listings}
\usepackage{pdfpages}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{siunitx}
\usepackage{libertine}
\usepackage{fontawesome}
\mode<beamer>{\usetheme{Boadilla}}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{alerted text}{series=\bfseries}
\setbeamercolor{alerted text}{fg=blue}
\usecolortheme{default}
\usefonttheme{serif}
\usefonttheme{professionalfonts}
\lstloadlanguages{[ISO]C++}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.50,0,0.82}
\definecolor{codeorange}{rgb}{0.95,0.3,0.1}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
commentstyle=\color{codegreen},
keywordstyle=\color{codeorange},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\usepackage{amsmath}
\author{Brett Viren}
\date{\today}
\title{The Machine Learns Physics}
\subtitle{LArTPC Field Response and Detector Design Optimization}
\hypersetup{
 pdfauthor={Brett Viren},
 pdftitle={The Machine Learns Physics},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={},
 pdflang={English}}
\begin{document}

\maketitle
\newcommand{\rvec}{\mathbf{r}}
\newcommand{\Evec}{\mathbf{E}}
\newcommand{\vvec}{\mathbf{v}}
\newcommand{\dd}{\,\mathrm{d}}
\newcommand{\Ntheta}{N_{\theta}}
\newcommand{\Vref}{V_{\mathrm{ref}}}
\begin{frame}[label={sec:orgb43397e}]{Topics}
\begin{itemize}
\item Learning Laplace
\item Applications to wires and pixels
\item Going further
\end{itemize}
\end{frame}
\begin{frame}[label={sec:orgc6d5ab8}]{Field response construction}
\begin{block}{Drift potential}
\(\Phi_d(\rvec)\) potential given geometry and applied voltages.
\begin{itemize}
\item Velocity field \(\vvec_d = \mu \Evec_d = -\mu \nabla \Phi_d\) and drift paths.
\end{itemize}
\end{block}
\begin{block}{Weighting potential}
\(\Phi_{w,k}(\rvec)\) potential for electrode \(k\) at 1 volt and all else grounded.
\end{block}
\begin{block}{Field response}
Induced current \(I_k(t_i) = e\vvec_d \cdot \Evec_{w,k}\) with \(\Evec_{w,k} = - \nabla \Phi_{w,k}\) along drift path steps of duration \(t_i\) 
\end{block}
\begin{block}{Solving potentials: Laplace equation with boundary conditions.}
\(\nabla^2 \Phi(\rvec) = 0 \quad \text{in } \Omega, \qquad \Phi(\rvec) = g(\rvec) \quad \text{on } \partial\Omega\).
\end{block}
\end{frame}
\begin{frame}[label={sec:orgee7a1e3}]{Traditional Laplace solutions methods}
It is fair to say that BNL is the center for field responses for LArTPC.

\begin{itemize}
\item \alert{GARFIELD} provides all LArTPC \textbf{2D wire} models.
\begin{itemize}
\item \textbf{FEM}, ST CPU, FORTRAN. Yichen, Xuyang.
\end{itemize}
\item \alert{pochoir} provides \textbf{hybrid 2D/3D strips, 3D pixels}.
\begin{itemize}
\item \textbf{FDM}, MT CPU/GPU, PyTorch. Rado, Yousen, Sergey, Brett.
\end{itemize}
\item \alert{larf} earlier 3D wires, discontinued when MicroBooNE showed 2D is enough.
\begin{itemize}
\item \textbf{BEM}, ST CPU, Python/C++. Brett.
\end{itemize}
\item \alert{drifiers} Garfield++, never quite reached escape velocity.
\begin{itemize}
\item \textbf{FEM}, ST CPU, C++. Brett.
\end{itemize}
\end{itemize}

BNL also provides the primary consumers:

\begin{itemize}
\item \alert{Wire-Cell Toolkit} 2D \textbf{simulation} and \textbf{signal processing}.
\item \alert{TRED} GPU-accelerated 2D/3D \textbf{simulation}.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org554402a}]{A new (to me) method: learning Laplace}
\[
\theta = \arg\min_\theta\left[
  \lambda_\Omega \left\langle
    \left(\nabla^2 \Phi_\theta \right)^{\!2}
  \right\rangle_{\Omega}
  + \lambda_{\partial} \left\langle
    \left(\Phi_\theta - g\right)^{\!2}
  \right\rangle_{\partial\Omega}\right]
\]

\vfill

Training finds parameters \(\theta\) that minimize Laplace equation and the boundary comparison.
\begin{itemize}
\item Sampling \(\rvec\): half from the full volume and half in the electrodes.
\end{itemize}

\vfill

Conceptually simple procedure but what is the form of \(\Phi_\theta\)?  Defined as a partition:
\[
\Phi_\theta(\rvec;c) \equiv B_c(\rvec) + \sigma \Ntheta(\rvec)
\]
\vspace{-5mm}
\begin{itemize}
\item \(B_c\) exact, analytical solution to a different but similar problem.
\item \(\Ntheta\) a \textbf{network} to learn a correction to the actual problem.
\end{itemize}
Partitioning minimizes what must be learned, accommodates network architecture limitations. 
\end{frame}
\begin{frame}[label={sec:org43eaba8}]{SIREN\footnote{``Implicit Neural Representations with Periodic Activation Functions'', Sitzmann, et al. Proc. NeurIPS, 2020. \url{https://arxiv.org/abs/2006.09661}} is a \textbf{multi-layer perceptron} (MLP) with \textbf{sinusoidal activations}.}
\begin{center}
\includegraphics[width=0.6\textwidth]{figs/siren-architecture.pdf}
\end{center}
\end{frame}
\begin{frame}[label={sec:org3a0c642}]{SIREN layers}
\begin{align*}
h^{(0)} &= \gamma(\rvec) \in \mathbb{R}^{n_0}, \qquad \qquad \qquad \qquad \qquad \mathrm{(input\ encoding)}\\
h^{(\ell)} &= \sin\!\Big(\omega_\ell \big( W^{(\ell)} h^{(\ell-1)} + b^{(\ell)}\big)\Big)
   \in \mathbb{R}^{n_\ell},
  \qquad \ell = 1,\dots,L, \label{eq:siren-hidden}\\
\Ntheta(\rvec) &= W^{(L+1)} h^{(L)} + b^{(L+1)} \in \mathbb{R}. \qquad \qquad \mathrm{(linear\ readout)}
\end{align*}

Input is an analytic function and may encode symmetries of a model.

The hidden layers:
\begin{itemize}
\item First layer's frequency \(\omega_1\) sets a kind of ``input bandwidth'', deeper layers learn harmonics.
\item Learned weights \(W^{(\ell)}\) and biases \(b^{(\ell)}\), \(\omega_1\) frequencies fixed.\footnote{Typically set \(\omega_{\ell > 1} = 1.0\).  Learned are frequencies possible but they help convergence, not richness.}
\end{itemize}

Linear readout combines last layer to produce a scalar.
\begin{itemize}
\item A vector readout could also be defined.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org60bc5a4}]{SIREN limitations and benefits}
\begin{block}{SIREN limitations}
\begin{itemize}
\item Effectively has a \emph{bandwidth limit}, poorly represents sharp peaks (\(\Phi(\rvec) \sim \ln \rho\) near wires).
\item A global function, but \(\Phi(\rvec)\) is undefined outside the boundary (\emph{eg} inside electrodes).
\end{itemize}
The \(B_c(\rvec)\) supplies these problematic parts so SIREN can learn a smooth, global correction.
\end{block}
\begin{block}{SIREN benefits}
\begin{itemize}
\item It is an analytical function (along with \(B_c\)) so solution \(\Phi(\rvec)\) can be evaluated for any \(\rvec\).
\item Differentiable, so we may use fast \emph{back-propagation} training techniques.
\end{itemize}
\end{block}
\begin{block}{}
We choose \(\Ntheta \equiv\) SIREN.
\end{block}
\end{frame}
\begin{frame}[label={sec:orgf04e632}]{Application: wires}
Consider a few geometry models and domains:

\begin{description}
\item[{2D-aligned}] the usual model used by GARFIELD.
\item[{phase slices}] family of 2D slices of 3D along wire direction.
\item[{crossed planes}] quasi-3D excluding wire-wire charge induction.
\item[{full 3D}] no approximation tricks.
\end{description}

Notes:

\begin{itemize}
\item \(B_c(\rvec)\) for wires is generally enough, no SIREN needed.
\begin{itemize}
\item This changes for strips/pixels.
\end{itemize}
\item We may average the last three to get to the standard 2D form.
\item The \emph{full 3D} has similar errors as other two, slower but not better.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org5eba289}]{Wire field errors}
solve errors

domain limitation errors
\end{frame}
\begin{frame}[label={sec:orgfcdd865}]{Compute performance}
CPU and GPU speed
\end{frame}
\begin{frame}[label={sec:org9b5f957}]{What can be done with these new types of fields?}
\begin{itemize}
\item Determine the floating W-plane voltage of ``bad'' PDHD APA.
\item Understand V-plane quasi-collection in 2D and 3D models.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org7ffc3c6}]{Collecting plane\textbf{s}: \alert{2D-aligned} vs W-plane voltage}
\begin{center}
\includegraphics[width=0.75\textwidth]{firep/demos/wire-response-from-data/note/figs/firep-landing.pdf}
\end{center}

W-plane collects electrons and charges up until it becomes purely induction-type.
\begin{itemize}
\item Resolve fine-grained transverse detail not sampled by Garfield.
\item Equilibrium voltage at -47 V depends on geometry details, \textbf{and domain dimensionality}.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org3a3e396}]{Collecting plane\textbf{s}: \alert{3D / quasi-3D}}
\begin{center}
\includegraphics[height=0.7\textheight]{firep/demos/wire-response-from-data/quasi3d/figs/q3d-maps.pdf}
\end{center}

Even more high-resolution 3D complexity not available to Garfield 2D.
\begin{itemize}
\item \textbf{rows}: \(V_W=0\),  \(V_W\) floating, \(V_W\) nominal.
\item \textbf{columns}: 2D aligned, phase slices, crossed planes.
\end{itemize}
\end{frame}
\begin{frame}[label={sec:org9fb19e1}]{Application: pixels an grid design optimization}
Modified loss functions, results.
\end{frame}
\begin{frame}[label={sec:org0fc22b7}]{Going further}
other PDEs

high rez sim for PDHD floating W.

pixel nd design optimization  also FD3?
\end{frame}
\end{document}
