Introduction
Tonga collects more tax relative to GDP than most Pacific neighbours, yet remains dependent on grants. Three structural facts explain this. Most taxable consumption is imported and financed by remittances, so revenue rises and falls with transfers from Tongans abroad. Labour mobility schemes move wage earners offshore, thinning the PAYE base. And every disaster, including the January 2022 Hunga Tonga-Hunga Ha'apai eruption and tsunami, produces both a collection shock and a new layer of exemptions that rarely expire.
The research question follows the IMF's constraint. If rates cannot rise, how much revenue can be recovered from the existing base, from which exemptions and which compliance channels, at what cost to poorer households, and how should part of it be set aside so that the next disaster does not force new borrowing?
The organising identity is the split of the revenue gap for tax k into a policy gap and a compliance gap:
policy gap: exemptions; compliance gap: border and inland
Formula source
R^{pot}_{k} - R_{k} = \underbrace{\left(R^{pot}_{k} - R^{law}_{k}\right)}_{\text{policy gap: exemptions}} + \underbrace{\left(R^{law}_{k} - R_{k}\right)}_{\text{compliance gap: border and inland}}Current tax issues
2.1 Grant-masked deficits and debt
The FY2025 overall surplus of 5.6% of GDP was largely driven by grants. Counting only firmly committed grants while reconstruction spending stays high, the IMF projects a deficit of 7.7% of GDP in FY2026. Tonga is assessed at high risk of debt distress. Debt service reached 3.5% of GDP in FY2024 and stays above 3% until FY2027. The IMF asks the government to avoid new non-concessional borrowing, which leaves domestic revenue and grants as the only financing.
2.2 Exemptions
Consumption tax and duty concessions have accumulated through disaster relief, reconstruction, development projects, diplomatic and church privileges, and sector incentives for tourism, agriculture and fisheries. Each is defensible alone. Together they break the input-credit chain, create routes for diverting exempt goods into taxed markets, and require officer discretion at the counter. I found no regularly published tax-expenditure statement, so the cost is unmeasured. That is the first gap this paper addresses.
2.3 Border dependence
Most consumption tax and excise is collected on imports at Nuku'alofa. The IMF credited stronger consumption and income tax receipts in FY2024 to remittances and construction. The main evasion channels are therefore under-valuation, misclassification into lower-duty or exempt codes, and abuse of exemption certificates. The inland taxpayer population is small, so audit coverage inland yields less than targeting at the wharf.
2.4 A shrinking wage base
Seasonal and longer-term labour schemes in Australia and New Zealand take working-age Tongans offshore. Their income is taxed abroad or not at all, and returns as remittances that are taxed only when spent. The tax mix drifts toward the border whether or not policy intends it, which raises the stakes on customs integrity.
2.5 Disaster shocks
Tonga ranks among the most disaster-exposed countries in the world. The 2022 eruption halted commerce and collection for weeks. Tonga has led support for the Pacific Resilience Facility, and a Disaster Risk Management bill is in train, but no fiscal rule links good-year revenue to a national buffer.
2.6 Governance
The IMF flags governance and corruption vulnerabilities and notes the 2024 establishment of the Anti-Corruption Commission Office. Discretionary exemptions and manual valuation are the two points in the tax system where those vulnerabilities bite. Models that replace discretion with a published score reduce that exposure.
Models
3.1 Model A: pricing and ranking exemptions
Model A answers the IMF's instruction directly: which exemptions to remove at unchanged rates. It starts from the theoretical consumption tax liability across commodities i:
Formula source
VTTL = \sum_{i} \tau_i \left[ HC_{i} + GC_{i}\,\phi^{G}_i + \sum_{s} IC_{i,s}\left(1-\rho_s\right) + GFCF_{i}\left(1-\rho^{K}_i\right) \right] - \thetaHC is household consumption, GC government consumption with taxable share phi, IC intermediate consumption by sector s with input-credit recovery rho (zero for exempt sectors), GFCF investment, and theta the revenue excluded by the registration threshold. In Tonga, where most taxable goods are imported, VTTL can be built from customs entries by HS code plus the Household Income and Expenditure Survey, without a supply-use table.
The cost of exemption j is found by re-running VTTL with j switched off, allowing demand to respond through own-price elasticity epsilon and netting off the input credits that become claimable:
Formula source
TE_j = \tau \cdot B_j \cdot \left(1 + \varepsilon_j \cdot \frac{\tau}{1+\tau}\right) - \Delta\rho_jEach exemption then gets a targeting ratio: the share of its benefit that reaches the bottom 40% of households, using survey spending x and weights w:
Formula source
\eta_j = \frac{\sum_{h \in B40} w_h\, x_{h,j}}{\sum_{h} w_h\, x_{h,j}}A leakage term is added for exemptions granted by certificate, estimated as the share of exempt imports by certificate holders that exceeds a plausible own-use benchmark U:
Formula source
\ell_j = \frac{\sum_{c} \max\!\left(0,\; M^{exempt}_{c,j} - U_{c,j}\right)}{\sum_c M^{exempt}_{c,j}}The decision rule removes exemption j when its targeting is poor or its leakage high, and returns part of the revenue to poor households as a transfer:
Formula source
\text{remove } j \;\; \text{if} \;\; \eta_j < \eta^{*} \;\text{or}\; \ell_j > \ell^{*}; \qquad \Gamma = \sum_{j \in removed} TE_j \cdot \eta_j; \qquad \Delta R^{net} = \sum_{j \in removed} TE_j \left(1 - \eta_j\right)Because eta is below 1 for every exemption, net revenue is positive for every removal, and the bottom 40% are held harmless in aggregate.
3.2 Model B: label-free customs valuation
Model B scores every import entry for under-valuation and misclassification without needing past seizure data. For entry e of HS code g from origin o in month t, the declared unit value u is compared with a robust reference built from three independent sources: the peer distribution of other importers, mirror export data from the partner country, and published international prices where they exist:
Formula source
z^{peer}_e = \frac{\ln \tilde{u}_{g,o,t} - \ln u_e}{1.4826 \cdot MAD_{g,o,t}}, \qquad z^{mirror}_e = \frac{\ln u^{X}_{g,o,t} - \ln u_e}{\sigma^{X}_g}The tilde denotes the median and MAD the median absolute deviation, so a cluster of under-valuers cannot pull the benchmark down. Physical constraints give hard flags: declared weight must be consistent with container count and shipping manifest; declared quantity of vehicles must equal registrations. Misclassification is scored by the duty saved if the entry moved to its nearest plausible neighbour code g-prime, weighted by the similarity of the goods description d:
Formula source
m_e = \max_{g'} \left[ \left(\tau_{g'} - \tau_g\right) \cdot \mathrm{sim}\!\left(d_e, g'\right) \right]The entry score and the importer score, which accumulates over the importer's entries, are:
Formula source
A_e = \omega_1 \max(0, z^{peer}_e) + \omega_2 \max(0, z^{mirror}_e) + \omega_3 m_e + \delta H_e, \qquad A_i = \frac{\sum_{e \in i} V_e A_e}{\sum_{e \in i} V_e}Expected revenue at stake converts the score to pa'anga, and determines whether the response is inspection at the wharf or post-clearance audit of the importer:
Formula source
\mathbb{E}[Y_e] = \left(\tau^{duty}_g + \tau^{excise}_g + \tau^{CT}\left(1 + \tau^{duty}_g + \tau^{excise}_g\right)\right) \cdot q_e \cdot \max\!\left(0, \tilde{u}_{g,o,t} - u_e\right)3.3 Model C: disaster revenue buffer
Model C sets how much revenue to save in normal years. Disaster events arrive as a Poisson process with rate lambda. Each event destroys a share X of annual revenue, with X lognormal and capped. Annual revenue loss L is the compound sum:
Formula source
N \sim \mathrm{Poisson}(\lambda), \qquad X_n \sim \mathrm{LogNormal}(\mu_X, \sigma_X^2), \qquad L = \min\!\left(\sum_{n=1}^{N} X_n,\; L^{max}\right)The buffer target is the loss quantile at confidence q, net of expected insurance and facility payouts I:
Formula source
B^{*} = VaR_q(L) \cdot \bar{R} - \mathbb{E}\left[I \mid L \ge VaR_q\right]The contribution rule saves a fixed share c of revenue plus a share of any revenue surprise above forecast, until the buffer is full, and permits drawdown only on a declared disaster:
Formula source
B_{t+1} = B_t (1 + r) + \mathbb{1}\!\left[B_t < B^{*}\right]\left( c R_t + \psi \max\!\left(0, R_t - \hat{R}_t\right) \right) - \mathbb{1}\!\left[\text{disaster}_t\right] \min\!\left(B_t, L_t R_t\right)The rule links Models A and B to Model C: the first use of revenue recovered from exemptions and customs is filling the buffer, which is a use the IMF's call to rebuild buffers supports and which does not raise recurrent spending.
Algorithms and illustrative results
4.1 Algorithm 1: exemption ranking
INPUT customs entries with exemption codes, HIES microdata, CT returns by sector,
elasticities eps[j], thresholds eta_star, ell_star
BUILD VTTL_base from imports by HS code + domestic taxable supply
FOR each exemption j:
VTTL_j <- rebuild with exemption j removed, demand adjusted by eps[j]
TE[j] <- VTTL_j - VTTL_base - new input credits
eta[j] <- bottom-40% share of spending on j from HIES
ell[j] <- share of certificate imports above own-use benchmark
score[j] <- TE[j] * (1 - eta[j]) * (1 + ell[j])
SORT exemptions by score descending
SELECT j where eta[j] < eta_star OR ell[j] > ell_star
COMPUTE transfer Gamma = sum TE[j]*eta[j]; net gain = sum TE[j]*(1 - eta[j])
PUBLISH annual tax-expenditure statement with TE, eta, ell per exemption4.2 Algorithm 2: customs entry scoring
FOR each (HS code g, origin o, rolling 12-month window): u_med, MAD <- robust centre and spread of declared unit values u_mirror <- partner-country export unit value where available FOR each new entry e at lodgement: z_peer, z_mirror <- standardised shortfalls (positive side only) m_e <- duty saved under nearest plausible code * description similarity H_e <- 1 if weight, container or registration identities are breached A_e <- w1*z_peer + w2*z_mirror + w3*m_e + delta*H_e EY_e <- full tax rate stack * quantity * max(0, u_med - u_e) IF H_e = 1 OR EY_e > inspect_threshold: hold for documentary or physical check ELSE release, and add A_e to importer running score A_i MONTHLY: rank importers by value-weighted A_i -> post-clearance audit list AFTER each finding: update weights w by Bayesian reweighting
4.3 Illustrative results: disaster buffer
Inputs are assumed, not estimated: event rate 0.3 a year, median loss per event 6% of annual revenue, log standard deviation 0.9, annual loss capped at 80%. The run uses 200,000 simulated years.
| Statistic of annual revenue loss | Share of annual revenue |
|---|---|
| Mean | 2.7% |
| 90th percentile (1 in 10 years) | 9.1% |
| 95th percentile (1 in 20 years) | 15.6% |
| 99th percentile (1 in 100 years) | 34.2% |
Budgeting for the mean loss leaves the government short in exactly the years that matter. A buffer sized to the 1-in-20-year loss is about 16% of annual revenue. A contribution of 3% of revenue a year fills it in about five years; 2% takes about eight. Losses beyond the 95th percentile are better transferred to parametric insurance and the Pacific Resilience Facility than self-insured.
4.4 Illustrative arithmetic: exemptions
No Tongan tax-expenditure estimate is public, so this is arithmetic, not a finding. If exemptions cost 3% of GDP, a range typical for small states, and the exemptions failing the targeting and leakage tests account for half of that with an average eta of 0.25, then removal yields 1.5% of GDP gross, 0.4% returns to poorer households as transfers, and 1.1% of GDP is net new revenue with no rate increase. That is about one-seventh of the projected FY2026 deficit.
Solutions, software, data science and AI models
Tonga's solution is mostly at the border and in the exemption register, so the software centres on customs entries, exemption certificates and a published tax-expenditure statement. Each issue maps to a policy measure, a model and a component.
5.1 Issue-to-solution map
| Issue | Solution | Data science or AI model | Software component |
|---|---|---|---|
| Grant-masked deficits | Medium-term revenue strategy with published baseline | Revenue forecasting with remittance and import drivers (Bayesian vector autoregression; gradient-boosted nowcast from monthly customs data) | Forecasting workbench and Ministry dashboard |
| Exemptions | Annual tax-expenditure statement; sunset clauses; removal by targeting and leakage score | Tax-expenditure microsimulation on HIES; demand-elasticity estimation (QUAIDS); certificate-leakage outlier model | Exemption register with digital certificates and quota tracking |
| Border under-valuation and misclassification | Score every entry at lodgement; post-clearance audit list | Robust unit-value benchmarks; mirror-data comparison; text classifier for HS codes from goods descriptions | Risk-scoring service called by the customs system's selectivity module |
| Exempt goods diverted to market | Quantity quotas per certificate holder; end-use checks | Own-use benchmark regression; graph links between certificate holders and retailers | Certificate ledger with alerts |
| Shrinking PAYE base | Employer data matching; taxation of rental and business income funded by remittances | Record linkage across employer, provident-fund and business-licence data | Single taxpayer view |
| Disaster shocks | Legislated buffer rule; parametric insurance for the tail | Compound Poisson loss simulation; extreme-value fit for the tail; business-continuity model for collection | Buffer-rule calculator; offline-capable collection nodes |
| Governance and discretion | Replace officer discretion with published scores and audit trails | Process mining on clearance and refund logs to detect unusual officer-importer pairings | Immutable decision log |
5.2 Model catalogue
| Model | Family | Why it suits Tonga | Output |
|---|---|---|---|
| Tax-expenditure microsimulator | Static microsimulation with elasticities | No published tax-expenditure estimate exists; HIES and customs data suffice | TE, targeting ratio and leakage per exemption |
| Demand system | QUAIDS or simple log-linear by commodity group | Needed to predict consumption response when exemptions end | Own-price elasticities |
| Unit-value benchmark | Robust statistics: median and MAD by HS code, origin and window; quantile regression on quantity and origin | Works with a few dozen entries per code; resistant to clusters of under-valuers | Reference price and z-score per entry |
| HS code classifier | Multilingual sentence-embedding model with nearest-neighbour search over the tariff; fine-tuned on past corrected entries | Misclassification hides in free-text descriptions | Top plausible codes with duty difference |
| Mirror-data matcher | Fuzzy time-and-value matching of Tongan imports to partner exports | New Zealand, Australia, Fiji and the US publish export data at fine detail | Under-declared value by importer |
| Importer risk score | Value-weighted aggregation plus isolation forest as cross-check | Converts entry noise into a stable importer ranking | Monthly post-clearance audit list |
| Certificate-leakage model | Regression of exempt imports on organisation size and activity; residual outliers | Identifies certificates used beyond plausible own use | End-use inspection list |
| Officer-pairing analysis | Process mining and bipartite graph anomaly detection | Addresses the governance risk the IMF flags without accusing anyone in advance | Pairings for internal review |
| Disaster loss model | Compound Poisson with lognormal severity; generalised Pareto tail | Small number of events but well-documented losses | Buffer target and insurance attachment point |
| Revenue nowcast | Gradient boosting on weekly customs and remittance data | Gives Treasury a four-week early warning | Monthly revenue forecast with bands |
5.3 Reference architecture
Original specification
flowchart TD A[Sources<br/>customs entries, CT and PAYE returns, exemption certificates, HIES, remittance data] --> B[Ingestion and data quality] B --> C[Warehouse<br/>bitemporal, single taxpayer view] C --> D[Entry scoring service<br/>unit value, HS classifier, hard flags] D --> E[Customs selectivity<br/>release, document check, inspect] C --> F[Importer risk and certificate leakage] F --> G[Post-clearance audit cases] G --> H[Findings] H --> D C --> I[Policy lab<br/>tax expenditures, forecasts, buffer rule] I --> J[Published TE statement and dashboards]
The entry scoring service is the only component that must respond in real time; everything else runs nightly or monthly.
5.4 Software stack
| Layer | Recommended software | Notes |
|---|---|---|
| Operational sources | ASYCUDA World at customs; the Ministry's revenue management system; provident-fund and business registries | Confirm current systems and versions; ASYCUDA exposes selectivity criteria that an external score can feed |
| Ingestion and orchestration | Python, Prefect or Apache Airflow, Great Expectations | Nightly extracts; entry scoring by API |
| Warehouse | PostgreSQL with bitemporal tables | Tariff and exemption rules versioned by effective date and knowledge date |
| Scoring service | FastAPI service in Docker, scores cached per HS code and origin | Must keep working when the international link is down |
| Text and embeddings | Open multilingual sentence-embedding models; FAISS for vector search | Runs on a single modest GPU or CPU |
| Statistics and ML | scikit-learn, statsmodels, PyOD, LightGBM, PyMC | Open source |
| Microsimulation | Python with survey weights; OpenFisca optional | HIES microdata held under statistics-office protocol |
| Trade data | UN Comtrade and partner customs open data | For mirror analysis and price references |
| Graph and process mining | NetworkX or Neo4j Community; PM4Py | Pairing analysis and certificate networks |
| Decision log | Append-only, hash-chained table | Tamper-evident record of who released what and why |
| Dashboards and publication | Apache Superset or Metabase; static site for the TE statement | Transparency is part of the solution |
| Hosting | Government data centre with off-island encrypted replica | The 2022 cable cut showed why a replica outside Tongatapu matters |
5.5 Governance of AI use
- Shadow mode first. Run entry scoring alongside officer selection for six months and publish the comparison of hit rates before switching over.
- Explainable flags. Each held entry shows the reference price, its source, the number of peer entries and the duty at stake. Importers can contest the reference, which keeps the system inside WTO valuation rules.
- No automated penalties. Scores select for checking; assessments remain officer decisions under the Customs and Revenue Acts.
- Random inspection share. A fixed share of green-lane entries is inspected at random to estimate the true leakage rate and detect drift.
- Integrity safeguards. Officer-pairing analysis is reported to an integrity unit outside the line of command, with due-process rules set in advance.
5.6 Team and indicative effort
A joint customs and revenue analytics cell of five is enough: one lead, one data engineer, two analysts and one customs valuation specialist. External build support of about 12 months is realistic, and regional pooling with other Pacific administrations would cut cost, since unit-value benchmarks improve when several small islands share reference prices. Cost and staffing figures are my estimates.