Abstract
Rank selection in tensor networks is a critical yet computationally daunting task, often classified as NP-hard. Traditional automated methods typically operate as "black boxes," offering little insight into the selection process. This paper presents a framework that employs Large Language Models (LLMs) as domain-aware reasoning agents to optimize rank selection in Fully Connected Tensor Networks (FCTN). By iteratively refining rank choices based on both numerical feedback and latent domain knowledge, the proposed system achieves superior compression efficiency and provides human-interpretable explanations. Evaluations on financial datasets demonstrate that this approach outperforms standard baselines like Bayesian optimization in both performance and stability.
Introduction
In high-dimensional data analysis—spanning finance, quantum physics, and multi-channel video processing—tensors serve as the primary structure for information representation. Tensor decompositions are used to compress these massive arrays into smaller "core" tensors. However, the effectiveness of this compression hinges on Rank Selection (RS). Selecting a rank that is too low results in significant information loss, while a rank that is too high fails to provide meaningful compression. For complex architectures like Fully Connected Tensor Networks (FCTN), finding the optimal rank is an NP-hard problem. Current automated solutions often lack the transparency required for domain experts to trust or understand the resulting models.
Methods
The researchers developed an iterative, LLM-guided optimization framework that treats the LLM (specifically GPT-4o) as a domain expert. The architecture consists of several key stages:
- System Initialization: The LLM is prompted with a role-play scenario as a domain expert in tensor analysis and the specific application field (e.g., finance).
- Initial Reasoning: The model analyzes the dimensions or "modes" of the input data tensor, using its internal knowledge to predict interactions between dimensions.
- Feedback Loop: Suggested ranks are processed via a standard FCTN-ALS algorithm to calculate objective function scores (approximation error vs. compression ratio).
- Iterative Refinement: These scores are fed back to the LLM, which reviews its previous logic and adjusts its suggestions to improve the objective function.
To ensure mathematical validity, the system enforces hard bounds on rank values and includes an early stopping mechanism to prevent redundant iterations.
Results and Discussion
The framework was evaluated using financial time series data consisting of 142 fifth-order tensors ($3 \times 6 \times 3 \times 4 \times 5$). The dimensions represented various market factors, including instrument types, asset indices, and temporal features.
The LLM-guided approach was compared against two common baselines: Random Search and Bayesian Optimization. As shown in the performance comparison, the proposed framework consistently achieved lower objective function values.
Key findings include:
- Stability: Unlike the baselines, which exhibited volatile "spikes" in error across iterations, the LLM-guided search showed a stable, downward trend in the objective function, reaching its optimal performance by iteration 9.
- Interpretability: The LLM provided natural language justifications for its rank adjustments, such as identifying correlations between specific financial modes that warranted higher or lower ranks.
- Generalization: The model performed exceptionally well on unseen test data, suggesting that the LLM identifies underlying structural logic rather than merely overfitting to training noise.
Conclusion
By integrating LLMs into the tensor decomposition pipeline, this research demonstrates a path toward more efficient and transparent data compression. While challenges such as LLM hallucinations and context window limitations remain, the ability to leverage latent domain knowledge represents a significant advancement over purely statistical optimization methods. Future research will focus on advanced prompting techniques and formal verification of the LLM's reasoning.
Summary updated