1 of 11

KaggleX 2024-Showcase�ReguGuard AI

Author: Shijun Ju

Advisor: Himaja Vadaga

Google | Proprietary & Confidential

KaggleX Showcase

1

2 of 11

Personal Background

ReguGuard AI

  • Shijun Ju
  • Graduate Student (AI program) at Georgian College
  • Interests:
    • FinTech
    • NLP, LLM
    • RAG
    • Educational technology
  • https://www.linkedin.com/in/shijunju/
  • Portfolio website: https://shijunju.com/

Google | Proprietary & Confidential

KaggleX Showcase

2

3 of 11

Project definition - Problem statement

ReguGuard AI

  • Financial risk professionals face a high volume of complex, evolving regulatory documents - manual document review is time-intensive and prone to oversight.
  • Compliance AI needed for fast, accurate, and informed answers to compliance queries.
  • Supports timely, reliable decision-making in financial risk compliance.
  • Goal: memorize while flexible to provide answers to different financial risk questions

Data Science Topic(s) Applied

    • Data Preparation , LLM, Fine-tuning, LoRa (Low-Rank Adaptation), QLoRA

Google | Proprietary & Confidential

KaggleX Showcase

3

4 of 11

Project Architecture and Methods

ReguGuard AI

Google | Proprietary & Confidential

KaggleX Showcase

4

5 of 11

Project Details – Data Preparation

ReguGuard AI

  • Sample template for training

Google | Proprietary & Confidential

KaggleX Showcase

5

6 of 11

Project Details – Training and Evaluation

ReguGuard AI

Google | Proprietary & Confidential

KaggleX Showcase

6

7 of 11

Project Details – Response Generation

ReguGuard AI

  • Sample Response Generated

Google | Proprietary & Confidential

KaggleX Showcase

7

8 of 11

Project Details – Results

ReguGuard AI

Variables Tested

  • Model sizes, number of question versions, LoRA rank, normal vs beam search

SCC: SparseCategoricalCrossentropy; SCA: SparseCategoricalAccuracy

*** To save evaluation time, randomly selected 900 out of 2,910.

Gemma-2b

3 versions of questions

QLoRA 4bits Rank 6

Gemma-7b

3 versions of questions

TPU LoRA Rank 6

Gemma-7b

4 versions of questions

TPU LoRA Rank 6

Gemma-7b

4 versions of questions

TPU LoRA Rank 10

Normal

20.7%

39.6%

70.5%

66.6%

Beam Search (3)

-

48.0%

78.6%

73.0%

Training Loss

SCC: 0.3495

SCC: 0.0519

SCA: 0.9572

SCC: 0.0444

SCA: 0.9623

SCC: 0.0474

SCA: 0.958

Training Data

7,711

8,730

11,640

11,640

Testing Data

900***

2,910

2,910

2,910

Google | Proprietary & Confidential

KaggleX Showcase

8

9 of 11

Conclusion

ReguGuard AI

Summary

  • Larger model, seeing more versions of similar questions, and Beam Search improves accuracy while higher LoRA rank does not help
  • Limitations:
    • Test data: paraphrased questions
    • “Don’t know” - Guardrails
    • Small number of documents
    • Finetuned models only able to answer information it has seen

Future work

  • Fine-tune embedding models and retrieval LLM using RAG

Things learned

  • Fine-tuning LLM with LoRA and QLoRA
  • Model training with GPU and TPU
  • Project management

Google | Proprietary & Confidential

KaggleX Showcase

9

10 of 11

Project Links

ReguGuard AI

Data

Finetuned Gemma-2b: full model

Finetuned Gemma-7b: LoRA adaptor files only

Training / Experiment notes

References: TPU Training

Google | Proprietary & Confidential

KaggleX Showcase

10

11 of 11

Thank you!��Advisor: Himaja Vadaga�Organizer: Kaggle.com���

Google | Proprietary & Confidential

Presentation Title

11