Skip to content
Data and Algorithms

Gambling Addiction Detection Algorithms: From Behavioural Data to Risk Decisions

A session-activity dashboard with a review signal.
A session-activity dashboard with a review signal.

Gambling addiction detection algorithms examine betting, deposits, play sessions and use of player-protection tools for signs of gambling harm. They produce risk estimates, not clinical diagnoses. An alert should point to observable behaviour, support a closer assessment and lead to an appropriate harm-minimisation response.

For a New Zealand operator, timing and context matter more than a spending leaderboard. A high-spending customer is not automatically experiencing harm; repeated deposits after losses may raise concern even when the amounts are modest. No statistical score establishes gambling disorder.

What are gambling addiction detection algorithms designed to detect?

Risk identification describes current patterns associated with harm. Early warning forecasts a later adverse outcome from information available before it occurs. Clinical assessment evaluates symptoms and impairment through appropriate professional processes. An account-level machine-learning model serves the first two purposes, not the third.

A model's label determines what its score means. The New Zealand Ministry of Health identifies two relevant assessment tools: the Problem Gambling Severity Index (PGSI), a nine-item measure of gambling-related problems, and the Short Gambling Harm Screen (SGHS), which measures experienced harms. PGSI categories run from no risk to low risk, moderate risk and problem gambling. Neither instrument, nor a transaction record, is equivalent to a clinical diagnosis under DSM-5-TR or ICD-11.

Platforms often label accounts using voluntary self-exclusion, account closure or contact with a safer-gambling team. These are easy to record yet weak substitutes for a direct harm measure. Someone in difficulty may never self-exclude; someone else may exclude themselves as a precaution. A classifier trained on this label predicts recorded self-exclusion, not addiction itself.

Specify the outcome and prediction horizon. “Probability of a documented harm-related assessment within the next 30 days” differs from “probability of a PGSI score of 8 or more”. A questionnaire referring to the previous 12 months cannot pinpoint when problems began. Risk should be tracked as a changing state, not assigned as a permanent customer trait.

Behavioural markers: what the data can and cannot reveal

Online platforms record timestamped stakes, settled payouts, deposits, withdrawals, game choices, logins, sessions and safer-gambling settings. Changes and combinations across these events often matter more than a single total. Among 1,743 online-casino players in Britain, Canada and Spain, frequent deposits within sessions, account depletion and self-exclusion behaviour helped predict self-reported problem gambling. That association needs testing in a New Zealand population.

Common feature families for account-based gambling risk detection
Feature familyExamples of measurable signalsInterpretation limit
Deposits and paymentsDeposit frequency, repeated top-ups within a session, declined deposits, rapid balance depletionA high deposit total does not reveal disposable income or hardship.
Betting intensityBets per active day, stake size, stake volatility, rapid increases in wageringHigh turnover can include repeated staking of earlier winnings.
Session behaviourSession duration, late-night play, short gaps between sessions, prolonged continuous activityShift work, accessibility needs and product design affect timing.
Loss-related behaviourFurther deposits after losses, rising stakes following losses, deterioration in net balanceLoss chasing is inferred from a sequence, not directly observed as a motive.
Protective-tool eventsDeposit-limit changes, time-outs, breaks-in-play, pop-up alerts, self-exclusionUsing a safety tool can be protective rather than evidence of disorder.
Customer interactionsRequests for support, disputes about money, expressed distress, loss-of-control languageText requires contextual interpretation and stronger privacy controls.
Personal trajectorySeven- and 30-day trends, deviations from an account's earlier baseline, bursts of extreme activityNew and infrequent players have too little history for stable baselines.

Two players each lose NZ$200 in a month. One follows a steady weekly routine. The other repeatedly deposits after losses and stays online longer than usual. The same loss figure conceals a much sharper change in behaviour on the second account. Neither account history reveals income, hardship or a diagnosis.

Define net gambling loss consistently: settled stakes minus settled payouts, with voids, refunds and bonuses handled under a documented rule. Deposits minus withdrawals measures cash movement, not necessarily gambling loss. Mixing pending and settled bets, counting gross stakes as losses or double-counting recycled winnings corrupts the features and the explanations attached to alerts.

Work involving Massey University and collaborators combined data mining, process mining and confirmatory statistics on records of about 91,000 fixed-odds gambling customers. Sequences and behavioural subgroups exposed relationships that aggregate spending can conceal. The findings concern that gambling setting; they do not establish performance for online casinos or every form of gambling in Aotearoa.

