Toward an Industrial Strength Automatic Differentiation Product

Find Similar History 36 Claim Ownership Request Data Change Add Favourite

Title
Toward an Industrial Strength Automatic Differentiation Product

CoPED ID
b1d3e493-7e8e-494f-8dbb-f05fc6de9bda

Status
Closed

Funders

Value
£202,930

Start Date
Nov. 1, 2012

End Date
Jan. 31, 2014

Description

More Like This


Numerical simulation of complex real-world phenomena is a major challenge for almost all activities in science and engineering, particularly when it is desired not merely to model a process (such as airflow across the surface of a car or a wind turbine) but to optimise the process (for example, to adjust the shape of the surface so as to minimize the drag).

To do this efficiently for large problems, it is essential for the model to have access to numerical derivatives (sensitivities of the outputs with respect to inputs) that are accurate (free from coding, rounding and trunction errors) and computationally cheap. At present most users either provide hand-coded derivative routines, which are tedious to program and update, and prone to coding errors; or finite differences, which are expensive to compute and numerically inaccurate.

Automatic Differentiation (AD) is a set of techniques for transforming numerical modelling code mechanically so that it calculates the numerical sensitivities of the model values as well as the values themselves, at the same order of speed as hand-coded derivatives, and to the same precision. This is done by using the chain rule from calculus, but applied directly to floating point numerical values, rather than to symbolic expressions.

The so-called reverse, or adjoint, mode of AD can produce a complete set of sensitivities for a computer program evaluating a model, at a computational cost of order five times that of a single evaluation of the program itself - even if there are millions of input variables and sensitivities. However, achieving this requires the ability to make the program run backwards, recovering all the intermediate numerical values in the process, and it is this which requires the development and use of sophisticated software tools.

AD techniques are still not widely used in modelling and optimisation, due in large part to a lack of suitable user-friendly general-purpose commercial-strength AD tools.

Current AD tools work either by operator overloading or by source pre-processing. Operator overloading is reliable, but slow, and do not provide support for calls to specialist numerical library functions, such as linear algebra routines. Source pre-processing tools require a high user awareness of AD, produce code that is not easy for humans to understand, and have memory management issues.

The research compiler developed by the CompAD team with EPSRC support is an enhancement of the NAG Fortran95 compiler, and is still the world's only industrial strength compiler to have built-in support for AD. Embedding an overloading approach to AD within an existing high performance compiler gives the best of both worlds: the convenience of the overloading approach and the speed of source pre-processing. However the current compiler is a research tool, and requires expert assistance to configure and integrate with application code. Consequently the research version of the CompAD compiler is unsuitable in its present form for the majority of potential beneficiaries.

This follow-on proposal will extract the AD functionality from the CompAD compiler, integrate it with the NAGWare Fortran Library, and make the resulting prototype widely available. As well as providing an immediate benefit to many users, this prototype will be suitable for systematic market testing and development. The prototype will be used to capture user requirements for, and to underpin subsequent development of, a commercially viable software AD product that will work "out-of-the-box" on problems of moderate size.


More Information

Potential Impact:
The economic impact of this project ultimately arises from the fact that increasing the accuracy and speed of modelling and optimisation leads to the more efficient use of material resources. Examples of relevant client sectors likely to benefit include engine design, industrial process optimisation, aerospace applications, energy management, multidisciplinary design, forecasting, medical imaging, pharmaceutical industry, and many more.

Numerical simulation and optimisation of complex real-world phenomena requires the model to have access to numerical derivatives (sensitivities). Automatic Differentiation (AD) has the potential to revolutionise the provision of such sensitivities. Previous EPSRC funded research projects have produced a compiler-based tool with the required capability. The primary objective of this project is to take this research tool and modify it into a prototype of an industrial-strength, easy-to-use product.

The first impact to be felt is that resulting from an increased uptake of Automatic Differentiation (AD) by NAG's existing clients. This will provide an immediate competitive benefit to those clients with modelling and optimisation problems of moderately large size. [NAG currently has 3,000 clients, with Fortran products accounting for about stg 2M annual turnover.] The ability to offer fully integrated AD capability will also make the NAG Fortran compiler and libraries more attractive to a wider user base.

The availability of a commercial product will also increase the take-up of AD by those with very large problems at the edge of feasibility, by enabling them to have a positive initial experience of AD acquired at low entry cost prior to investing in bespoke technology.

The next impact is the knowledge-transfer effect of this commercialisation project upon NAG. Fortran is not the only language with a requirement to support AD. For example, many Tier 1 financial institutions rely heavily on computationally intensive modelling in C++ that uses high-order derivatives (Greeks). Sixty percent of the Tier 1 banks already hold global licences for NAG software. The experience gained from this project by the NAG compiler team would enable a similar level of AD support to be deployed for C++ within a five-year impact cycle. Tier 1s have repeatedly indicated that they are prepared to invest heavily in such technology. Better and more reliable financial modelling gives banks a competitive edge in the short term, but the effect of improved financial modelling on the management of the economy will ultimately benefit everybody.

There is also a knowledge transfer effect on the CompAD team. This will be their first commercialisation of an AD compiler, but they do not intend it to be their last. Their experience will also be disseminated through various technical fora, as well as consultancy, and (given their reputation within the AD community) is likely to exercise a significant influence upon other compiler providers. This will in turn impact on the market for AD tools.

A further phase of impact will be the effect on the various modelling communities themselves of the widespread availability of commercial strength AD. Preliminary indications are that further development of AD has the potential to supplement, and in some cases replace, computationally expensive modelling techniques such as Monte Carlo methods. [For example, instrumented use of the experimental CompAD compiler with a model adapted from the German Waterways Authority took less than twenty minutes to calculate a silt density distribution that required over fifteen hours using Monte Carlo.]

The ultimate impact of this project is potentially vast, particularly if it succeeds in trail-blazing a phase-change in the way in which numerical models are currently tuned in engineering and science. But even the incremental impact of the first stage on existing clients of NAG software will generate a high-multiple return on investment.

Subjects by relevance
  1. Optimisation
  2. Simulation
  3. Computer programmes
  4. Programming
  5. Source codes
  6. Modelling (creation related to information)
  7. Errors

Extracted key phrases
  1. Industrial Strength Automatic Differentiation Product
  2. Numerical simulation
  3. Numerical modelling code
  4. Numerical sensitivity
  5. Numerical derivative
  6. Intermediate numerical value
  7. Point numerical value
  8. Ad compiler
  9. Specialist numerical library function
  10. Strength ad tool
  11. Current ad tool
  12. Viable software ad product
  13. Commercial strength ad
  14. Ad support
  15. NAG Fortran compiler

Related Pages

UKRI project entry

UK Project Locations