Approaches to Assess Validity of Derivatives and to Improve Efficiency in Automatic Differentiation of Programs - TEL - Thèses en ligne
Thèse Année : 2006

Approaches to Assess Validity of Derivatives and to Improve Efficiency in Automatic Differentiation of Programs

Résumé

The context of this work is Automatic Differentiation (AD). Fundamentally, AD transforms a program that computes a mathematical function into a new program that computes its derivatives. Being automatic, AD can spare a large amount of development effort. AD is increasingly used in Scientific Computing, but some problems still delay its widespread use. In this thesis we propose elements of solution for two of these problems. The first problem is non-differentiability of most real-life programs for some particular inputs. AD tools often overlook this problem. However users need a strong degree of confidence in the derivatives they obtain, to use them e.g. in optimization engines. Non-differentiability in programs may come from
various causes, from the mathematical model to the actual implementation choices.
Practically, non-differentiability in programs is embodied by the presence of control.
Rather than studying notions of extended derivatives, our approach is to describe the domain in the input space for which the function actually remains differentiable.
We describe several alternatives to find this domain of validity and we evaluate their complexity. We formally study one method to compute the complete domain, but we discard it because of its cost. Alternatively, we propose a simpler directional method that we have implemented and validated on several examples. The second problem is efficiency of the reverse mode of AD, which computes gradients and is therefore of high interest. Reverse AD programs use the intermediate values from the original program in the reverse order, and this has a cost, whatever the strategy used. Available strategies all rely on a combination of storing and recomputing intermediate values, thus costing memory space and execution time. The central tactic, called ?checkpointing?, trades duplicate execution of complete segments of the code for memory space. In this work, we formalize the static data-flow behavior of reverse AD programs, taking checkpointing into account. Based on these formal results, we contribute two improvements to reverse AD strategies. First, the data-flow analysis lets us reduce the number of stored values to a minimum, and we give elements of proof of minimality. Second, we obtain indications on the code segments that are most appropriate for checkpointing. To experiment on checkpointing schemes, we extend the data-flow analyses and the reverse mode in our AD tool. We show the benefits on several large Scientific Computing codes.
Ce travail concerne la Differentiation Automatique (DA) de codes. La DA transforme un programme calculant une fonction mathematique en un nouveau programme calculant ses derivees, gagnant ainsi un temps de developpement consequent. L'usage de la DA se repand en Calcul Scientifique, mais souffre encore de quelques problemes.
Cette these propose des elements de solution a deux de ces problemes. Le premier probleme est la non-differentiabilite des programmes reels, pour certaines entrees.
Les outils de DA negligent souvent ce probleme, alors que les utilisateurs ont besoin d'une grande confiance dans ces derivees avant de les utiliser, par exemple dans des boucles d'optimisation. Quelle que soit son origine reelle, cette non-differentiabilite se traduit dans la structure de controle des programmes. Plutot que d'etudier des extensions de la notion de derivee, nous preferons ici caracteriser le domaine autour des entrees courantes pour lequel le controle reste constant et la differentiabilite est conservee. Nous proposons plusieurs approches et evaluons leurs complexites. Nous etudions formellement une construction du domaine entier, mais sa complexite limite son application. Alternativement, nous proposons une methode directionnelle moins couteuse, que nous avons implementee et validee sur plusieurs exemples. Le second probleme est l'efficacite du mode inverse de la DA, qui produit des codes 'adjoints' calculant des gradients. Ces codes utilisent les valeurs intermediaires du programme initial dans l'ordre inverse, ce qui necessite une combinaison de sauvegarde et de recalcul de ces valeurs. Une tactique fondamentale, nommee 'ckeckpointing', economise de la memoire au prix de la reexecution de segments de code. Dans notre travail, nous formalisons les analyses de flot de donnees necessaires a la differentiation inverse, y compris dans le cas du checkpointing. A partir de cette formalisation, nous proposons deux avancees aux strategies de la DA inverse. D'une part ces analyses nous fournissent des ensembles de valeurs a sauvegarder, que nous pouvons prouver minimaux.
D'autre part nous en tirons des indications sur les meilleurs segments de code candidats au checkpointing. Pour experimenter ces choix, nous etendons les analyses et l'algorithme de differentiation inverse de notre outil de DA. Nous montrons les benefices que l'on peut attendre sur des codes reels.

Domaines

Autre
Fichier principal
Vignette du fichier
thesis-araya.pdf (987.48 Ko) Télécharger le fichier
Loading...

Dates et versions

tel-00327515 , version 1 (08-10-2008)

Identifiants

  • HAL Id : tel-00327515 , version 1

Citer

Mauricio Araya-Polo. Approaches to Assess Validity of Derivatives and to Improve Efficiency in Automatic Differentiation of Programs. Autre. Université Nice Sophia Antipolis, 2006. Français. ⟨NNT : ⟩. ⟨tel-00327515⟩

Collections

INRIA INRIA2
76 Consultations
3506 Téléchargements

Partager

More