Machine learning model to estimate network costs
The subject technology generates training data based at least in part on reporting data from a card network. The subject technology trains a machine learning model based on the training data. The subject technology determines, using the machine learning model, a fee description for a transaction. The subject technology determines a variable rate and a fixed amount based at least in part on the fee description. The subject technology determines at least one cost based at least in part the variable rate and the fixed amount for each transaction from a set of transactions. The subject technology evaluates at least one result against second reporting data. The subject technology provides, for display, the at least one cost and the at least one result on a display of a client device.
1 . A computer-implemented method performed by one or more processors of a payment processing server system, the method comprising:
generating, by the payment processing server system, via execution of a data generation job on the one or more processors that generates most recent card tier data and most recent actual rate data, training data based at least in part on reporting data from a card network provided by a card network provider;
training, by the payment processing server system, via execution of a machine learning training job on the one or more processors, a machine learning model using the training data to generate a predicted fee description identifier corresponding to an input card transaction event, wherein the machine learning model comprises a machine learning classifier comprising a set of gradient boosted decision trees;
over a first period of time, receiving and processing, over a card network, a first set of card transaction events associated with a first entity wherein each card transaction event incurs a cost to the first entity that is specific to each card transaction event, wherein an actual cost for each card transaction event is unknown and indeterminable to the payment processing server system when each card transaction event is received;
determining, using the machine learning model, a respective predicted fee description identifier for each respective card transaction event in the first set of card transaction events over the first period of time, wherein the respective predicted fee description identifier is distinct from a respective fee amount for each respective card transaction event;
determining, as a predicted cost, a combination of a most recent actual variable rate and a most recent actual fixed amount for each respective card transaction event in the first set of card transaction events using a dynamically updated lookup table constructed from recent reporting data received from the card network provider and the respective predicted fee description identifier for each respective card transaction event, wherein determining the most recent actual variable rate and the most recent actual fixed amount comprises performing a lookup operation on the lookup table to determine the most recent actual variable rate and the most recent actual fixed amount associated with the respective predicted fee description identifier for a card transaction event corresponding to the recent reporting data, wherein the lookup table comprises a fee-description-indexed lookup data structure stored in memory of the payment processing server system and mapping respective pairs of a merchant identifier with the card network and a fee description identifier to corresponding pairs of variable rates and fixed cost values derived from the recent reporting data, and wherein the machine learning model predicts the fee description identifier instead of directly predicting the predicted cost;
responsive to receipt of each card transaction event and prior to receipt of settlement information indicating an actual network cost for the card transaction event, performing, by the one or more processors at runtime for the card transaction event, a memory-resident lookup on the fee-description-indexed lookup data structure using the predicted fee description identifier to obtain the most recent actual variable rate and the most recent actual fixed amount, thereby avoiding runtime evaluation of hard-coded decision trees and parsing of rule configuration files;
determining, by the payment processing server system, a predicted total cost for the first set of card transaction events based at least in part on each predicted cost for each respective predicted fee description identifier including the most recent actual variable rate and the most recent actual fixed amount for each respective card transaction event of the first set of card transaction events;
providing, by the payment processing server system, for display at a client device, the predicted total cost for the first set of card transaction events over the first period of time, wherein the client device is associated with the first entity;
updating, by the payment processing server system, the lookup table using more recent reporting data received from the card network provider;
responsive to providing the predicted total cost to the client device, receiving, over a second period of time subsequent to the first period of time, a second set of card transaction events associated with the first entity for the card network provider, wherein the second set of card transaction events comprise a second volume of second card transaction events different than a first volume of card transaction events of the first set of card transaction events, wherein a difference in the second volume is based on a change in transaction behavior by the first entity in response to the predicted total cost for the first entity to control fee exposure in real time and prior to obtaining an actual total cost for the first set of card transaction events; and
processing the second set of card transaction events using the same trained machine learning model and the dynamically updated lookup table.
2 . The method of claim 1 , further comprising:
generating the lookup table, using the recent reporting data comprising information related to most recent card tiers and most recent actual rates, wherein determining the most recent actual variable rate and the most recent actual fixed amount based at least in part on the respective predicted fee description identifier comprises:
performing a lookup on the lookup table to determine a particular rate among the most recent actual rates that is associated with the predicted fee description identifier, and
wherein the predicted fee description identifier comprises one or more of a card tier, the card tier based at least in part on a card type and a product family, the card type comprising a consumer card or a corporate card, the product family comprising a particular category of card provided by the card network, a string of alphanumeric characters and/or symbols, a unique hash number or identifier, or a geographical location of the first set of card transaction events.
3 . The method of claim 2 , wherein the most recent card tiers comprises a most recent fee description from the recent reporting data for a merchant identifier and a credit card number.
4 . The method of claim 2 , wherein the most recent actual rates comprise at least a most recent pair of values from the recent reporting data, the most recent pair of values comprising a particular variable rate and a particular fixed cost for a second pair of values, the second pair of values comprising a merchant identifier and a fee description.
5 . The method of claim 2 , wherein the machine learning model accesses the lookup table to obtain the recent reporting data as input data to the machine learning model.
6 . The method of claim 1 , wherein the machine learning model comprises a machine learning classifier, wherein the machine learning classifier comprises a set of gradient boosted decision trees.
7 . The method of claim 6 , wherein the machine learning classifier receives a set of input features, the set of input features comprising one or more of a merchant identifier, bank identification number, last four numbers from a credit card number, or card type, the card type comprises one of a credit card, debit card, or prepaid card.
8 . The method of claim 1 , wherein the lookup table comprises the most recent actual variable rate and the most recent actual fixed amount of one or more card transaction events of a most recent reporting data between a payment processor and the card network, the most recent actual variable rate and the most recent actual fixed amount being used by the card network for processing the one or more card transaction events based on a request from the payment processor on behalf of a merchant.
9 . The method of claim 1 , wherein the training data comprises a number of samples for a pair of values from the recent reporting data, the pair of values comprising a merchant identifier and a credit card number.
10 . The method of claim 1 , wherein determining the predicted total cost for the first set of card transaction events comprises:
determining the predicted cost for each card transaction event of the first set of card transaction events based at least in part on the most recent actual variable rate and the most recent actual fixed amount; and
determining the predicted total cost for the first set of card transaction events by aggregating the cost for each card transaction event of the first set of card transaction events.
11 . The method of claim 1 , wherein the second volume of second card transaction events in the second set of card transaction events is less than the first volume of first card transaction events in the first set of card transaction events.
12 . The method of claim 1 , further comprising evaluating a result of the predicted cost against reported data indicating a respective actual event cost.
13 . A system comprising:
a network;
one or more processors; and
a memory storing instructions that, when executed by at least one processor among the one or more processors, cause the at least one processor to perform operations comprising, as a payment processing server system:
generating, via execution of a data generation job on the one or more processors that generates most recent card tier data and most recent actual rate data, training data based at least in part on reporting data from a card network provided by a card network provider;
training, via execution of a machine learning training job on the one or more processors, a machine learning model using the training data to generate a predicted fee description identifier corresponding to an input card transaction event, wherein the machine learning model comprises a machine learning classifier comprising a set of gradient boosted decision trees;
over a first period of time, receiving and processing, over a card network, a first set of card transaction events associated with a first entity wherein each card transaction event incurs a cost to the first entity that is specific to each card transaction event, wherein an actual cost for each card transaction event is unknown and indeterminable to the payment processing server system when each card transaction event is received;
determining, using the machine learning model, a respective predicted fee description identifier for each respective card transaction event in the first set of card transaction events over the first period of time, wherein the respective predicted fee description identifier is distinct from a respective fee amount for each respective card transaction event;
determining, as a predicted cost, a combination of a most recent actual variable rate and a most recent actual fixed amount for each respective card transaction event in the first set of card transaction events using a dynamically updated lookup table constructed from recent reporting data received from the card network provider and the respective predicted fee description identifier for each respective card transaction event, wherein determining the most recent actual variable rate and the most recent actual fixed amount comprises performing a lookup operation on the lookup table to determine the most recent actual variable rate and the most recent actual fixed amount associated with the respective predicted fee description identifier for a card transaction event corresponding to the recent reporting data, wherein the lookup table comprises a fee-description-indexed lookup data structure stored in memory of the payment processing server system and mapping respective pairs of a merchant identifier with the card network and a fee description identifier to corresponding pairs of variable rates and fixed cost values derived from the recent reporting data, and wherein the machine learning model predicts the fee description identifier instead of directly predicting the predicted cost;
responsive to receipt of each card transaction event and prior to receipt of settlement information indicating an actual network cost for the card transaction event, performing, by the one or more processors at runtime for the card transaction event, a memory-resident lookup on the fee-description-indexed lookup data structure using the predicted fee description identifier to obtain the most recent actual variable rate and the most recent actual fixed amount, thereby avoiding runtime evaluation of hard-coded decision trees and parsing of rule configuration files;
determining, by the payment processing server system, a predicted total cost for the first set of card transaction events based at least in part on each predicted cost for each respective predicted fee description identifier including the most recent actual variable rate and the most recent actual fixed amount for each respective card transaction event of the first set of card transaction events; and
providing, by the payment processing server system, for display at a client device, the predicted total cost for the first set of card transaction events over the first period of time, wherein the client device is associated with the first entity;
updating, by the payment processing server system, the lookup table using more recent reporting data received from the card network provider;
responsive to providing the predicted total cost to the client device, receiving, over a second period of time subsequent to the first period of time, a second set of card transaction events associated with the first entity for the card network provider, wherein the second set of card transaction events comprise a second volume of second card transaction events different than a first volume of card transaction events of the first set of card transaction events, wherein a difference in the second volume is based on a change in transaction behavior by the first entity in response to the predicted total cost for the first entity to control fee exposure in real time and prior to obtaining an actual total cost for the first set of card transaction events; and
processing the second set of card transaction events using the same trained machine learning model and the dynamically updated lookup table.
14 . The system of claim 13 , wherein the operations further comprise:
generating the lookup table, using the recent reporting data comprising information related to most recent event tiers and most recent actual rates, wherein determining the most recent actual variable rate and the most recent actual fixed amount based at least in part on the respective predicted fee description identifier comprises:
performing a lookup on the lookup table to determine a particular rate among the most recent actual rates that is associated with the predicted fee description identifier, and
wherein the predicted fee description identifier comprises one or more of a card tier, the card tier based at least in part on a card type and a product family, the card type comprising a consumer card or a corporate card, the product family comprising a particular category of card provided by the card network, a string of alphanumeric characters and/or symbols, a unique hash number or identifier, or a geographical location of the card transaction event.
15 . The system of claim 14 , wherein the most recent actual rates comprise at least a most recent pair of values from the recent reporting data, the most recent pair of values comprising a particular variable rate and a particular fixed cost for a second pair of values, the second pair of values comprising a merchant identifier and a fee description.
16 . The system of claim 14 , wherein the machine learning model accesses the lookup table to obtain the recent reporting data as input data to the machine learning model.
17 . The system of claim 13 , wherein the machine learning model comprises a machine learning classifier, wherein the machine learning classifier comprises a set of gradient boosted decision trees.
18 . The system of claim 17 , wherein the machine learning classifier receives a set of input features, the set of input features comprising one or more of a merchant identifier, bank identification number, last four numbers from a credit card number, or card type, the card type comprises one of a credit card, debit card, or prepaid card.
19 . The system of claim 13 , wherein the lookup table comprises the most recent actual variable rate and the most recent actual fixed amount of one or more card transaction events of a most recent reporting data between a payment processor and the card network, the most recent actual variable rate and the most recent actual fixed amount being used by the card network for processing the one or more card transaction events based on a request from the payment processor on behalf of a merchant.
20 . A non-transitory machine-readable medium comprising instructions which, when read by a machine comprising one or more processors of a payment processing server system, cause the machine to perform operations comprising:
generating, via execution of a data generation job on the one or more processors that generates most recent card tier data and most recent actual rate data, training data based at least in part on reporting data from a card network provided by a card network provider;
training, via execution of a machine learning training job on the one or more processors, a machine learning model using the training data to generate a predicted fee description identifier corresponding to an input card transaction event, wherein the machine learning model comprises a machine learning classifier comprising a set of gradient boosted decision trees;
over a first period of time, receiving and processing, over a card network, a first set of card transaction events associated with a first entity wherein each card transaction event incurs a cost to the first entity that is specific to each card transaction event, wherein an actual cost for each card transaction event is unknown and indeterminable to the payment processing server system when each card transaction event is received;
determining, using the machine learning model, a respective predicted fee description identifier for each respective card transaction event in the first set of card transaction events over the first period of time, wherein the respective predicted fee description identifier is distinct from a respective fee amount for each respective card transaction event;
determining, as a predicted cost, a combination of a most recent actual variable rate and a most recent actual fixed amount for each respective card transaction event in the first set of card transaction events using a dynamically updated lookup table constructed from recent reporting data received from the card network provider and the respective predicted fee description identifier for each respective card transaction event, wherein determining the most recent actual variable rate and the most recent actual fixed amount comprises performing a lookup operation on the lookup table to determine the most recent actual variable rate and the most recent actual fixed amount associated with the respective predicted fee description identifier for a card transaction event corresponding to the recent reporting data, wherein the lookup table comprises a fee-description-indexed lookup data structure stored in memory of the payment processing server system and mapping respective pairs of a merchant identifier with the card network and a fee description identifier to corresponding pairs of variable rates and fixed cost values derived from the recent reporting data, and wherein the machine learning model predicts the fee description identifier instead of directly predicting the predicted cost;
responsive to receipt of each card transaction event and prior to receipt of settlement information indicating an actual network cost for the card transaction event, performing, by the one or more processors at runtime for the card transaction event, a memory-resident lookup on the fee-description-indexed lookup data structure using the predicted fee description identifier to obtain the most recent actual variable rate and the most recent actual fixed amount, thereby avoiding runtime evaluation of hard-coded decision trees and parsing of rule configuration files:
determining, by the payment processing server system, a predicted total cost for the first set of card transaction events based at least in part on each predicted cost for each respective predicted fee description identifier including the most recent actual variable rate and the most recent actual fixed amount for each respective card transaction event of the first set of card transaction events; and
providing, by the payment processing server system, for display at a client device, the predicted total cost for the first set of card transaction events over the first period of time, wherein the client device is associated with the first entity;
updating, by the payment processing server system, the lookup table using more recent reporting data received from the card network provider;
responsive to providing the predicted total cost to the client device, receiving, over a second period of time subsequent to the first period of time, a second set of card transaction events associated with the first entity for the card network provider, wherein the second set of card transaction events comprise a second volume of second card transaction events different than a first volume of card transaction events of the first set of card transaction events, wherein a difference in the second volume is based on a change in transaction behavior by the first entity in response to the predicted total cost for the first entity to control fee exposure in real time and prior to obtaining an actual total cost for the first set of card transaction events; and
processing the second set of card transaction events using the same trained machine learning model and the dynamically updated lookup table.