Intelligence artificielle et blanchiment d’argent

Vendredi prochain, je dois intervenir dans une conférence (en ligne) organisée à Nîmes en France. Comme j’ai (presque) fini de préparer mes slides, j’en profite pour mettre en ligne un court billet, pour remettre un peu d’ordre dans mes idées, et mes notes. J’ai tout écrit en français parce que j’ai l’impression que les juristes en France sont plus à l’aide en français.

Comme souvent, quand on me parle d’intelligence artificielle, je me sens un peu perdu, mais j’ai l’impression que le but est de disperser un le brouillard et la fumée. Il y a trente ans, il y avait déjà des discussions sur l’utilisation d’outils technologiques dans le contexte du blanchiment (“money laundering“)

L’an passé, McKinsey affirmait que l’apprentissage machine changerait la donne, dans la guerre contre le blanchiment,

avec quelques idées intéressantes,

Intelligence artificielle

Pour commencer, je me disais que je pourrais présenter quelques termes classiques, poser un peu le cadre général,

En apprentissage non-supervisé, on cherche des “outliers“, des transactions “anormales”

Mais en grande dimension, définir la “normalité” est compliqué. Plus classiquement, on utilise des données labellisées, et on utilise des techniques  d’apprentissage supervisé. On utilise des données où les transactions sont classées comme “frauduleuse”, ou pas.

Dans l’espace des informations permettant de classer, on cherche à identifier des régions, pour les transactions qui seront prédites comme “frauduleuse” ou pas. Avec une approche probabiliste, la probabilité d’être “frauduleuse” sera élevée,

Bien entendu, on peut se tromper. Soit en laissant passer une transaction frauduleuse, soit en mettant de la suspicion sur des personnes qui ont effectué une transaction comme “frauduleuse”

En changeant le seuil à partir duquel on classe une observation comme “frauduleuse”, on peut baisser un type d’erreur (mais le prix à payer sera qu’on augmente l’autre type).

Une autre spécificité est qu’a priori, les données sont largement déséquilibrées, avec très peu d’observations réellement frauduleuses. Dans ces conditions, il est difficile d’avoir un modèle, la plupart des signaux étant jugés comme trop faibles.

On peut ensuite vraiment parler de “apprentissage machine”, avec des modèles a priori plus complexes, pouvant capturer des non-linéarités, des interactions, etc

Quand on a peu de données labellisées, l’apprentissage actif permet d’aider à chercher quelles transactions labellisées, pour améliorer la précision de notre classifieur. Car on dispose de milliers, de millions de données non labellisées.

L’idée est d’aller chercher des observations dans la zone d’indécision

On va labelliser quelques observations supplémentaire, et estimer de nouveau le modèle

On peut aussi lisser, ce qui fera gagner en robustesse, et parfois aussi en interprétabilité

On peut aussi apprendre d’autres modèles. Par exemple, on peut avoir de l’expérience partagée par une autre banque, peut être dans un autre pays. Un peu d’ajustements seront nécessaires, mais ça peut être un point de départ (je mettrais en ligne, d’ici l’été, quelques billets sur l’apprentissage par transfert)

Je peux aussi parler d’apprentissage antagoniste, où on pourrait être tenté d’attaquer l’algorithme d’apprentissage, pour changer la prédiction (je parlais de l’exemple des autruches la semaine passée)

Un autre aspect important est l’explicabilité. D’un côté, on veut un modèle simple à comprendre, facile à auditer. Mais de l’autre, s’il est trop simple, les fraudeurs pourront assez facilement passer au travers des mailles du filet.

Pour résumer, on retrouvera souvent ces concepts, quand on s’interroge sur l’intelligence artificielle,

Blanchiment d’argent

On peut passer à la deuxième partie, et les spécificités en lien avec le blanchiment d’argent. Tout d’abord, si j’ai l’habitude de travailler un peu sur la fraude, le blanchiment est un problème sensiblement différent. En particulier, les incitations pour les banques de stopper le blanchiment sont relativement faibles…

Mais c’est aussi le cas pour les régulateurs. Comme le note l’EBA (European Banking Authorities), le jour où les banques bloqueront toutes les transactions frauduleuses, cela signifie que les truands auront trouvé une parade, et plus aucun contrôle (ou surveillance) ne sera possible. C’est un argument assez classique en économie de biens illicites.

Si on revient sur la définition (ici légale), on voit que ça parle de transferts d’argents dont on ne peut remonter à la source. Assez logiquement, on va voir l’utilisation de réseaux, connectant les membres (et les institutions)

C’est l’analyse de relations qui permet d’identifier les transactions frauduleuses, et les personnes qui les lient

