Category Archives: Academe

Fable du dimanche, “L’Hirondelle et les petits Oiseaux”

L’Hirondelle et les petits Oiseaux“, de Jean de la Fontaine.

Une hirondelle en ses voyages
Avait beaucoup appris. Quiconque a beaucoup vu
Peut avoir beaucoup retenu.
Celle-ci prévoyait jusqu’aux moindres orages,
Et, devant qu’ils fussent éclos,
Les annonçait aux matelots.
Il arriva qu’au temps que la chanvre se sème,
Elle vit un manant en couvrir maints sillons.
Ceci ne me plaît pas, dit-elle aux oisillons :
Je vous plains ; car, pour moi, dans ce péril extrême,

Je saurai m’éloigner, ou vivre en quelque coin.
Voyez-vous cette main qui par les airs chemine ?
Un jour viendra, qui n’est pas loin,
Que ce qu’elle répand sera votre ruine.
De là naîtront engins à vous envelopper,
Et lacets pour vous attraper,
Enfin mainte et mainte machine
Qui causera dans la saison
Votre mort ou votre prison :
Gare la cage ou le chaudron !
C’est pourquoi, leur dit l’hirondelle,
Mangez ce grain, et croyez-moi.
Les oiseaux se moquèrent d’elle :
Ils trouvaient aux champs trop de quoi.
Quand la chènevière fut verte,
L’hirondelle leur dit : Arrachez brin à brin
Ce qu’a produit ce maudit grain,
Ou soyez sûrs de votre perte.
Prophète de malheur ! babillarde ! dit-on,
Le bel emploi que tu nous donnes !
Il nous faudrait mille personnes
Pour éplucher tout ce canton.
La chanvre étant tout à fait crue,
L’hirondelle ajouta : Ceci ne va pas bien ;
Mauvaise graine est tôt venue.
Mais, puisque jusqu’ici l’on ne m’a crue en rien,
Dès que vous verrez que la terre
Sera couverte, et qu’à leurs blés
Les gens n’étant plus occupés
Feront aux oisillons la guerre,
Quand reginglettes et réseaux
Attraperont petits oiseaux,
Ne volez plus de place en place,
Demeurez au logis, ou changez de climat.

Imitez le canard, la grue et la bécasse.
Mais vous n’êtes pas en état
De passer, comme nous, les déserts et les ondes,
Ni d’aller chercher d’autres mondes ;
C’est pourquoi vous n’avez qu’un parti qui soit sûr,
C’est de vous renfermer au trou de quelque mur.
Les oisillons, las de l’entendre,
Se mirent à jaser aussi confusément
Que faisaient les Troyens quand la pauvre Cassandre
Ouvrait la bouche seulement.
Il en prit aux uns comme aux autres :
Maint oisillon se vit esclave retenu.

Nous n’écoutons d’instincts que ceux qui sont les nôtres,
Et ne croyons le mal que quand il est venu.

Illustré par  Benjamin Rabier, en 1906

Creating automatically dozens of calendar notifications (with R)

In a few days, we will have our annual NSERC-CRSNG meeting for grant reviews. In a nutshell (the process will be the same as last year), we get an excel file that looks like a calendar, with about 45 slots of 20 minutes, from Monday 8 am till Friday 5 pm. This year, I wanted to create automatically notifications that could get directly into my agenda. And actually, that’s easy with calendar.

First, we can extract information for an excel file, or from a pdf document (which is a printed version of an excel file). First let us read the excel document

library("readxl")
loc = "/Users/ac/Downloads/NSERC.xlsx"
data_xls = read_excel(loc)

Then, I use the structure of the document: each column is a day, so I start on Monday, and then I go down, row by row. Each time I have something which looks like “RGPIN-2024-12345”, I create an ics file, with the reference name, and the appropriate time

library(stringr)
library(calendar)
library(lubridate)
ext_RGPIN = function(chr) str_extract_all(chr, "RGPIN-2024-[0-9]{4}|R[0-9]{1}")[[1]]
ext_time = function(chr)strsplit(as.character(chr)," - ")[[1]][1]
for(j in 2:6){
for(i in 1:nrow(data_xls)){
read_RGPIN = ext_RGPIN(data_xls[i,j])
if(!is.na(read_RGPIN[1])) {
dayhour = paste("2025-02-0",j," ",ext_time(data_xls[i,1]),sep="")
s <- lubridate::ymd_hm(dayhour,tz = "EST")
ic = ic_event(
start = s,
end = s+20*60 ,
summary = paste(read_RGPIN[1]," (",read_RGPIN[2],")",sep=""),
format = "%Y-%m-%d %H:%M")
ic_write(ic, paste("ic_NSERC",read_RGPIN[1],".ics",sep=""))
cat(read_RGPIN[1],"...",dayhour,"\n")
}}}

