Share
Embed
Keeping online platforms safe with data and machine learning
Guest Masterclass for the Data Analytics module in the Bachelor of International Management program at Geneva Business School, Barcelona (2024–2025)
Massimo Belloni PRO
April 08, 2025
Transcript
54 slides
-
Customized for Lorem Ipsum LLC Keeping online platforms safe with
data and machine learning Massimo Belloni - April 2025 (Barcelona, ES) Masterclass - Data Analytics Bachelor in International Management -
Senior Data Science Manager @ Bumble Inc Massimo Belloni Machine
Learning Engineer () - lived and worked in Rotterdam () and London () Currently Data Science Manager at Bumble Inc for Trust & Safety @massibelloni /massibelloni [email protected] -
Agenda Overview and data collection Data exploration and insights From
insights to action - Rule Based Engines What is Machine Learning? Why it is useful? How to develop a ML system? -
Why does it matter? 1 Social media and connection apps
give easy (and free!) access to hundreds of millions of people around the world. Everyone is on them. 2 People can be reached on their personal devices, often at home and potentially in vulnerable situations. One-to-one conversations are powerful (and risky) tools 3 Technology advancements don’t just benefit good actors, but also bad ones. Better software, artificial intelligence, etc. can massively improve the reach and quality of scam attacks. 4 Spam and scam on social media aren’t just noisy and annoying, but can lead to real crimes and destroy people lives. -
Definition of success 0 1 Prevent Proactive removal of bad
content and users even before their account is active or their posts are published. 0 2 Be fast Constantly get signals from users and content to be as fast as possible to take action and reduce spread. 0 3 Learn from mistakes Continuously investigate bad content and patterns to improve the systems, especially when they fail. -
1) Look at the user! • IP address - where
are they based? Which country they say they are based? • Which email address (and domain!) they used to register? • Weird username? Weird characters? • Phone verification? ID verification? Which proof do we have about who they claim they are? • Device footprint? User agent and OS? • Are they using a VPN? • …. -
2) Look at the text • Weird characters? • Are
currencies ($£€) mentioned? • Emojis? Digits? • Any easy to spot regular expression? • Is the whole paragraph known to us? • Does the text trigger any machine learning model? -
3) Analyse the media • OCR - read the text
inside images! • Image hashing - has the same picture used in the past? • Image classification -
Hypothesis building 1 Any user logging in using a VPN
is suspicious? 2 Any user logging in from country xyz has malicious intent? 5 How many times a user can mention about money in the same message? 6 Is it ok to use too many emojis in the username? 3 Is it ok to use the platform from a country that’s different from the one selected during registration? 7 Are words like “sell”, “success”, “crypto”, “buy” related to scams more generally? ……. -
What’s SQL? Structured Query Language (SQL) is a domain-specific language
used to manage data, especially in a relational database management system. It is particularly useful in handling structured data, i.e., data incorporating relations among entities and variables. Wikipedia Insert data Analyse data Structure data format -
User ID Username Country Country IP 123 crypto_maniac ES US
456 massibelloni ES ES 789 ilovecats95 UK JP Reporter Post ID 123 ABC 456 DEF Post ID Author Text ABC 456 Such a sunny day DEF 123 Invest in ETH to make $$$ GHI 123 Paid a coffee 10$ JKL 789 Slept 12 hours ytd night -
SELECT count(*) FROM POSTS p WHERE exists (SELECT * FROM
REPORTS r WHERE r.POST_ID = p.POST_ID) AND (text LIKE “%$%” or text LIKE “%€%”) SELECT count(*) FROM USERS u WHERE exists ( SELECT * FROM REPORTS r JOIN POSTS p ON r.POST_ID = p.POST_ID WHERE p.AUTHOR = u.USER_ID ) AND country != country_ip -
SELECT count(*) FROM POSTS p WHERE exists (SELECT * FROM
REPORTS r WHERE r.POST_ID = p.POST_ID) AND (text LIKE “%$%” or text LIKE “%€%”) SELECT count(*) FROM USERS u WHERE exists ( SELECT * FROM REPORTS r JOIN POSTS p ON r.POST_ID = p.POST_ID WHERE p.AUTHOR = u.USER_ID ) AND country != country_ip Number of reported posts where $ or € is mentioned at least once. -
SELECT count(*) FROM POSTS p WHERE exists (SELECT * FROM
REPORTS r WHERE r.POST_ID = p.POST_ID) AND (text LIKE “%$%” or text LIKE “%€%”) SELECT count(*) FROM USERS u WHERE exists ( SELECT * FROM REPORTS r JOIN POSTS p ON r.POST_ID = p.POST_ID WHERE p.AUTHOR = u.USER_ID ) AND country != country_ip Number reported users (authors of at least one reported post!) that logged in from a country different from the registered one -
75% Users eventually reported connecting to the app from country
x while their registered country is y 53% Users that use the app connected through a VPN eventually reported 95% Users connecting from country X while their registered country is not X mentioning $$$ more than three times get eventually banned NOTE: all this statistics are completely random and for educational purposes only! -
Rule-based system In computer science, a rule-based system is a
computer system in which domain-specific knowledge is represented in the form of rules and general-purpose reasoning is used to solve problems in the domain. Rule-based systems emerged within the field of artificial intelligence in the 1970s and [...] use if-then rules to derive actions from conditions Wikipedia (ish) A B C =2 != 2 Action Action Action >5 <= 5 -
Going back to our hypothesis 1 Any user logging in
using a VPN is suspicious? 2 Any user logging in from country xyz has malicious intent? 5 How many times a user can mention about money in the same message? 6 Is it ok to use too many emojis in the username? 3 Is it ok to use the platform from a country that’s different from the one selected during registration? 7 Are words like “sell”, “success”, “crypto”, “buy” related to scams more generally? ……. -
Going back to our hypothesis 1 Any user logging in
using a VPN is suspicious? 2 Any user logging in from country xyz has malicious intent? 5 How many times a user can mention about money in the same message? 6 Is it ok to use too many emojis in the username? 3 Is it ok to use the platform from a country that’s different from the one selected during registration? 7 Are words like “sell”, “success”, “crypto”, “buy” related to scams more generally? -
IP IP $$$ = registration ✅ All good! not country
X country X Leveraging the insights collected from data exploration and all the information we collect during profile registration and post submission we can derive rules as deep and complex as we wish to approve or reject posts and potentially block users! != registration ✅ All good! yes no ✅ All good! ❌ Block -
IP IP $$$ = registration ✅ All good! not country
X country X != registration ✅ All good! yes no ✅ All good! ❌ Block We can trigger one check (or multiple checks in parallel!) when a new post is submitted (prior to publishing) or every time a new user is registered or logs in! Deciding when to trigger a rule and collecting relevant information (feature engineering) is 90% of the task -
Performance of a classification system P r e d i
c t e d Good ✅ Bad ❌ Actual Good ✅ Bad ❌ False Positive FP True Positive TP False Negative FN True Negative TN -
Performance of a classification system P r e d i
c t e d Good ✅ Bad ❌ Actual Good ✅ Bad ❌ False Positive FP True Positive TP False Negative FN True Negative TN How reliable the system is when it says that something is bad? How much does the system alone solve for the issue? -
95% Users connecting from country X while their registered country
is not X mentioning $$$ more than three times get eventually banned 3% Amount of banned users that are described from the pattern above Precision Recall -
IP IP $$$ = registration ✅ All good! not country
X country X != registration ✅ All good! yes no ✅ All good! ❌ Block -
✅ All good! ✅ All good! ✅ All good! ✅
All good! ✅ All good! ❌ Block ✅ All good! ✅ All good! ✅ All good! ll good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ~80% ~70% Precision Recall NOTE: all this statistics are completely random and for educational purposes only! -
Rule based systems Very simple to set up, control and
understand Direct actioning of data insights Require human expertise and knowledge to improve Complexity explodes quite quickly with the amount of rules Good performance if the data available is rich and accurate enough Their output doesn’t include confidence - binary by design -
What’s AI Machine Learning? Machine learning is a field of
study in artificial intelligence concerned with the development and study of statistical algorithms that can learn from data and generalize to unseen data, and thus perform tasks without explicit instructions. Wikipedia ML History Reality -
ML History Reality good 0.25 bad 0.75 The machine learning
model is trained on a history of bad content and good content and tries to mimic the behavior of human reviewers/moderators in order to autonomously take decisions on this task. -
ML History Username Country Country IP Text Target crypto_maniac ES
US Invest in ETH to make $$$ Bad (1) crypto_maniac ES US Paid a coffee 10$ Good (0) massibelloni UK JP Such a sunny day Good (0) -
How do they “learn”? Our data Once we have a
model (we understand how our data behaves!) we are able to predict the future -
How do they “learn”? Y = m x + b
It’s an iterative trial and error approach where we experiment with all possible lines and we try to research the one that describes our points better (minimum error!) b m -
How do they “learn”? This one cannot be the one,
error is too big! -
How do they “learn”? This one is much better! Y
= 3.123 x + 7.765 3.123 and 7.765 are our model’s weights and contain all the knowledge that our data have. They can be used to predict the future (in 2D!) -
text Userna me Country Country IP Text Target crypto_ maniac
ES US Invest in ETH to make $$$ Bad (1) crypto_ maniac ES US Paid a coffee 10$ Good (0) massibe lloni UK JP Such a sunny day Good (0) username country -
text username country Knowing where the plane is allows us
to say with a certain level of certainty (eg. 80%) that this post is bad! ax + by + cz + d = 0 -
ML History Reality good 0.25 bad 0.80 The machine learning
model is trained on a history of bad content and good content and tries to mimic the behavior of human reviewers/moderators in order to autonomously take decisions on this task. -
Machine Learning solutions Completely data driven, no discretionality Probabilistic outcome
- allows flexibility Requires lots of good data to train on High expertise to design and maintain Easy to maintain and improve - centralised Not reactive to changes in behaviors -
✅ All good! ✅ All good! ✅ All good! ✅
All good! ✅ All good! ❌ Block ✅ All good! ✅ All good! ✅ All good! ll good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ✅ All good! ML -
Tech Crunch In testing, Bumble found that the tool was
able to automatically block 95% of accounts that were identified as spam or scam accounts. Within the first two months of testing the tool, Bumble saw user reports of spam, scams and fake accounts reduced by 45%. Deception Detector operates alongside Bumble’s human moderation team. -
Customized for Lorem Ipsum LLC Thank you! Massimo Belloni -
October 2024 (Barcelona, ES) Masterclass - Data Analytics Bachelor in International Management