Antoine Savine: "The main challenge faced by global investment banks today is a computational one"
Computation of risks is a primary factor driving operational costs—whether via manual differentiation, automatic differentiation, or bump-and-revalue. Organizations employ teams of expensive quants to enable and support their solutions, while an average compute bill for a Tier 2 bank exceeds $10M per year. Even a 10% reduction is significant.
AAD is desired for numerical stability and performance, making the right tool critical to competitive advantage. There are currently three approaches for implementing AAD: tape-based, code transformation, and code generation. Each methodology has distinct advantages and disadvantages.
Three Types of Automatic Differentiation Tools
Current Status: Most commonly used AAD approach in production today
Tape-based AAD architecture showing recording and backward pass
Although the OO tape-based approach is faster than bump-and-revalue, limitations stem from original software design:
Current Status: Theoretical appeal but limited practical adoption
Source code transformation AAD showing compilation-time adjoint generation
Not recommended for production financial software due to scalability limitations, despite theoretical performance advantages.
Current Status: Novel approach with significant advantages, limited awareness
Code generation AAD showing runtime kernel generation
This generated code processes arbitrary inputs (random numbers or market rates) and is used in all subsequent iterations. It delivers maximized performance as it uses information available at runtime and can apply additional optimizations.
Minimizing compilation time is key to this solution. Using off-the-shelf compilers like LLVM or C++ simply cannot deliver the performance needed for practical production use.
For code generation AAD, compilation time is part of overall execution time. Using an off-the-shelf compiler is sufficient to test potential in principle, but it can't be used in practice.
MatLogica's AADC uses a fundamentally different approach: Operator overloading generates machine code in streaming mode directly. During initial execution of user analytics, AADC generates binary kernels on-the-fly for both original and adjoint functions.
Beyond fast compilation, generated kernels deliver exceptional performance:
AADC just-in-time compilation architecture with direct machine code generation
A modern AAD tool is must-have for quantitative and risk management software. The table below summarizes key practical aspects of the automatic differentiation tools we've discussed.
Comprehensive AAD Tools Comparison: Performance, Usability, Memory
In this analysis, we've examined the inner workings of each automatic differentiation approach. With code transformation being nearly impossible in practice, and considering all aspects, MatLogica AADC stands out in terms of performance.
With very manageable changes to quant libraries, organizations achieve:
MatLogica AADC is a modern AAD tool that acts as an abstraction layer delivering optimal performance and ease of use.
| Scenario | Recommended Approach | Rationale |
|---|---|---|
| Simple models, infrequent execution | Tape-Based AAD | Overhead acceptable for simple cases |
| Academic/research projects | Code Transformation | Small scale, controlled environment |
| Production quant systems | Code Generation (AADC) | Best performance, scalability, ROI |
| High-frequency risk calculations | Code Generation (AADC) | Low latency, high throughput |
| Monte Carlo-heavy workloads | Code Generation (AADC) | Vectorization, multi-threading |
| Organizations with existing AAD | Upgrade to AADC | 5-20x additional speedup |