How a tech company created an intelligent system for detecting Pix fraud using Machine Learning.
- Marcelo Firpo
- 5 days ago
- 6 min read
Intelligent monitoring Pix transaction Fraud detection without relying on labeled data Real-time inference. with response in milliseconds

AI-generated summary:
In response to the rise in fraud in the Pix instant payment system, a technology company specializing in banking software, with support from BlueMetrics, implemented a solution based on unsupervised machine learning to detect anomalies in real time. Without relying on labeled data, the system uses clustering techniques to understand the standard behavior of each account and identify suspicious transactions with precision and speed, processing each operation in milliseconds without impacting Pix's response time.
Overview
The advancement of the instant payment system in Brazil, Pix, has brought unprecedented speed to users and businesses, quickly establishing itself as one of the main means of transfer in the country. However, this transformation has also opened space for the emergence of new forms of fraud, increasingly sophisticated and difficult to detect using traditional methods.
Faced with this challenging scenario, a banking software provider decided to innovate and offer its clients, banks and fintechs, a new layer of security based on artificial intelligence. The goal was clear: to ensure that fraud could be identified accurately and in advance, without compromising transaction response times, a critical factor in the Pix ecosystem.
The great challenge lay precisely in balancing performance and intelligence: how to detect fraud in real time, even without having a labeled history of previous cases (a common scenario in financial institutions)? The answer required an innovative approach, capable of learning from account behavior and reacting quickly to unusual patterns.
Market context:
Accelerated growth of Pix and digital banking.
Increase in real-time fraud attempts
High demands for performance and security in transactions.
Problem: How can you achieve millisecond precision without labeled data?
Pix imposes a maximum transaction completion time of 40 seconds. This means that any anti-fraud analysis needs to be extremely fast, efficient, and, above all, seamlessly integrated into the operation. To make the challenge even greater, the company lacked a dataset labeled with examples of fraud, a common scenario in the banking sector, where fraud is often not documented with the detail necessary for supervised model training.
Furthermore, each bank account exhibits unique behavioral patterns, which vary according to the type of client (individual or legal entity), transaction profile, days and times of operation, among other factors. In this context, the use of fixed rules simply would not be able to capture all the nuances and exceptions, and could even generate false positives or miss suspicious transactions.
It was necessary to adopt an intelligent approach, capable of learning from data and continuously adapting to different usage profiles. “This is exactly the type of challenge that motivates us here at BlueMetrics: it’s strategic for the client and has the potential to generate concrete and measurable results even in the short term,” says Gabriel Casara, CGO of BlueMetrics. “With a well-designed solution, it’s possible to combine intelligence and agility without sacrificing reliability.”
Main challenges:
Operational limitations:
Impossibility of applying fixed rules to varying customer profiles.
Difficulty in responding to the behavioral complexity of accounts.
Lack of an intelligent system capable of operating in real time.
Business limitations:
Risk of financial losses due to lack of prompt prevention.
Inability to offer protection as a competitive advantage.
Lack of clear metrics to detect anomalies by customer or cluster.
Technological limitations:
Lack of adaptive models for new transaction profiles.
Lack of fast inference without compromising Pix's processing time.
Absence of an unsupervised solution trained based on real-world behavior.
The solution: anomaly detection with unsupervised machine learning

With the support of BlueMetrics, the company implemented an unsupervised machine learning model, specifically aimed at identifying behavioral anomalies in high-volume transaction environments. The lack of labeled data required a clustering- based approach, in which the system autonomously learns the typical movement patterns of each account, considering variables such as frequency, value, and time of transactions, and then compares each new operation with this history, measuring its statistical "distance" from the expected behavior.
This behavior-driven architecture was essential for capturing subtle, yet potentially fraud-indicative, deviations without relying on fixed rules or pre-set lists of exceptions.
The solution was built using native AWS technologies, ensuring scalability, security, and high availability, and incorporated real-time inference mechanisms that allow transactions to be classified in milliseconds. Each transaction is automatically analyzed and receives a percentage risk score, enabling immediate decisions. All this without compromising the response time required by the Central Bank for Pix settlement.
This speed, combined with the statistical precision of the model, allowed the company to offer its bank and fintech clients a significant competitive advantage: an effective, discreet security layer that is fully integrated into the user journey.
Main components:
Unsupervised machine learning model
Clustering techniques for behavioral analysis by account
Real-time inference with Amazon SageMaker
Technological differentiators:
Solution based on a 100% cloud architecture (AWS)
Anomaly detection without the need for labeled data.
Response time less than 1 second
Immediate benefits:
Identifying fraud before transaction completion.
Capacity for continuous adaptation to new patterns of behavior.
Reducing financial losses and strengthening confidence in the system.
Want to see GenAI and Machine Learning solutions
making a difference in your company?
Results:
The system began identifying suspicious transactions in less than 1 second, allowing for real-time alerts—even before the transaction was completed—and giving partner institutions the chance to act preventively. This ultra-fast response was crucial for protecting users and maintaining the integrity of the system, especially in a context of exponential growth of Pix.
In simulations using historical data, it was estimated that the feature would have prevented up to R$ 1.5 million in losses, proving its potential for a direct impact on clients' financial results.
But the benefits go beyond mitigating losses. The solution added strategic value to the portfolio of the banking software development company, which now offers not only a management tool, but also an intelligent and proactive security infrastructure.
The new feature has enhanced the perceived value of the platform, increasing its competitiveness in the market and reinforcing the brand's positioning as a benchmark in innovation and anti-fraud technology within the Pix system. The combination of technical performance and concrete results has solidified the functionality as a true competitive differentiator.
Gabriel Casara reinforces: “It’s very rewarding when we can deliver solutions that generate real and immediate value for the client, solving concrete problems with a direct impact on results. That’s exactly the kind of challenge that drives us.”
Impacts on operations:
Automated identification of suspicious transactions in milliseconds.
Reduce financial losses with real-time fraud alerts.
Strengthening the value proposition of banking software with a new layer of security.
Technological advancement and integration:
Implementation of an unsupervised model adapted to different customer profiles.
Transaction processing with real-time inference
Seamless integration with banking infrastructure without compromising Pix's timeline.
Technologies used
The solution was designed using several AWS technologies, including:
AWS Services
Sagemaker
S3
Languages, Libraries and Frameworks
Python
Conclusion:
In this case, artificial intelligence was not just an ally: it was the true engine of innovation. By combining unsupervised machine learning with a robust cloud architecture, the company was able to develop a solution that meets the most critical requirements of the financial sector: accuracy, speed, and scalability. With the ability to identify suspicious transactions in milliseconds and a potential prevention rate that could have avoided up to R$1.5 million in fraud, the functionality goes far beyond an extra layer of security.
It significantly improves the user experience, protects millions in assets, and strengthens the developer company's core product, which now stands out in the market for offering an intelligent, real-time anti-fraud solution.
More than just solving a technical problem, the application of AI here transformed an operational bottleneck into a strategic asset, and that's what makes this type of innovation so valuable: its ability to transform complexity into a concrete competitive advantage.
How about creating a case study like this for your company? Let's schedule a call?
Learn about some Use Cases .
About BlueMetrics
BlueMetrics was founded in 2016 and has already delivered over 200 successful projects in the areas of Data & Analytics, GenAI, and Machine Learning for more than 90 companies in the United States, Brazil, Argentina, Colombia, and Mexico. It employs a proprietary project management methodology, blue4AI, and a multidisciplinary team focused on delivering solutions to real-world business challenges.



Comments