TL;DR
The paper introduces PFTSN (Prior-Fitted Task Sequencing Network), a transformer-based framework that treats task sequencing as an in-context optimization problem. By meta-learning over an infinite prior of synthetically generated graph-based sequencing problems, the model achieves powerful few-shot generalization, discovering optimal task orderings significantly faster than reinforcement learning and large language model baselines.
What Problem Does This Paper Address?
Task Sequencing (TS) is the art of arranging tasks in an optimal order to maximize learning efficiency or performance. It is a foundational challenge across diverse domains, including curriculum learning for machine learning models, robotic assembly lines, and autonomous driving.
Traditionally, finding the right sequence relies heavily on handcrafted heuristic rules, domain-specific knowledge, or training reinforcement learning (RL) agents from scratch for every new problem instance. These approaches are either rigid or sample-inefficient. Prior attempts at meta-learning task sequencing have failed to convincingly demonstrate few-shot generalization—the ability to quickly find the optimal sequence for a completely new, unseen problem given only a handful of initial examples and their performance scores.
Methods
The authors propose PFTSN, framing task sequencing as an in-context optimization problem. Instead of optimizing a sequence from scratch, the model takes a "context" of a few non-optimal sequences and their corresponding utility scores, and auto-regressively predicts a new, optimized sequence.
Key Components:
- Model Architecture: A transformer variant utilizing alternating sequence attention and task attention blocks. This allows the network to effectively aggregate information across different trials (sequences) and across timesteps within a single sequence.
- Universal Graph-Based Prior: To train the model to be domain-agnostic, the authors generate synthetic task sequencing problems by modeling optimal paths through Directed Acyclic Graphs (DAGs). They prove mathematically that a DAG structure is universal enough to encode any finite sequencing problem.
- Robust Utility Function: To score how "good" a sequence is, they introduce a utility function that blends Dynamic Time Warping (DTW) (which catches patterns that are shifted in time) and Hamming Distance (which checks for exact positional matches) against known optimal sequences.
Datasets
Because no large-scale real-world repository for task sequencing exists, the authors synthesized two massive benchmark datasets using a stochastic graph expansion procedure:
- Small Dataset: 1,000,000 task sequencing problems with a sequence length ($L$) of 8 and a task pool ($|T|$) of 8.
- Large Dataset: 1,000,000 task sequencing problems with a sequence length ($L$) of 16 and a task pool ($|T|$) of 8.
Each problem instance contains a set of optimal trajectories alongside random and mutated sequences paired with their utility scores. Separate validation and test sets of 128 unique problems were held out to evaluate few-shot generalization.
Key Insights and Ideas
- Optimization via In-Context Learning: The paper demonstrates that deep neural networks can internalize the "rules of optimization" during meta-training. At test time, the model doesn't update its weights; it simply infers the optimal direction based on the provided context.
- Fine-Tuning Can Hurt: Surprisingly, trying to iteratively fine-tune the meta-learned model on sub-optimal sequences at test time hindered performance rather than improving it. The pure meta-learned representations are already optimally tuned for the search space.
- Extreme Few-Shot Robustness: Ablation studies showed that PFTSN's performance remains remarkably stable even when the initial context size is reduced down to a single sequence.
Key Results
PFTSN was evaluated against several baselines, including rule-based heuristics, RL agents (DDQN, Rainbow), and state-of-the-art LLMs (ChatGPT-4.1, DeepSeek-R1-Qwen-8B).
- Faster Convergence: On the small dataset, PFTSN converged to near-optimal sequences within roughly 20 iterations, whereas the strong rule-based approach required 32 iterations. On the large dataset, PFTSN converged in 29 iterations compared to 58 for the rule-based baseline.
- Outperforming RL and LLMs: Standard RL baselines struggled due to the tight iteration budget (insufficient for adequate exploration). LLMs quickly plateaued, often repeating previously evaluated sequences or showing only marginal gains.
Limitations and Future Work
- Synthetic Priors: The primary limitation is that the model was trained and evaluated entirely on synthetically generated graph priors. Testing the framework on complex, real-world task distributions remains an open next step.
- Inference Overhead: PFTSN is computationally heavier during the recommendation phase (0.13 seconds/iteration) compared to simple rule-based heuristics (0.007 seconds/iteration). However, the authors note that in real-world applications where executing a task sequence takes significant time (e.g., more than 0.22 seconds), PFTSN's rapid convergence saves enough iterations to yield a lower overall runtime.
Summary updated