Longitudinal Bias Auditing for Sequential Decision Systems

Tools for auditing how group disparities evolve in repeated binary decision systems. Computes group-specific decision-rate trajectories, standardized disparities analogous to the standardized mean difference (Cohen, 1988, ISBN:0-8058-0283-5), cumulative bias burden, Markov-based recovery and retention gaps, and an index contrasting the two. Decomposes the change in a between-group gap from one occasion to the next into the prior gap carried forward, recovery and retention contributions, and terms for change in which units have recorded decisions, using symmetric rate decomposition (Kitagawa, 1955, ). The decomposition is an exact accounting identity on the recorded data. Covariate-adjusted trajectories are estimated via logistic regression, generalized additive models (Wood, 2017, ), or generalized linear mixed models (Bates, 2015, ). A cluster bootstrap (Cameron, 2008, ) gives intervals for every reported component, and a simulator generates panels with known transition probabilities and selective observation.


AIBias

Longitudinal Bias Auditing for Sequential Decision Systems

CRAN status License: MIT


Why AIBias?

Standard fairness tools ask: "Is there a disparity at this moment?"

AIBias asks: "How does a disparity evolve over repeated decisions, and why did it change from one decision to the next?"

In repeated decision systems (loan renewals, assessment grading, parole reviews, benefit recertification) the same units are decided on again and again. A gap between groups at one occasion can carry forward, be regenerated by unequal recovery and retention, or appear to move only because different units have a recorded decision. AIBias separates these.

Question Function Key quantity
How does the gap evolve? aib_describe() $B_{g,r}(t)$, cumulative burden
Do groups differ after a denial or an approval? aib_transition() recovery and retention gaps
Do the two conditional gaps differ? aib_amplify() $A_{g,r}(t)$
Why did the gap change? aib_decompose() decay, recovery, retention, sample change
How uncertain is each of these? aib_bootstrap() cluster-bootstrap intervals

Installation

install.packages("AIBias")

# development version
remotes::install_github("subirhait/AIBias")

Quick Start

library(AIBias)
data(lending_panel)

result <- aib_audit(
  lending_panel,
  id        = "applicant_id",
  time      = "year",
  group     = "race",
  decision  = "approved",
  ref_group = "White",
  bootstrap = TRUE, B = 500, seed = 42
)

summary(result)
plot(result, type = "trajectory")
plot(result, type = "decomposition")

Why did the gap change?

For consecutive occasions $t-1$ and $t$, take the units with a recorded decision at both (paired units). Let $\bar q$ be the two groups' average share favorable at $t-1$, $\bar s$ their average retention-minus-recovery rate, and $\Delta$ mean focal minus reference. Then, exactly,

$$\Delta_t - \Delta_{t-1} = (\bar s - 1)\Delta^P_{t-1}

  • (1-\bar q)\Delta p_{01} + \bar q,\Delta p_{11} + (S_t - S_{t-1}),$$

where $\Delta^P_{t-1}$ is the prior gap among paired units and $S_t$, $S_{t-1}$ are the differences between the full observed gap and the paired gap at each occasion. The terms are the decay of the prior gap, the recovery contribution, the retention contribution and the change in who has a recorded decision. The identity holds for any recorded data.

A zero amplification index does not mean a stable gap. With both groups at 50%, reference recovery/retention 0.2/0.8 and focal 0.1/0.7, the index is zero while the gap goes 0, −0.10, −0.16:

sim <- aib_simulate(n = 20000, n_times = 3, groups = c("ref", "focal"),
                    init = c(0.5, 0.5), p01 = c(0.2, 0.1), p11 = c(0.8, 0.7),
                    seed = 1)
obj <- aib_build(sim, "id", "time", "group", "decision")
obj <- aib_audit(obj, ref_group = "ref")
obj$amplification$index
obj$decomposition$steps

Missing decisions and sparse cells

  • Transitions use the immediately preceding scheduled occasion by default (lag = "scheduled"). lag = "recorded" reproduces AIBias 0.1.1.
  • A data row with NA as the decision marks a unit that was present but has no recorded decision. aib_decompose() reports units present, units with a decision and paired units at each step.
  • Steps with an empty prior-state cell are marked supported = FALSE; steps with a cell below min_cell are marked sparse = TRUE.

Citation

citation("AIBias")

Author

Subir Hait, Michigan State University, haitsubi@msu.edu

License

MIT License. See LICENSE for details.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("AIBias")

0.2.0 by Subir Hait, 2 days ago


https://github.com/subirhait/AIBias


Report a bug at https://github.com/subirhait/AIBias/issues


Browse source code at https://github.com/cran/AIBias


Authors: Subir Hait [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, tidyr, ggplot2, rlang, cli, purrr, tibble

Suggests mgcv, lme4, boot, knitr, rmarkdown, testthat


See at CRAN