Swarm Intelligence, PCA, Genetic Algorithms, and Reinforcement Learning —…
Swarm Intelligence, PCA, Genetic Algorithms, and Reinforcement Learning — advanced techniques for analytics teams
- PCA is appropriate for preprocessing when features are highly correlated and the downstream model is sensitive to collinearity (logistic regression, SVMs, linear neural networks); for tree-based models like GBDTs, PCA preprocessing is unnecessary and may reduce performance by discarding non-linear feature interactions that trees exploit directly. (confidence: high)
- Standard PCA requires features to be standardised to mean zero and unit variance before application; failure to standardise causes principal components to be dominated by high-variance features regardless of predictive relevance, producing systematically misleading component structures. (confidence: high)
- For regulated contexts where feature contributions must be disclosable to auditors or regulators, Sparse PCA is preferable to standard PCA because its sparse loadings assign near-zero weight to most original features, making each input's contribution legible; standard PCA dense loadings distribute influence across all features and are difficult to attribute. (confidence: high)
- PCA on LLM embedding spaces is a production-validated 2024–2025 technique that compresses 3,072-dimensional embeddings to ~100 dimensions, yielding up to 60× retrieval speedup while preserving semantic structure in RAG pipelines and anomaly detection workflows. (confidence: high)
- For analytics hyperparameter search on continuous, smooth spaces, Bayesian optimisation (Optuna) outperforms GA and PSO; for discrete, combinatorial, or highly multimodal search spaces — including feature mask selection and pipeline architecture search — GA and PSO outperform Bayesian optimisation by navigating non-differentiable fitness landscapes that Bayesian methods handle poorly. (confidence: high)
- NSGA-II is the benchmark multi-objective evolutionary algorithm for portfolio optimisation, enabling explicit Pareto-front trade-offs between return and risk, with production-applicable results validated in the EvoFolio system (Springer, 2024) and in hybrid RL-guided NSGA-II portfolio work on NASDAQ data. (confidence: high)
- Contextual bandits (Thompson Sampling, UCB) are the correct default for analytics explore/exploit problems — dynamic pricing, personalised offers, product recommendations — when decisions are one-shot per customer context and rewards are near-immediate; full RL is warranted only when today's action materially shifts the distribution of future states over multiple time steps. (confidence: high)
- Offline RL (Conservative Q-Learning and Implicit Q-Learning) trains policies from static historical datasets without live experimentation, making it the only viable RL approach for regulated analytics teams that cannot conduct online experiments; both algorithms are production-accessible via the d3rlpy Python library. (confidence: high)
Research Question
What is the structured, decision-oriented landscape of four advanced technique families — Swarm Intelligence, Principal Component Analysis (PCA) and its modern extensions, Genetic Algorithms and Evolutionary Computation, and Reinforcement Learning — that analytics teams in regulated industries should understand deeply: covering when to use each, when not to, best practices, current advancements, and how they fit within a broader analytics capability framework?
Findings
Executive Summary
PCA remains the correct dimensionality reduction choice for analytics model families sensitive to feature collinearity — standardise features first, use cumulative explained variance (90–95%) to select components — but is unnecessary for tree-based models like GBDTs that handle correlated features natively. For regulated contexts requiring feature attribution disclosure, Sparse PCA produces interpretable sparse loadings that standard PCA cannot provide. Genetic algorithms (GA) and Particle Swarm Optimisation (PSO) are the appropriate optimisation choice when the fitness landscape is non-differentiable, discrete, or combinatorial; Bayesian optimisation (Optuna) remains faster for continuous hyperparameter spaces. Contextual bandits are the correct default for the explore/exploit problems most analytics teams encounter — one-shot pricing, offer, and recommendation decisions — with full RL justified only when sequential state-transition effects dominate. Offline RL (CQL, IQL) is the appropriate RL entry point for regulated industries, enabling policy learning from static historical data without live experimentation, accessible via d3rlpy.
Key Findings
-
PCA is appropriate for preprocessing when features are highly correlated and the downstream model is sensitive to collinearity (logistic regression, SVMs, linear neural networks); for tree-based models like GBDTs, PCA preprocessing is unnecessary and may reduce performance by discarding non-linear feature interactions that trees exploit directly. (confidence: high)
-
Standard PCA requires features to be standardised to mean zero and unit variance before application; failure to standardise causes principal components to be dominated by high-variance features regardless of predictive relevance, producing systematically misleading component structures. (confidence: high)
-
For regulated contexts where feature contributions must be disclosable to auditors or regulators, Sparse PCA is preferable to standard PCA because its sparse loadings assign near-zero weight to most original features, making each input's contribution legible; standard PCA dense loadings distribute influence across all features and are difficult to attribute. (confidence: high)
-
PCA on LLM embedding spaces is a production-validated 2024–2025 technique that compresses 3,072-dimensional embeddings to ~100 dimensions, yielding up to 60× retrieval speedup while preserving semantic structure in RAG pipelines and anomaly detection workflows. (confidence: high)
-
For analytics hyperparameter search on continuous, smooth spaces, Bayesian optimisation (Optuna) outperforms GA and PSO; for discrete, combinatorial, or highly multimodal search spaces — including feature mask selection and pipeline architecture search — GA and PSO outperform Bayesian optimisation by navigating non-differentiable fitness landscapes that Bayesian methods handle poorly. (confidence: high)
-
NSGA-II is the benchmark multi-objective evolutionary algorithm for portfolio optimisation, enabling explicit Pareto-front trade-offs between return and risk, with production-applicable results validated in the EvoFolio system (Springer, 2024) and in hybrid RL-guided NSGA-II portfolio work on NASDAQ data. (confidence: high)
-
Contextual bandits (Thompson Sampling, UCB) are the correct default for analytics explore/exploit problems — dynamic pricing, personalised offers, product recommendations — when decisions are one-shot per customer context and rewards are near-immediate; full RL is warranted only when today's action materially shifts the distribution of future states over multiple time steps. (confidence: high)
-
Offline RL (Conservative Q-Learning and Implicit Q-Learning) trains policies from static historical datasets without live experimentation, making it the only viable RL approach for regulated analytics teams that cannot conduct online experiments; both algorithms are production-accessible via the d3rlpy Python library. (confidence: high)
-
RL policy explainability in regulated industries is a material open gap: post-hoc SHAP can explain individual action recommendations but does not explain temporal credit assignment or the long-term policy objective, creating a disclosure challenge for high-stakes automated decisions that regulators may probe. (confidence: high)
-
Neural combinatorial optimisation (transformer-based attention models trained with deep RL) achieves near-optimal solutions for routing and scheduling problems faster than classical heuristics at benchmark scale; GA and ACO remain the appropriate starting point for teams without deep learning infrastructure, given their maturity and interpretability. (confidence: medium)
-
PSO is preferable to ACO for continuous and neural architecture search applications; ACO is preferable for discrete graph-based combinatorial problems (routing, scheduling with dependency graphs) where its pheromone-trail construction maps naturally to the problem structure. (confidence: high)
-
Across all four families, adoption maturity varies widely: PCA is table-stakes; contextual bandits are industry-ready; GAs/PSO for hyperparameter search are specialist tools; online RL requires simulation infrastructure and is experimental for most analytics teams; offline RL is accessible via d3rlpy but remains a specialist capability. (confidence: high)
Assumptions
- Assumption: Analytics teams in regulated financial services do not have dedicated GPU clusters for training RL agents from scratch. Justification: The reference item's minimum viable MLOps stack (open-source, cloud-portable) was explicitly designed for teams without specialised infrastructure; this item inherits that assumption.
- Assumption: RBNZ's principles-based approach to model risk management applies to RL policy explainability in the same way it applies to supervised ML models. Justification: RBNZ has not published specific guidance on RL; the principles (explainability, validation, outcome monitoring) are stated as technology-agnostic in RBNZ's primary publications.
- Assumption: Offline RL policy quality is adequate for analytics use cases when the historical logged dataset has reasonable coverage of the state-action space. Justification: CQL and IQL papers confirm this; the caveat about coverage gaps is an explicit limitation noted in Findings.
Analysis
Three evidence hierarchies structure this research. For PCA: textbook formulations (Bishop, Jolliffe & Cadima) establish the mechanics; scikit-learn documentation establishes the implementation; practitioner sources (statisticsbyjim, crunchingthedata) establish decision heuristics; and recent arxiv work establishes the LLM embedding frontier application. For GAs/PSO: the primary papers (Kennedy & Eberhart 1995, Deb et al. NSGA-II) are inaccessible behind paywalls but their findings are confirmed in multiple secondary sources and validated in recent 2024–2025 empirical work. For RL: the primary algorithm papers (PPO, SAC, CQL, IQL) are all accessible via arxiv; Stable Baselines3 documentation confirms implementation maturity; practitioner sources confirm the bandits-first heuristic.
The primary tension is between academic enthusiasm for RL applications in analytics and the practical constraints that most analytics teams face. Academic papers routinely demonstrate RL advantages for dynamic pricing, recommendations, and resource allocation — but nearly all use idealised simulation environments with millions of training steps. For regulated analytics teams without simulation infrastructure, those results do not translate. The resolution applied here: offline RL is the correct bridging technique (no simulation required), and contextual bandits are the correct default below the full RL threshold. This resolution is well-supported by the offline RL literature and the contextual bandits evidence.
For GA/swarm vs. Bayesian optimisation, the resolution is a problem-type partition rather than a ranking. There is no single superior method — the correct choice depends on whether the search space is continuous or combinatorial, which is a property the practitioner knows before selecting the algorithm.
Risks, Gaps, and Uncertainties
- RL explainability in regulated contexts: No published solution adequately bridges SHAP-style feature attribution and temporal credit assignment for RL policies. This is not a near-term resolution gap — it is a research frontier, not a missing practitioner tutorial.
- Swarm Intelligence at analytics scale: The evidence base for swarm methods (PSO, ACO) in financial analytics specifically is thinner than for general machine learning. Most empirical results are from manufacturing, engineering, and image classification. The transfer to financial analytics is plausible but not directly validated.
- Offline RL dataset coverage: The effectiveness of CQL/IQL is contingent on the logging policy having explored enough of the relevant state-action space. For organisations whose historical decisions were highly concentrated (e.g., always charged a fixed price), offline RL will not learn better policies from that data.
- Neural combinatorial optimisation training cost: The transformer-based NCO models (NeurIPS 2024) require significant training on problem instances before deployment. The compute cost for initial training may be prohibitive for analytics teams with small-scale routing/scheduling problems — the GA/ACO baseline remains more accessible.
- Contextual bandits primary sources not directly accessed: The practitioner evidence for contextual bandits (geteppo.com, meegle.com) is secondary; the underlying algorithms (Thompson Sampling, UCB) are well-established but no primary experimental paper on financial services bandit applications was directly retrieved.
Open Questions
- What is the minimum dataset coverage (as a fraction of state-action space) required for offline RL to produce policies reliably better than the historical logging policy? This would define the data viability threshold for analytics teams considering offline RL adoption. (Suggested priority: medium)
- Is there a regulatory-grade explainability framework that bridges SHAP-style local attribution and RL's temporal credit assignment — and if not, what compliance proxies (e.g., decision trees fitted to approximate the RL policy) are acceptable to RBNZ? (Suggested priority: high — directly relevant to RL adoption in regulated industries)
- What does a minimum viable contextual bandit deployment look like for a 5–10 person analytics team in financial services — what data pipeline, infrastructure, and evaluation protocol is required? (Suggested priority: medium)
- Do NSGA-II portfolio optimisation results from academic papers (EvoFolio, 2024) generalise to NZ-market equities and fixed income, which have different liquidity profiles and lower transaction volumes than the NASDAQ datasets used in those papers? (Suggested priority: low — exploratory)
sources
- [x] Bishop — Pattern Recognition and Machine Learning, Ch. 12 (PCA, probabilistic PCA, kernel PCA)
- [x] Jolliffe & Cadima — "Principal component analysis: a review and recent developments" (2016), Phil. Trans. R. Soc. A
- [ ] Kennedy & Eberhart — PSO original paper (1995)
- [ ] Dorigo & Gambardella — Ant Colony System (1997)
- [ ] Holland — Adaptation in Natural and Artificial Systems (1975/1992) — foundational GA text
- [ ] Deb et al. — NSGA-II (2002)
- [ ] Storn & Price — Differential Evolution (1997)
- [x] Sutton & Barto — Reinforcement Learning: An Introduction (2nd ed., 2018)
- [ ] Mnih et al. — DQN paper (2015)
- [x] Schulman et al. — PPO paper (2017)
- [x] Haarnoja et al. — SAC paper (2018)
- [x] Kumar et al. — CQL offline RL (2020)
- [x] Kostrikov et al. — IQL offline RL (2021)
- [x] Vinyals et al. — Pointer Networks for combinatorial optimisation (2015)
- [ ] Stanley & Miikkulainen — NEAT (2002)
- [x] scikit-learn documentation — PCA, KernelPCA, SparsePCA, IncrementalPCA
- [x] Stable Baselines3 documentation — PPO, SAC, TD3 implementations and benchmarks
- [x]
Research/completed/2026-03-03-ml-techniques-and-algorithms.md— reference taxonomy; this item is a direct extension