Tackling the Human Cost of R&D Tax Credit Qualification with AI-Powered Models

Shubham Agarwal, Edward Kung9 Sep 2024

Problem

Gusto's R&D Tax Credits product relies on quantitative tax associates (quants) to decide which general ledger (GL) accounts and expenses qualify under IRS rules. An average customer GL has 25 accounts and 2,840 expenses, of which only 39 qualify. Reviewing the non-qualifying expenses of one average customer takes about 3 hours, so reviewing everything is often infeasible.

Example from the article: a sample GL has rows like "Wages-Employees: To correct coding of September monthly payroll", and the quant reads each one.

Solution in brief

Two XGBoost classifiers score accounts and expenses. Text fields become embeddings from a frozen pre-trained sentence model, and the account model also uses the average expense score of its account. The app sorts and colors items above a score threshold, so quants look at likely qualifiers first. Labels were cleaned beforehand by quants re-reviewing items where model and label disagreed most.

Questions this case answers
  • How to prioritize a rare positive class inside very large review queues so that human reviewers spend time only on likely positives
  • How to detect and repair missed positives in training labels created by time-pressured human reviewers
  • How to cut the time reviewers spend on ledger lines that will never qualify for a tax credit
  • How to rank accounts and line items so reviewers see the likely qualifying ones first

Tools and methods

  • XGBoost — binary classifier for both the account and the expense model
  • multi-qa-MiniLM-L6-cos-v1 — frozen BERT-based encoder that embeds account names and expense descriptions
  • Precision-recall curves — model selection at about 80% recall
  • High log-loss relabeling — sends the largest model-label disagreements to quants
  • Score threshold with color-coding — highlights likely qualifiers, no final decision
Continue reading — it's free

Google or a one-time email code. No password.