Abstract
Multitask learning in algorithmic reasoning often suffers from negative interference, where conflicting intermediate execution steps across different algorithms degrade overall performance. While branching networks offer a structural solution by allowing tasks to share core logic while specializing in distinct branches, identifying the optimal architecture is a combinatorial challenge. This paper discusses AutoBRANE (Automated BRAnching NEtworks), a framework that utilizes gradient-based affinity scores and convex relaxation to discover optimal branching structures in linear time. Our results demonstrate that AutoBRANE outperforms state-of-the-art multitask models across Graph Neural Networks (GNNs) and Large Language Models (LLMs) while significantly reducing computational overhead.
Introduction
Algorithmic reasoning—the capacity for neural models to execute step-by-step logic—is a cornerstone of robust artificial intelligence. However, training a single model to master diverse algorithms simultaneously (e.g., BFS, DFS, and Bellman-Ford) frequently leads to negative interference. This occurs when the parameter updates required for one task conflict with those of another, particularly when intermediate logic overlaps but diverges in critical ways.
To mitigate this, researchers have proposed branching networks. In these architectures, tasks share initial layers to learn general representations and diverge into specialized branches for task-specific logic. Despite their potential, the search space for such architectures is immense; for $n$ tasks across $L$ layers, there are $k^{nL}$ possible configurations. This combinatorial explosion makes exhaustive search or traditional architecture search methods computationally prohibitive for large-scale multitask learning.
Methodology: The AutoBRANE Framework
AutoBRANE addresses the structural search problem through an efficient, three-tiered approach:
1. Gradient-Based Affinity Estimation
Rather than training thousands of candidate architectures to evaluate task compatibility, AutoBRANE employs a first-order Taylor expansion to estimate task affinity. By analyzing the gradients of different tasks at a shared initialization, the framework identifies which tasks "play well" together. If two tasks exhibit high gradient similarity, they are likely to benefit from shared parameters, allowing the model to approximate true task performance within a 5% error margin without full training.
2. Convex Relaxation for Task Partitioning
To navigate the $O(k^{nL})$ search space, the authors formulate task partitioning as a semi-definite programming (SDP) relaxation. This convex optimization allows the system to identify approximately optimal task clusters at each layer in $O(nL)$ time. This linear complexity represents a massive speedup, enabling the discovery of branching structures even for hundreds of tasks.
3. Model Agnosticism
AutoBRANE is designed to be architecture-agnostic. It can be applied to build branching GNNs for classical graph algorithms or to organize a hierarchy of LoRA (Low-Rank Adaptation) adapters for LLMs. This flexibility allows a single base model to branch into specialized reasoning paths for natural language-based logic tasks.
Experimental Setup
The framework was evaluated across three primary benchmarks:
- CLRS-30: A standard suite of 30 classical algorithms, including sorting, searching, and graph manipulations.
- Text-Based Reasoning: CLRS-Text, GraphQA, and GraphWiz datasets, which evaluate the ability of LLMs (such as Llama-3 and Qwen) to reason about graph structures described in natural language.
- Large-Scale Community Detection: The Orkut social network dataset, comprising 21 million edges and 500 distinct labeling tasks, used to test the scalability of the branching search.
Key Results and Discussion
AutoBRANE demonstrates a superior balance between performance and efficiency compared to existing multitask baselines.
Performance Gains
On the CLRS-30 benchmark, AutoBRANE outperformed the strongest single multitask GNN by 3.7% and the leading branching baseline by 1.2%. When applied to LLMs, the framework improved text-based graph reasoning accuracy by an average of 3.2%.
Computational Efficiency
By optimizing the branching structure, AutoBRANE reduces the "noise" of multitask interference, leading to faster convergence. Compared to standard multitask baselines, it reduced training runtime by 48% and memory usage by 26%. On the Orkut dataset involving 500 tasks, it achieved a 28% accuracy gain while operating 4.5x faster than existing architectures.
Structural Interpretability
The branching structures discovered by AutoBRANE often align with human intuition. For instance, the model naturally groups Prim’s and Dijkstra’s algorithms—both of which utilize greedy edge selection—while separating them from depth-first search (DFS) variants. This suggests that gradient-based affinity effectively captures the underlying logic of the algorithms.
Limitations and Future Work
Despite its efficiency, AutoBRANE has certain dependencies. The gradient approximation relies on a high-quality joint initialization; if the initial state is poor, the affinity scores may be less reliable. Additionally, while the structure search is automated, users must still pre-define the number of layers and the maximum branch count. Future research may explore extending AutoBRANE to incremental learning scenarios, where the network dynamically grows and branches as new tasks are introduced sequentially.
Conclusion
AutoBRANE provides a scalable and efficient solution to the negative interference problem in multitask algorithmic reasoning. By leveraging gradient-based proxies and convex optimization, it enables the creation of specialized branching networks that improve accuracy while significantly lowering the computational barriers to complex multitask learning.
Summary updated