Last week on 9th and 10th December 2021 I participated in the
Discussion meeting on Machine Learning
been organised by the French research group REST,
which is centred around theoretical spectroscopy in solids and molecules.
While most participants joined remotely I was fortunately able to
travel to École Polytechnique in Palaiseau (near Paris).
This gave me the opportunity to interact with some of the speakers and local organisers.
Since to date I have not yet taken a detailed look at applying machine learning in
chemistry and materials science I took the chance to
discuss with both practitioners as well as the other on-site
speakers during the breaks and the social dinner.
Overall this meeting has been extremely helpful and I feel I managed to get a good
impression of the challenges and current research in this exciting topic. I am very
grateful to the organisers Francesco Sottile and Jack Wetherell for the invitation
and I already look forward to my next interaction with the GdR REST.
In my talk I gave an introduction to algorithmic differentiation (AD) approaches
and their application in DFTK as well as density-functional theory simulations in general.
I motivated our work both from data-driven approaches for the design of novel
DFT functionals as well as the computation of properties, sensitivities
and uncertainties. Summarised in one sentence the key advantage
of getting a code algorithmically differentiable (AD-able) is to be able to automatically
compute derivatives of arbitrary output quantities (band gaps, forces, ...) with respect
to arbitrary input quantities (pseudo parameters, XC parameters, positions, temperature, ...)
within an acceptable computational cost and without the need to code analytical gradients.
AD approaches are not new in the electronic-structure context.
However, the successful existing AD-able
codes are either centred around simplified settings (e.g. 1D systems)
or Gaussian basis sets (thus primarily molecular systems).
In contrast our focus in DFTK are solid-state systems.
In particular for cases with vanishing
band gaps (e.g. metals) this setting is more involved and one needs to be overall a bit
more careful in the implementation. Another distinction from previous efforts
is that our implementation in DFTK has not been written from scratch just for AD.
Effectively the ability to make DFTK AD-able with relatively little effort
is a side effect from our flexible design as well as our seamless integration
with the composable Julia package ecosystem.
To emphasise this let me mention that the largest part of the work I presented upon
has been achieved in only 12 weeks by our excellent
Google Summer of Code student Niklas Schmitz (Thanks very much Niklas!).
To give a practical demonstration I showed how to use forward-mode algorithmic
differentiation to (a) compute polarisabilities,
(b) the variation of the dipole moment with respect to changing parameters in the exchange
functional and (c) a work-in-progress example using adjoint-mode differentiation.
As usual my slides are attached below.