2026-07-22
Nerio: Machine learning hackathon (2018)
Nerio: Machine learning hackathon (2018)
The Context
Two years ago in 2018, I participated with two comrades in a hackathon in France organized by a
consulting firm Sia Partners jointly with two banks HSBC & Société Générale. The hackathon was
around machine learning and the goal was to create and imagine a business solution with machine
learning which could be applied to any sectors of the bank.
I knew that security in bank was a huge topic and I immediately had the idea of creating a
solution around security verification and hacking which can be done in another way compared to
common passwords (which can be easily hacked) and which can be fun and innovative also !
I imagined Nerio a solution which can help to detect strange pattern during the connection by
checking and comparing the user’s taste with the rest of the population. For example, many
questions are asked to the user when he wants to logging, such as ‘what is your favorite color
?’, ‘what is your favorite celebrity ?’ and some fake pictures are added in order to avoid
random answers or hacking from a another person.
My two comrades were working on the business part (such as the business plan, finding the right
market for it) and I handled the coding part. As it was my first real big projects, I faced two
problems: the first one was about the organization of the code. What were the best practices to
organize the files, the imports, the magic-string inside the code and so on… At that time, I
didn’t know at all the best software practices (as you can see in my code) and I reckon that I
was not using Git at all (please don’t shame me) ! The second difficulty for that application
was the way of creating it. Before that, I only coded algorithms, mainly theoretical (such as
Gaussian Pivot, Djisktra and all the classic stuffs) but I have never created real applications.
So I had to find the way of doing it, preferably by using Python as it was the language that I
was using for the machine learning part.
I initially didn’t want to use front-end language such as Javascript because I was not confident
with it and I didn”t know stuff about the routing, the server and I didn’t want to study it for
my application. That’s also the reason why I didn’t chose Flask, I didn’t know that web
application can also be used when not online that I routing could work on a localhost… At that
time I didn’t look deeper at that solution but instead choose something which is quite uncommon
and that I don’t particurlary recommend: PyGame !
So the reason why no probably never heard of Pygame is because of the sprites…. Yes, unlike
Javascript where you can create buttons to click in, I remembered that I have to define the
correct length and width of the area of the rectangle to make the click work (and of course it
was not all responsive application) !
On the other hand, it was kinda fun to create an app from scratch by designing everything (the
user click…) and to create a function to display every screen.
Speaking of that, at that time I didn’t want to use object-oriented programming mainly because I
was really lazy to study it in Python and I had terrible memories of OOP in Java with the word
‘this’ that at that time didn’t understand quite well. Be reassured, after doing my internship
with the use of Java language, it is now one of my favorite language and I’m quite shocked to
see that Python can be very informal (no typing, no public / private for example…).
Anyway, this introduction is to say that the code is quite crappy, with a lot of copy / paste,
lot of bad practices and of course, PEP 8 is not respected at all. Oh, and there are useless
comments everywhere and I wouldn’t even be surprised that I put my passwords somewhere. Anyway,
it still does the job and I quite it as it just to check my mistakes and see how I have improved
since that hackathon.
Now let’s see how the application works.
When the user first logging into its account (can be bank account but also any online account),
he is asked to answer few quick questions such as follow. The application is in French but the
text is saying something like ‘It is your first connection and we would like you to ask few
questions for your security’.

Few questions are going to be asked…

What is your favorite celebrity ?

What is your favorite movie ?
When the user has responded to those first questions, his answers are recorded and will be used
next time.
When the user (or another person potentially a hacker) wants to logging but a suspicion is
detected (due to unusual IP address, local time…) the script is activated and the user as to
answer again new questions.

Something is suspect… Can you answer some questions?
The main difference this time is that among the potential movies there are “intruders” i.e
movies that are fakes and don’t exist. The proportion of those movies is more important than the
real ones in order to increase the detection if someone answer randomly (a bot or a hacker who
has no clue about the answer).
Same for the color, the proportion of color black is increased because few people would chose
black as favorite color.

What is your favorite movie ?

What is your favorite color ?
Once the answers have been collected, we will compare them with the first answers of the users
and base on machine learning algorithms (in that case it is KNN) it will output a probability of
detecting a fraud user.
Based on that value, we will output different scenarios.

Thanks you for the verification ! You can now access to the
website.

We have detected a potential intrusion. You have sent you a text
message for confirmation.
With that code and application created, we also provided a business plan and a target market.
You described the potential evolution of the product (and of our hypothetical start-up) and we
finally demonstrated the application in front of the jury for this competition.
Two weeks later we were called for an award ceremony at the Société Générale building and we
have received the third prize for this work !
To be honest it was my first time earning money through a competition and I was really happy to
receive an award despite the fact that my code was kinda crappy and not at all well designed !
It was also really interesting to code with Pygame and to understand that the management of
sprites and the placement of objects was not convenient at all with that language (thank you
Angular & React for being so helpful…).
You can find the code of this project in my github repository here
and a presentation video of the competition with an interview of my coworker at the following link .

My prize after this hackathon !