Il y a aussi de l’analyse de données textuelles, permettant de voir des relations qui ne sont pas matérialisées forcément par des transferts monétaires. C’est lié à la recherche de noms (de personnes ou d’entreprises) dans divers documents (presse ou réseaux sociaux). Mais les données textuelles, c’est compliqué

Juste pour le plaisir, je remets quelques titres de presse où l’extraction de relation et d’information est compliquée (y compris pour un être humain parfaitement anglophone).

Plusieurs articles mentionnent aussi l’analyse de sentiments, c’est à dire associer une connotation positive ou négative à une phrase ou un document.

Et pour conclure, je peux mentionner un petit soucis qui est que les données utilisées ici sont très largement en lien avec des informations personnelles, privées, voire sensibles. Mais dans la plupart des pays, la recherche d’activités frauduleuses autorise le traitement de ces données (Bertrand, Maxwell & Vamparys (2021) rentre davantage dans l’analyse)

Je mets quelques références pour conclure, mais voilà, en 30 minutes, on aura le temps de faire un survol rapide, et introductif, pour des juristes,

Fairness and discrimination, PhD Course, #10 Mitigation, Post-processing

For the last part, in our graduate course, we will discuss further mitigation, and after pre-processing and in-processing techniques, we will present post-processing ones. It simply means that we created a model, that could be seen as discriminatory. But besides that, it was a “good” model, so still want to use the predictions we obtained. Quite heuristically, in the context of binary sensitive attributes, we could agree that we got two sets of predictions, for the two sensitive attribute, and the fair model should probability “in between”. And that is a natural idea when dealing with convex objects, and it is related to averages, centroids or barycenters,

As mentioned above, there are several ways to defined such a quantity

but the most interesting one will be related to the one based on optimization.

Interestingly, this idea can be extended to more complexe objects than points, in some metric space, but more generally on distributions. And since we have seen several distances on the set of distributions, we can consider for instance the Wasserstein (2) barycenter, as in Agueh and Carlier (2011),

An interesting point, it that in the univariate setting, there is a simple connection with optimal transport, where averages of push-forward mapping are considered,

(even if it remains computationnaly difficult to get)

In our context, if we have a model, consider two scores, m(\boldsymbol{x},s=A) and m(\boldsymbol{x},s=B), on the two sensistive groups, and consider quite naturally the fair barycenter.

The heuristic interpretation is simple, and interstingly, using that new model m^\star(\boldsymbol{x}), individuals we be ordered the same way within each group. In the Gaussian case, it is also possible to compute those barycenters.

To do so, we need to define \boldsymbol{\Sigma}^t, for t\in[0,1], including some square root of \boldsymbol{\Sigma}, i.e. \boldsymbol{\Sigma}^{1/2}, that we expect to be symmetric. To do so, we need simply the exponential of matrices

and the logarithm

Then define the square root, for instance,

Here, we can prove that the barycenter of Gaussian vectors is Gaussian. The mean is the average of means, and a slightly more complex formula is used for the variance

based on matrix equations,

In dimension 2, we can write it more simply

Interestingly, the average is variances is larger than the variance of the barycenter. And a natural property can be obtained whem variances are diagonalizables in the same basis

Here we can illustrate iso-probabilities curves

More generally, use histograms

But it becomes hard to compute

An easier approach is to use numerical simulations and a kernel estimate to obtain a smooth density,

We can use it on pictures. For instance, we have several observations of a “3”, handwriten

We can compute there barycenter, and generate based on it

Quite naturally, once we have barycenters, we can consider geodesics

and apply it again to Gaussian vectors

On our dataset, with scores, we have

We can then compute the “barycenter score”, that will be, for people in group A

and people in group B

Consider now the score of three models, on the motor dataset

The score m^\star for people in group A is

while the score m^\star for people in group B is

We can now compare predictions for people in the two groups

Numerically, we obtain

So we are now able to mitigate unfair scores.

L’assurance au défi des ruptures, colloque, mi-septembre prochain, à Cerisy

Dans six mois (jour pour jour) Jean-Louis Bancel, Laurence Barry et Pierre François organise une conférence d’une semaine, sur le thème de l’assurance au défi des ruptures. La conférence se tiendra au Centre Culturel International de Cerisy.

Depuis la fin du XVIIIe siècle, l’assurance s’est imposée comme un dispositif qui confère de la résilience aux activités humaines, en proposant une compensation lorsque se réalise le risque qui les pénalise. La place de cette activité s’est accrue, pour s’incarner, à la fin du XXe siècle, dans une “société du risque”(1). Elle est devenue un rouage essentiel de l’industrialisation et de l’extension d’un progrès qui se retourne, parfois, contre nous.

La notion de risque évolue et est associée à la finance dont l’assurance n’est devenue qu’une des composantes. La crise de 2008, l’accélération des risques naturels extrêmes (cyclones, sécheresses, etc…) et la pandémie de Covid ont bousculé les certitudes sur la capacité du couple assurance/finance à apporter des solutions pour faire face aux risques du monde de demain.

