Logo Lanfrica

Learning to allocate: Self-supervised transformers for constrained optimisation

Domain:

socioeconomic

Record type:

paper
Creator:
M MW. V A
Publisher:
Afr
Host:
We present the Resource Allocation Transformer, a deep learning framework that learns portfolio-level relationships directly through attention mechanisms, capturing how assets work together rather than only how they perform individually. Most machine learning approaches to portfolio construction reduce allocation to aggregating independent asset predictions, overlooking the complementarity between assets that drives optimal portfolios. Unlike traditional predict-then-optimise pipelines, or Economic Scenario Generators that separate the modelling of economic variables from the optimisation step, the Resource Allocation Transformer integrates correlation structure and optimisation logic within a single differentiable architecture. The framework learns constraint-satisfying allocations through self-supervised exposure to synthetic optimisation problems, providing a more stable alternative to sequential prediction-optimisation workflows. Empirical validation shows effective transfer learning from synthetic curricula to real Johannesburg Stock Exchange data (2005–2024), with the same trained model handling portfolios of varying sizes and across market regimes without retraining. By directly learning to allocate, the Resource Allocation Transformer establishes a new paradigm for asset allocation that adapts through experience rather than requiring problem-specific recalibration.