Aligning Language Models with Investor and Market Behavior for Financial Recommendations
Aligning Language Models with Investor and Market Behavior for Financial Recommendations
The paper presents FLARKO (Financial Language-model for Asset Recommendation with Knowledge-graph Optimization), a novel framework that integrates Large Language Models (LLMs), Knowledge Graphs (KGs), and Kahneman-Tversky Optimization (KTO) to generate financial asset recommendations that are both profitable and aligned with investor behavior. FLARKO encodes user transaction histories as Personal Knowledge Graphs (PKGs) and asset price trends as Market Knowledge Graphs (MKGs), which are serialized into JSON-LD and provided as context to the LLM. This grounding enhances interpretability and reduces hallucination. The framework is evaluated in both centralized (CenFLARKO) and federated (FedFLARKO) settings using the FAR-Trans dataset. For alignment, KTO fine-tunes the LLM using binary labels indicating whether a recommendation was both purchased by the user and profitable, requiring only minimal supervision. FedFLARKO employs LoRA-based parameter-efficient tuning and 4-bit quantization to enable collaborative training across institutions without sharing sensitive data, with communication costs as low as 4.8 MB per round for the smallest model.
Results show that FLARKO significantly outperforms state-of-the-art baselines (e.g., LightGBM, LightGCN, matrix factorization) on the combined metric Comb@3, which measures recommendations that are both profitable and behaviorally aligned. Notably, mid-sized models (1.7B–4B parameters) achieve the best performance, with Qwen3-1.7B reaching a Comb@3 of 0.3718 in the centralized setting and Qwen3-4B achieving 0.3469 in the federated non-IID setting. The federated variant demonstrates robustness to non-IID client data, with larger models even benefiting from heterogeneity. Ablation studies reveal that PKG contributes more to preference alignment than MKG, and that combining both sources can degrade performance in smaller models due to context length limitations. Overall, FLARKO provides a practical, interpretable, and resource-efficient solution for personalized financial recommendations that respect user preferences and regulatory constraints.
Highlights
- 1First demonstration of combining Kahneman-Tversky Optimization (KTO) with LLMs for financial asset recommendation, enabling alignment with user preferences using only binary desirability labels.
- 2Novel integration of structured Knowledge Graphs (Personal and Market KGs) to ground LLM reasoning over behavioral and market data, enhancing interpretability and reducing hallucination.
- 3Introduction of FedFLARKO, a federated learning variant that enables collaborative training across institutions without sharing sensitive data, robust to non-IID client distributions.
- 4Empirical finding that mid-sized LLMs (1.7B–4B parameters) outperform larger models (8B) in this domain, offering a resource-efficient solution for real-world deployment.
- 5Significant outperformance over state-of-the-art baselines on the combined metric (Comb@3) that measures both profitability and behavioral alignment.
Methods
- MKnowledge Graph Construction: Builds Personal Knowledge Graphs (PKG) from user transaction histories and Market Knowledge Graphs (MKG) from aggregated asset price summaries, serialized as JSON-LD for LLM input.
- MKahneman-Tversky Optimization (KTO): Fine-tunes LLMs using binary desirability labels (profitable and purchased vs. not) to align recommendations with user behavior and market outcomes.
- MFederated Learning with LoRA: Employs parameter-efficient fine-tuning (LoRA) and 4-bit quantization in a federated setting (FedFLARKO) to reduce communication overhead while preserving performance.
- MAblation Study: Evaluates model performance under different input configurations (PKG only, MKG only, combined, none) to assess the contribution of each knowledge source.
Results
- RCenFLARKO with Qwen3-1.7B achieves the highest Pref@3 (0.5341) and Comb@3 (0.3718) among centralized models, while Qwen3-4B achieves the highest Prof@3 (0.6400).
- RFedFLARKO with Qwen3-4B under non-IID clients achieves the best Comb@3 (0.3469) among federated models, outperforming its centralized counterpart and demonstrating robustness to heterogeneous data.
- RFLARKO models (both CenFLARKO and FedFLARKO) consistently outperform all baselines (e.g., LightGBM, LightGCN, MF) on the combined metric Comb@3, which measures both profitability and behavioral alignment.
- RSmaller models (0.6B) underperform, but mid-sized models (1.7B–4B) provide the best trade-off; the 8B model does not surpass smaller variants, indicating diminishing returns from scale.
- RIncluding PKG generally improves preference alignment (Pref@3) more than MKG, suggesting transaction history is more informative for capturing user intent than aggregated price summaries.
Analyze Paper
Generate insights from "Aligning Language Models with Investor and Market Behavior f...".