Le choc de plusieurs ruptures, technologiques (mobilisation des données massives), sociales et économiques (propension des parties prenantes, offreurs comme demandeurs, à faire en sorte que chacun “paie son propre risque”), invite à repenser les fondements de l’assurance, ses objectifs et les techniques mises en œuvre pour les atteindre.

Face à la montée de périls globaux (dépassement des capacités de la Terre, évolutions climatiques…) mais aussi de nouvelles opportunités (médecine personnalisée…) les ressorts traditionnels de l’assurance (aléa, mutualisation, solidarité) sont-ils encore pertinents et opératoires ?

Les participants au colloque s’interrogeront sur les limites et les perspectives d’évolution de l’assurance. Ils tenteront d’esquisser des pistes “d’atterrissage”(2) pour l’assurance.

Les échanges dans l’enceinte du château se combineront avec des visites, en Normandie, permettant d’appréhender des situations, de risques (montée des eaux marines ou confrontation entre des risques industriels et préservation de sites naturels), où l’Assurance/Finance est mise à l’épreuve.

(1) “La société du risque. Sur la voie d’une autre modernité”, Ulrich Beck, Champs, n°822, Champs essais, 2008.
(2) Où atterrir ? Comment s’orienter en politique, Bruno Latour, La découverte, 2017.

Online Seminar Finance & Modeling, Centre d’Économie de la Sorbonne

In a week,  I will give a talk at the Modélisation Financière seminar (“Online Seminar Finance & Modeling” according to the invitation) on Using optimal transport to mitigate unfair predictions. Slides are now on line.

The insurance industry is heavily reliant on predictions of risks based on characteristics of potential customers. Although the use of said models is common, researchers have long pointed out that such practices perpetuate discrimination based on sensitive features such as gender or race. Given that such discrimination can often be attributed to historical data biases, an elimination or at least mitigation is desirable. With the shift from more traditional models to machine-learning based predictions, calls for greater mitigation have grown anew, as simply excluding sensitive variables in the pricing process can be shown to be ineffective. In this talk, we first investigate why predictions are a necessity within the industry and why correcting biases is not as straightforward as simply identifying a sensitive variable. We then propose to ease the biases through the use of Wasserstein barycenters instead of simple scaling. To demonstrate the effects and effectiveness of the approach we employ it on real data and discuss its implications. The talk will be based on recent work with François Hu and Philipp Ratz (2310.20508, 2309.06627, 2306.12912 and 2306.10155).

WIM (Workshop in Insurance Mathematics) is back

After four year without it, the WIM is back. Last time, it was in February 2020. Tomorrow, Agathe and Olivier will present posters at the Workshop in Insurance Mathematics, a Concordia University.

Both posters will be on fairness and discrimination. Olivier Côté will present a poster on “Fairness in insurance enigma: exploring the maze of regulation

Agathe will present a poster on Equipy, “A Python Package for Sequential Fairness using Optimal Transport with Applications in Insurance

Exposé au séminaire de statistique (StatQAM)

Tomorrow, Ewen Gallic will present some recent work at the StatQAM statistical seminar, on calibration, with Agathe Fernandes Machado, François Hu, and Emmanuel Flachaire. It will substantially be based on our recent paper From Uncertainty to Precision: Enhancing Binary Classifier Performance through Calibration

The assessment of binary classifier performance traditionally centers on discriminative ability using metrics, such as accuracy. However, these metrics often disregard the model’s inherent uncertainty, especially when dealing with sensitive decision-making domains, such as finance or healthcare. Given that model-predicted scores are commonly seen as event probabilities, calibration is crucial for accurate interpretation. In our study, we analyze the sensitivity of various calibration measures to score distortions and introduce a refined metric, the Local Calibration Score. Comparing recalibration methods, we advocate for local regressions, emphasizing their dual role as effective recalibration tools and facilitators of smoother visualizations. We apply these findings in a real-world scenario using Random Forest classifier and regressor to predict credit default while simultaneously measuring calibration during performance optimization.

To illustrate, consider predictions about the gender of the person on the picture, including probabilities (confidence), obtained from https://www.picpurify.com/demo-face-gender-age.html, with fake pictures, from https://www.nytimes.com/interactive/2020/11/21/science/artificial-intelligence-fake-people-faces.html.

Fairness and discrimination, PhD Course, #9 Mitigation, Pre-processing and In-processing

Finally, after defining (and quantifying) “group fairness“ and “individual fairness“, we can now start to discuss the idea of mitigating a possible discrimination. Here, we will see, how based on some data that were initially collected, and a model (a pricing model), it is possible to remove the discrimination in our pricing model.

Biases everywhere

