This document describes detecting fraudulent and anomalous behavior of payment cards. A process includes extracting characteristics from a transaction dataset to generate words and documents associated with payment cards, executing a topic model to obtain the respective probabilities of appearance of a card in each latent archetype, and dividing the card dataset into a plurality of subsets based upon the archetype probability distributions and clustering techniques. The formed subsets are utilized to obtain archetype cluster distribution(s) for each merchant in the dataset. The archetypes are investigated where misalignment with major clusters of archetypes for a merchant may be related to fraudulent transactions. Calculated transaction risks are associated with global archetype cluster membership, merchant-specific archetype cluster membership, and recurrence list positions of transaction details.