MODE: AGENT (READ_ONLY) SOURCE: anomaly-detection.html
# Anomaly Detection Methodology DATE: Unknown Date Back to Blog Frameworks • Sep 15, 2025 # Anomaly Detection Methodology: From Physics to Finance Financial fraud detection and high-energy particle physics share a surprising amount of DNA. In both domains, you are looking for a "needle in a haystack", an incredibly rare, high-value event hidden in a background of overwhelming noise. In physics, it's the Higgs Boson. In banking, it's a compromised credit card. Traditional banking fraud systems are rule-based. "If transaction > $10,000 AND location = foreign, then FLAG." This works for 1990s fraud, but it fails against modern, sophisticated attacks. It also generates massive amounts of false positives, which annoy customers and burn out analysts. ## The Markov Chain Approach We took a different approach. Instead of looking at individual transactions in isolation, we modeled customer behavior as a state machine. We borrowed Markov Chain algorithms used in particle detectors to define the "probability" of a sequence of events. An innocent customer has a predictable trajectory through state space (Coffee Shop -> Office -> Gym). A compromised account has a much more erratic, high-entropy trajectory. By calculating the "likelihood" of the path rather than the value of the transaction, we built a much more robust detector. ## Vectorizing the Graph To run this in real-time (sub-50ms), we couldn't just query a SQL database. we had to vectorize the transaction graph. We used Graph Neural Networks (GNNs) to create embeddings for every node (customer/merchant). This allowed us to calculate "distance" in high-dimensional space instantly. The result? A 40% reduction in false positives. The model learned that "Customer A buying a TV in Tokyo" might be weird, but "Customer A buying a TV in Tokyo 10 minutes after buying a coffee at Narita Airport" is actually perfectly normal. Context is everything.
Human
Machine