As mentioned previously, insurance princing is based on the use of different datasets, at least one from “claims” and one from “underwriting”. And obviously, there might be biases in those data, conscious, or intended, or not.

Somehow, idea of tackling the problem from the end, as proposed, may not be the right one, and it might be better to tackle it from the beginning, through the biases in the data. The outcome of models will be less discriminatory if we could get rid of sexist or racist bias in underwriting, or even in the assessment of claims costs. Unfortunately, I cannot discuss that here since I do not have data that could be used to assess selection biases related to sensitive attributes.

On mitigation…

From a philosophical perspective, asking for mitigation might lead to some paradoxes.  I mention here two statements, by two judges in the U.S., that have very opposite perspective on the same problem,

versus

I will not talk much about those philosophical aspects (discussed a bit more in the textbook), we will not discuss how we can achieve fairness if required.

Interestingly, we have a nice property, on the price to pay to achieve fairness (price in terms of risk)

More precisely, we have the following result,

Interestingly, we have not only a lower bound, we can actually reach that bound (we will discuss that point next week).

Pre-processing

The first approach is related to the idea of “distorting” inputs, to get legitimate explanatory variables that are uncorrelated with sensitive ones.

If that makes sense in the context of linear models, it is not working well in the general case.

But one should not be (too) suprised: as mentioned in a previous post, on independence (and correlation), there is no statistical guarantees to keep it with nonlinear transforms of variables

or

It is what we observe on our datasets.

In-processing

An alternative is to use a penalized approach, where fairness is added as the constraint in the optimization procedure. For example Zafar et al. (2017), considered the following approach, with a constraint based on the covariance between the outcome and the sensitive attribute. We can adapt it for non-linear models.

We can look at the evolution of \widehat{\boldsybol{\beta}} as a function of c.

We can also visualize the evolution of predictions,

(including prediction for unwaware model, blind to the sensitive attribute)

On this slide, we can see that we have a tradeoff between accuracy and fairness.

It is also possible to visualize the distance between the distributions of scores in the two groups. We can see that c\to0 gives here strong fairness actuarlly, since Wasserstein distance tends to 0.

An alternative that we can find in the litterature (that I include in the in-processing section) is based on adversarial learning,

Formally, it is

which is related to minimax theorems

Standard references about adversarial learning and fairness are the following

Next week, we will discuss post-processing approaches.

Discussions autour du Manuel d’Assurance, partie 2

La semaine passée, j’avais mis en ligne un premier post, reprenant une discussion que nous avions, avec Patrick Thourot et Gilles Bénéplanc, l’automne dernier, avec l’équipe d’Annie (qui s’occupe de formation au sein du groupe Séroni, et News Assurances Pro) pour parler du Manuel d’Assurance,

Petite information au passage… les PUF ont mis en vente la version électronique (non disponible dans les premiers mois qui ont suivi la parution du livre, étrangement…)

Fairness and discrimination, PhD Course, #8 Individual fairness

After our post on “group fairness“, it’s time to discuss so-called “individual fairness“.

Similarity

The first idea is discussed in Dwork et al. (2012)

our approach is centered around the notion of a task-specific similarity metric describing the extent to which pairs of individuals should be regarded as similar for the classification task at hand. The similarity metric expresses ground truth. When ground truth is unavailable, the metric may reflect the “best” available approximation as agreed upon by society. Following established tradition – Rawls (1971) – the metric is assumed to be public and open to discussion and continual refinement. Indeed, we envision that, typically, the distance metric would be externally imposed, for example, by a regulatory body or externally proposed by a civil rights organization

or

Counterfactual fairness

The second one is related to causal inference. Ensuring fairness using causal methods will produce “counterfactual fairness” (to use the term introduced in Kusner et al. (2017)), based on the idea a decision is fair towards an individual if the outcome is the same in reality as it would be in a ‘counterfactual’ world, in which the individual belongs to the other group (with respect to the sensitive attribute).

Quite naturally, we should compare potential outcomes, either globally (average treatement effect) or a local version, conditional on characteristics \boldsymbol{x} of an individual.

Based on causal graphs (discussed previously) we can define several notions of individual fairness.

Hence, it is possible to use Plečko et al. (2021), based on transport, and quantile regressions,

To illustrate, we can consider some causal graph on our toy dataset

and then, on some specific individuals in the dataset

Here, we can also get a counterfactual version of all individuals with one-to-one matching, and optimal transport

i.e.

and we can get a counterfactual version, and possibly, a different prediction, using the fairadapt R package

We can also consider the German credit dataset

or the causal graph used in Watson et al. (2021),

Then, those techniques can be used to see compare the predictions of 6 fictious individuals,

"sendo l'intento mio scrivere cosa utile a chi la intende…"

Search OpenEdition Search

You will be redirected to OpenEdition Search