Which detection algorithms are suitable?

Start with an interpretable baseline. Label quality, event detail, review capacity and the consequences of false alerts should determine whether a more complex algorithm is worthwhile.

Algorithm families and their appropriate roles
ApproachBest fitPrincipal limitation
Rule-based alertsClear triggers such as repeated rapid deposits, limit-related events or urgent manual review criteriaFixed thresholds miss changing patterns and can over-flag legitimate activity.
Logistic regressionInterpretable supervised baseline with a defined outcome and modest feature setComplex interactions require deliberate feature engineering.
Random forest and gradient boostingTabular account and transaction features; nonlinear combinations; XGBoost or LightGBM modelsProbabilities may need calibration and individual alerts need explanation.
Clustering and anomaly detectionExploring unlabelled segments with k-means or unusual behaviour with Isolation ForestA cluster or anomaly is not an independently verified harm label.
Temporal and language modelsHidden Markov models, recurrent networks or transformers for sequences; fastText or BERT for support messagesHigher data, governance and validation burdens; language is sensitive to context.

Rules, supervised learning and unsupervised discovery solve different problems

Rules engines provide auditable triggers for immediate safeguards. Logistic regression offers an inspectable supervised baseline. XGBoost and other gradient-boosted trees capture interactions among deposit velocity, session duration and shifting stakes. A Swedish online-casino analysis used XGBoost with loss-chasing and net-balance features over short windows. That supports testing window length, not importing a Swedish accuracy figure into New Zealand. The underlying account-data analysis used its own population, labels and validation procedure.

Clustering can reveal behavioural groups where few customers have PGSI-linked labels. Calling a cluster “high risk” does not validate it: an independent harm measure is still needed. Otherwise, a system may reproduce the definition built into its own features. A two-stage clustering-and-prediction approach illustrates both the method and this problem.

Sequences matter when a player's activity changes sharply. A September 2026 framework combined heavy-tail-aware features, representation learning and hidden Markov models to track changing operational risk states. Performance varied across transactions, bets, sessions and payment streams, so data sources need separate evaluation. The framework also assessed fixed-capacity alert queues, a realistic constraint for safeguarding teams with limited review capacity.

Can natural language processing detect distress?

Support chats may contain disclosures about money pressure, urgency, guilt or loss of control. Natural language processing (NLP), text classification, sentiment analysis and contextual language models can triage these messages. An Italian operator–customer chat project used PGSI-linked conversations, a fastText classifier and linguistic markers to assign graded risk. Its language-specific design needs new labels, cultural review and testing before use in New Zealand English or te reo Māori.

Chat records warrant stronger safeguards than routine event telemetry. “I cannot withdraw” might signal a payment fault rather than gambling harm. A sentiment score can prompt human review; it should never be the sole basis for an irreversible restriction.

Where detection systems most often fail

  • Proxy-label bias: training only on self-exclusion or previously reviewed cases overlooks people who experience harm without contacting the operator.
  • Data leakage: future case notes, final settlement values or post-intervention events enter features that should have existed only before scoring.
  • False precision: a score of 0.83 is treated as an 83% probability without testing calibration against a clearly defined outcome.
  • Selection feedback: earlier alerts determine who receives human assessment, and later model training mistakes reviewed accounts for a representative sample.
  • Product and population transfer: sports-betting features, casino sessions and fixed-odds betting patterns are combined without testing their different event structures.
  • Incomplete visibility: the algorithm cannot observe financial strain, family effects or gambling on other platforms merely because it holds rich first-party data.
  • Automation without recourse: a consequential decision has no understandable explanation, correction pathway or responsible human owner.

A practical detection pipeline

1. Define a measurable target and a realistic time horizon

Decide first whether the task is present-risk triage or prospective warning. Record the outcome, who assigned its label, the interval between scoring and assessment, and the intended response. A historical PGSI survey does not, on its own, train a forecast of new harm. Keep observation and label dates separate.

2. Build an auditable event dataset

Keep pseudonymous customer identifiers and the source, type, timestamp and status of each event, including game category, stake, payout, deposit, withdrawal, session boundary and protective-tool use. Preserve immutable source records in event order. Standardise cross-currency amounts in NZD. Process timestamps in UTC; convert to New Zealand local time, with daylight-saving adjustments, when measuring local features such as overnight sessions.

