Where the problem began
The same static risk score may hide stable behavior or rapidly changing debt and credit use. Earlier risk models did not fully use these temporal changes. I started with behavior sequences, but credit-bureau and in-life data is heterogeneous, variable-length and noisy, making off-the-shelf sequence models difficult to apply well.
My responsibilities
Built the sequence modeling and evaluation framework from scratch, including method design, experiments and deployment.
Methods and trade-offs
Dual-granularity prompts and multi-source sequences, from offline ablations to online comparisons with existing models.
- As project lead, build multiscale sequence data, model training and evaluation from scratch. Compare LSTM / GRU, Transformer and other approaches, then tailor the architecture to the structure of industrial sequences.
- FinLangNet combines static attributes with behavior sequences, using feature-level and user-level prompts to aggregate heterogeneous information and learn risk across multiple future horizons. Complete the architecture, training and ablation studies.
- Connect real-time and offline inference. In production, fuse the risk encoder with an XGBoost decision model so sequence representations inform qualification checks, eligibility, credit-limit assignment and in-life lending.
Follow the task through implementation
How does one historical record enter the model?
Input-preparation example: bins, padding and valid positions. Read the public code for the implementation.
Values ordered by time
Example bins: below 20 → 1; 20–39 → 2; 40 or above → 3. Reserve 0 for padding.
Binned tokens
Sequence input
{
"shape": [
1,
1,
5
],
"tokens": [
1,
2,
2,
0,
0
],
"valid": [
1,
1,
1,
0,
0
]
}Shape [sample, channel, time] is [1, 1, 5]. Valid positions distinguish records from padding. This is a single-channel teaching convention.
Actual FinLangNet uses learned bins and category mappings; prompts are trained in the model. This demo only organizes inputs and generates no risk probabilities.
Public input example and processing ↗Explore the architecture through the original paper figure
How does history become a risk representation?
Select a step or a numbered area to see the roles of static attributes, heterogeneous sequences and dual-granularity prompts.
01 / 04
Model both the current state and how it changes
Basic attributes describe the current state. Inquiry, account, borrowing and repayment records add the trajectory of change. Each source has different fields, lengths and noise, so inputs are organized separately first.
- Input
- Static attributes and heterogeneous historical records
- Output
- Multichannel sequences organized by source
02 / 04
Aggregate within channels, then within each source
Feature-level prompts learn temporal patterns in individual channels; user-level prompts combine channels from the same source. The prompts are trainable vectors learned jointly with the model.
- Input
- Continuous / categorical channels and temporal order
- Output
- A user representation for each data source
03 / 04
Join static and sequence information
DeepFM captures static-feature interactions; multiple SRGs provide historical sequence representations. The fused representation feeds the prediction heads, preserving complementary information from both branches.
- Input
- Static representation and source-specific sequence representations
- Output
- A unified user-risk representation
04 / 04
One representation, several future horizons
Each prediction head corresponds to a future horizon and outputs its own risk probability. These are separate task outputs, not class probabilities that must sum to 1.
- Input
- Fused user representation
- Output
- Risk probabilities over multiple future horizons
Validation and delivery
Sequence models were integrated into the main pre-loan and in-life models for Mexican cash lending and credit cards. The project summary and FinLangNet's individual online A/B test are reported separately below. The research was published at ACL 2026 Industry Track with an oral presentation.
Table 3 compares ablations on the same task: no prompt, one prompt, both prompts, and removal of each branch. Their gains cannot simply be added together.

Business applications · Stage-level summary of the sequence-modeling project
Pre-loan cash loans and credit cards: relative delinquency reduction ** at the same approval rate
See the table below for the full comparison and definitions; scroll horizontally if needed.Scroll horizontally to view the full table
| Scenario | How models inform decisions | Results under the stated comparison |
|---|---|---|
| Pre-loan · Cash lending and credit cards | Real-time sequence representations enter the main risk model for qualification checks, eligibility and credit-limit assignment | ** relative reduction in delinquency at the same approval rate |
| In-life · Cash lending and credit cards | Offline sequence-risk scores support segmentation, credit-limit increases and in-life eligibility | ** relative increase in outstanding loan assets at the same risk level |
These two results summarize sequence-model applications across multiple businesses and versions. They are not attributed solely to the paper's FinLangNet model and are not merged with the individual A/B metrics below.
Actual results are redacted as **.
FinLangNet · Online A/B comparison
Relative delinquency reduction: paper deployment · Online A/B · Relative change
See the table below for the full comparison and definitions; scroll horizontally if needed.Scroll horizontally to view the full table
| Metric | Change versus control | Evaluation basis |
|---|---|---|
| Relative reduction in delinquency rate | −9.9% | Published deployment · Online A/B test · Relative change |
| Absolute KS improvement | +6.3 pp | Same online A/B test · Risk discrimination · Absolute percentage points |
| Relative reduction in expected loss | −12.3% | Same online A/B test · Relative change |
These results use FinLangNet as a risk encoder combined with an XGBoost decision model. They are a different evaluation from the six-task offline average in Table 1 of the paper.
Offline experiments · Six risk prediction tasks
XGBoost:28.31
See the table below for the full comparison and definitions; scroll horizontally if needed.Scroll horizontally to view the full table
| Model | Mean KS (%) | y₁ KS(%) | y₆ KS(%) |
|---|---|---|---|
| XGBoost | 31.45 | 32.85 | 28.31 |
| FinLangNet | 33.71 | 34.08 | 32.16 |
| FinLangNet + XGBoost | 34.61 | 36.55 | 30.97 |
Means are recalculated with equal weights across the six tasks in Table 1. Standalone FinLangNet improves mean KS over XGBoost by 2.25 pp. This is separate from the 6.3 pp improvement in the online A/B test.
Remaining questions
Remaining limitations include generalization and theoretical explanation: which design choices still hold with new data sources and business settings needs further validation.
