Detecting unwanted bias
Ethical bias testing checks your engagement policies for unwanted bias. That is, you can test if your conditions discriminate based on age, gender, ethnicity, or any other attributes specific to your business scenario.
Video
Transcript
This demo will show you how to run an ethical bias simulation and identify any unwanted bias in the engagement policy conditions.
U+, a retail bank, recently updated their engagement policy conditions to present credit card offers to qualified customers. Now they would like to run an ethical bias simulation to ensure there is no unwanted bias based on age or gender before they push the changes to the live production environment.
This is the Pega Customer Decision Hub™ portal.
To create a simulation, first configure the ethical bias policy. This policy will include the bias fields and threshold. You can select any property from your customer class. In this case, you will use the age and gender properties for the test, which are the most commonly used properties for bias testing. The age property value is a number. In the Add bias field window, specify it as an ordinal number. Age is an example of an ordinal number.
Next, add gender as a bias field.
Now, on the Bias threshold tab, review and configure the bias threshold settings for each property you selected. This configuration is done at the business issue level. This means, for every business issue, you can decide how much bias to allow. For instance, for the risk issue, you might want to disallow any bias, whereas for sales, you might allow some bias, if you designed a special offer for a specific age category or a specific gender. The bias threshold measurement depends on the type of field that you select. By default, the threshold is set for no detection for these fields.
In this case, the bank does not want to discriminate on age, so select the appropriate threshold value.
The bank also does not want to discriminate on gender, so select the appropriate threshold value. Save the changes.
Navigate to the Simulations landing page to create and run an Ethical bias simulation.
On the Simulation Creation page, select the top-level strategy on which you would like to run the simulation. Then, select the input population on which you want to execute the simulation.
Now, rename the simulation. This will help you easily identify specific simulation runs.
Note that the simulation results are output to the Insights data set. This is an internal dataset where the results will be available for an hour by default.
The ethical bias simulation has two bias reports automatically available as output. The results can be examined post simulation run.
Run the simulation. Once the run is complete, there will be an indication if any unwanted bias is identified. In this scenario, although business did not want any bias, it seems some bias has been detected.
Open the generated reports and view the information in detail to understand where the bias was detected. You can sort the report in the bias detected column. Notice that there is bias detected on age. You can check the Bias value against the Confidence interval to check if the bias value is within the bias threshold range.
Navigate to Next-Best-Action Designer to view the engagement policy conditions. Note that there is an eligibility condition that uses age. Credit cards are valid only for customers with an age greater than 18. This is a hard eligibility rule that cannot be ignored. It is likely that bias has been detected due to this condition.
Based on the bank’s policies and regulations, you must review the bias threshold and decide how much bias the business will allow.
To modify the policy, open the Ethical Bias policy. Due to the eligibility condition, which cannot be ignored, business decided to allow a maximum bias of 0.1 Gini. So, increase the bias threshold, and re-run the same ethical bias simulation.
Since the age bias threshold was increased, no bias should be detected.
Now, let’s run an ethical bias simulation at the Trigger_NBA_Sales_CreditCards strategy level. This strategy includes engagement policy conditions, arbitration, adaptive analytics, constraints, and treatments and channels processing.
Note that bias is detected on gender. However, it is at the CreditCards group level, with only engagement policies in scope, thus, there was no bias.
Navigate to Prediction studio to view the Web Click Through Rate adaptive model.
Now, open the Premier rewards card model report to view the predictors.
Notice that gender is one of the top predictors. As gender is a predictor, and the model is learning constantly, bias is detected even though there is no engagement policy condition on gender. Open the predictor to view the customer responses. Here you can see that there is a clear difference in the number of times the offer was presented to male customers versus female customers.
If you do not want the adaptive model to learn based on gender, ensure gender is not included as a predictor.
This demo has concluded. What did it show you?
- How to configure an ethical bias policy
- How to run an ethical bias simulation
- How to view the auto-generated ethical bias reports to understand the bias threshold deviation
This Topic is available in the following Module:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?