An operator sees its own platform, not all lottery purchases, sports bets, gaming-machine sessions or offshore accounts belonging to a person. Account matching and external financial data require a lawful basis. Missing cross-platform activity is an observation gap, not evidence that a player is safe.

3. Engineer change-sensitive features

Build rolling seven-, 30- and 90-day windows from events available at each scoring time. Measure deposits per active day, repeated in-session top-ups, longest continuous session, stake volatility and deposits soon after losses. Add relative change from the player's earlier behaviour and extreme-event counts to capture bursts hidden by monthly averages. Mark sparse histories explicitly; do not interpret a new account's missing baseline as low risk.

4. Select labels without creating a circular model

PGSI and SGHS responses anchor different harm-related outcomes. Support reviews and self-exclusion provide operational labels, but their availability is selective. If a previous rules engine chose who received assessment, a new classifier trained only on those cases may inherit its selection bias. Record earlier flags, interventions and who was sent for review, rather than treating reviewed customers as the entire at-risk population.

5. Separate training from genuinely future observations

Train on earlier records and test on later ones. Prevent overlapping windows for one customer from leaking later outcomes across that split. Check the actual availability time of settlements, self-exclusion entries, case notes and retrospective reviews. A separate customer holdout or cross-operator evaluation tests generalisation, but neither replaces the chronological test.

6. Convert scores into review decisions

A probability such as P(harm-related outcome within 30 days | information available today) is useful only after calibration against that outcome. Set review thresholds around missed-harm costs, false alarms and staffing. Escalate documented urgent indicators promptly, with people responsible for consequential decisions. Record model version, feature window, explanation, reviewer decision and subsequent action.

7. Monitor behaviour after deployment

Monitor feature distributions, alert counts, calibration, missed cases, subgroup disparities and delay to review. Seasonality, game changes, regulatory shifts and customer turnover produce data drift or concept drift. A Canadian evaluation found shifts in gambling indicators between 2019 and 2022; adjusting thresholds restored earlier classification performance for the models tested. Temporal stability still required direct revalidation. A threshold that worked last year needs checking again.

How should detection accuracy be evaluated?

Accuracy hides failures when recorded harm outcomes are rare. A model that flags no accounts can score well while missing every relevant case. Ranking performance and threshold-level workload must be assessed together.

  • Recall (sensitivity): the proportion of reference-positive accounts identified. Low recall leaves more cases unflagged.
  • Precision (positive predictive value): the proportion of flagged accounts that meet the reference outcome. Low precision creates unnecessary reviews and reputational harm.
  • PR-AUC: the area under the precision–recall curve, useful for imbalanced labels and sensitive to outcome prevalence.
  • ROC-AUC: the ability to rank positive examples above negative ones; it does not describe the workload at a chosen alert threshold.
  • Calibration and Brier score: whether a stated probability resembles the observed rate of the defined outcome.
  • Lead time, subgroup performance and alerts per 1,000 accounts: whether the system offers a usable warning before the event and a manageable, equitable review workload.

Take an illustrative set of 1,000 accounts, including 50 reference-positive cases. A model that finds 40 of the 50 at 20% precision raises 200 alerts: 40 true positives, 160 false positives and 10 missed cases. Recall reaches 80%, but staff review five alerts per positive case found. These figures demonstrate the base-rate problem; they are not measured performance for a gambling system.

An analysis published in 2026 reported AUROC of roughly 0.74–0.75 for behavioural-only models of online sports and race betting. Limited self-report measures improved performance in that dataset. Those figures are not a universal accuracy guarantee. Casino and gaming-machine populations need their own validation and thresholds.

To compare models, match the outcome label, prediction horizon, population and evaluation protocol. Vendor scores, including behavioural-marker products such as Playtech's BetBuddy, cannot be compared fairly without class prevalence, validation details, thresholds and independent outcomes. A 2025 review of 31 academic studies and 11 commercial solutions found inconsistent outcome definitions, limited transparency and little evidence of reliable forecasts of future harm.

New Zealand's 2026 rules change the design requirements

As at November 2026, the Online Casino Gambling Act 2026 is in force; full operation of the licensed online-casino market is expected in 2027. The Department of Internal Affairs (DIA) sets out transitional arrangements for existing providers. Lotto NZ, TAB sports and racing betting, and land-based gaming machines operate under different arrangements. They should not be folded into one online-casino compliance model.