(to illustrate, I imported those in 2025). Finally, I can import all those notifications in my agenda.

Workshop “Networks, Games and Risk”

Monday we had our workshop “Networks, Games and Risk“,

with Renaud Bourles (Centrale Marseille, Aix-Marseille School of Economics, and Institut Universitaire de France, France), Vincent Boucher (Université Laval, Québec, Canada), Federico Bobbio (Université de Montréal, Montréal, Canada), Leonie Baumann (McGill University, Montréal, Canada), Fallou Niakh (CREST, ENSAE, Institut Polytechnique de Paris, France) and Philipp Ratz (Université du Québec à Montréal, Montréal, Canada)

It was extremely interesting !

Apprentissage par renforcement, jeux et collision

Ce matin, Suzie Grondin nous expliquait les applications du RL (apprentissage par renforcement) en théorie des jeux, pour comprendre la collusion, pour la fin de son stage (6 mois de césure à l’ENSAE Paris) 😪 . Avec un lien avec le papier de Luc Rocher sur les approches adversariales, et une rapide introduction au “Offline-to-Online Reinforcement Learning”…

Merci à toute l’équipe (Philipp Ratz, François HU, Agathe Fernandes Machado, Dante Mata López) qui est venu l’écouter, ainsi que Louis Abraham… Superbe travail ! on veut un papier maintenant 😉 !

Melting contestation: insurance fairness and machine learning

Nice review of our paper , with Laurence Barry, on montrealethics.ai,

Machine learning tends to replace the actuary in the selection of features and the building of pricing models. However, avoiding subjective judgments thanks to automation does not necessarily mean that biases are removed. Nor does the absence of bias warrant fairness. This paper critically analyzes discrimination and insurance fairness with machine learning.

Melting contestation: insurance fairness and machine learning

The whole is greater than the sum of the parts

Good news: ou paper, A Sequentially Fair Mechanism for Multiple Sensitive Attributes, written with Philipp Ratz and François Hu will be presented in February in Vancouver, at the 38th Annual AAAI Conference on Artificial Intelligence. For a shorter version, there was a review on montrealethics.ai of the paper last week (as mentioned previously).

Also, last week also, the team launched the  equipy python package, with codes used in the paper,

pip install equipy

EquiPy is a Python package implementing sequential fairness on the predicted outputs of Machine Learning models, when dealing with multiple sensitive attributes. This post-processing method progressively achieve fairness accross a set of sensitive features by leveraging multi-marginal Wasserstein barycenters, which extends the standard notion of Strong Demographic Parity to the case with multiple sensitive characteristics. This approach seamlessly extends to approximate fairness, enveloping a framework accommodating the trade-off between performance and unfairness.

(from the left to the right, Agathe, who just joint the PhD program, Suzie, MSc student at ENSAE, with us since May or June, Philipp, PhD student, François, postdoctoral fellow – and Dante, also postdoctoral fellow, in stochastic processes). According to Aristotle (or probably slightly misquoted),

the whole is greater than the sum of the parts

I couldn’t agree more !

Podcast: IA, biais et éthique en assurance

Lors de mon dernier passage à Paris, en France, j’en avais profité pour discuter avec Vivien, et enregistrer un podcast comme on dit en France, ou balado comme on dit ici. C’était l’occasion de revenir un peu sur le Manuel d’Assurance, sorti un an auparavant, et le livre Insurance, Biases, Discrimination and Fairness annoncé pour l’hiver prochain… Le podcast peut s’écouter sur youtube, et spotify

(image générée par ai-comic-factory)

Fondation SCOR, Fairness of predictive models: an application to insurance markets

The Scientific Council of the SCOR Foundation has decided to fund the research project “Fairness of predictive models: an application to insurance markets” until its anticipated completion date in three years (2023-2025). The project will be led by the University of Quebec and directed by Arthur Charpentier, professor in the mathematics department of the University of Quebec in Montreal. This project aims to propose corrections to the automatic artificial intelligence algorithms that can be used to determine the optimal pricing of individual policies in order to remove or limit the biases likely to generate inequities or even discrimination based on gender, race, religion, origin, etc. in the coverage offered by insurers or reinsurers to policyholders. The subject is of both theoretical (better control of black boxes constituted by models based on artificial intelligence algorithms) and practical (reduction of the risks of discrimination and inequity) interest. From this point of view, it is very topical for insurers and reinsurers facing major reputational challenges in the context of the growing importance of social networks. In addition to his role at the University of Quebec, Arthur Charpentier is a member of the Institute of Actuaries, internationally recognized expert in actuarial science, author of numerous academic articles published in renowned academic actuarial journals in both nationally and internationally.