The Online Casino Gambling Regulations 2026 address collection and use of information to identify, assist and monitor problem gamblers, training for personnel and responses to reasonable grounds for concern. Regulation 11 calls for an explanation of the information behind that concern and details of support and safer-gambling tools. If signs persist and the applicable conditions are met, the operator must exclude the person. A numerical tier alone cannot satisfy those steps.

The Online Casino Gambling (Minimum Standards) 2026 cover time, deposit and spend limits, breaks-in-play, time-outs, pop-up alerts, self-exclusion checks and customer support. Scoring can help staff prioritise assessments around these protections. The framework does not mandate a specific machine-learning architecture or make a risk score sufficient grounds for exclusion.

Keep risk scoring, the recorded factual grounds for concern and the intervention decision distinct. Customers need an explanation grounded in actual events; reviewers need a traceable record and a way to correct erroneous alerts.

Privacy, fairness and Māori data considerations

Risk systems handle sensitive details about money, behaviour and vulnerability. The Office of the Privacy Commissioner states that the Privacy Act 2020 applies to AI used in New Zealand and recommends a Privacy Impact Assessment (PIA). The Information Privacy Principles (IPPs) address collection, accuracy, security, purpose, disclosure, access and correction. From 1 May 2026, IPP 3A adds notification duties for indirectly collected personal information, with exceptions.

Restrict access to individual risk profiles, set retention periods, document training-data provenance and keep harm-prevention signals out of personalised marketing. De-identification is not a blanket exemption where people can still be reidentified. External data, account matching and vendor-hosted models each need privacy and contractual scrutiny.

Removing protected attributes does not guarantee fairness: payment behaviour, location and digital access may still correlate with demographic or socioeconomic circumstances. Comparisons of fairness strategies in Canadian gambling data found trade-offs between group parity and calibration. In Aotearoa, gambling harm falls disproportionately on Māori and Pacific peoples. New Zealand public-health reporting documents unequal exposure; it gives no basis for automatically treating a person's ethnicity as a risk trigger.

Te Mana Raraunga's Māori data sovereignty principles emphasise authority, context, collective benefit and guardianship. Community partnership, lawful subgroup testing and human review are preferable to assuming a model is culturally neutral simply because ethnicity is absent from its input features.

Frequently asked questions

Can an algorithm diagnose gambling addiction?

No. Behavioural analytics assigns risk for a defined outcome; diagnosing gambling disorder requires clinical assessment. PGSI and SGHS capture harm-related evidence that deposit totals miss, but neither is a diagnosis by itself.

Is self-exclusion the best training label?

Self-exclusion is easy to record but misses people who never use it and includes others acting preventively. Use additional reference outcomes, independent reviews and prospective testing rather than treating that event as the whole definition of harm.

Can banking transactions identify someone with a gambling problem?

Bank transactions can identify some gambling payments if merchant classification and lawful access permit it. They rarely show individual wagers, sessions, payouts or limit-setting events. Spending cannot diagnose a person; combining bank and operator records also raises privacy and purpose-limitation issues.

How much history is needed for an early-warning model?

No fixed minimum works across products. Short windows capture deposit bursts; longer ones establish a personal baseline. Test seven-, 30- and 90-day windows against lead time, predictive performance and missing-data rates for the relevant New Zealand customers.

What distinguishes a reliable system from a high-scoring model?

A reliable system needs a defined outcome, leakage-safe local data, future-period testing, calibrated probabilities, fairness checks, manageable queues and a responsible reviewer. A high metric alone does not demonstrate that earlier signals led to appropriate intervention or reduced verified harm.

What should happen after an account is flagged?

A player check-in screen offering limits and a pause.
A player check-in screen offering limits and a pause.

Safeguarding teams need proportionate responses, not just more alerts. A small change in deposit frequency may call for monitoring or contextual review. Repeated top-ups during sessions, growing losses and an explicit expression of distress justify faster human assessment. Existing self-exclusion and legally required protections operate regardless of any predictive score.

Reviewers need the event sequence, changes from baseline, missing-data warnings, previous contact and an explanation of the score. SHAP can attribute numerical contributions to features, but it cannot establish motivation or causation. Customer messages should describe facts and support options; operational risk tiers are not character judgements.

Track what happens after intervention, not only whether an alert was issued. Fewer deposits after a time-out may reflect the safeguard, account switching or ordinary variation. Falling alert counts can also mask drift. Compare prospective harm indicators, response time, unnecessary restrictions, repeat reviews and later support outcomes. Legally required protections cannot ethically be withheld from a control group.