Objective-Specialized Residual Streams in Manifold-Constrained Hyper-Connections

Shantanu Agarwal, Ruchita V. Maitri, Zhiqi Huang, Vivek Datla, Alfy SamuelarXiv 2026

Standard Transformers process information through a single "residual stream"—a highway of data that flows through the model's layers. Recent research introduced Manifold-constrained Hyper-Connections (mHC), which expand this highway into multiple parallel lanes (streams). While previous work trained all lanes to do the same job, a new paper from researchers at Capital One asks a provocative question: What happens if we give each lane a different objective?

TL;DR

By assigning distinct learning objectives (like lexical vs. semantic retrieval) to different parallel residual streams in an mHC-equipped Transformer, models achieve significantly better performance. This "objective specialization" emerges naturally in the final layers of the network, driven primarily by specialized routing rather than complex inter-stream mixing.

What Problem Does This Paper Address?

In multi-task or multi-objective learning, models often face a tug-of-war. Sharing representations can help (transfer learning), but it can also lead to "task interference," where the requirements of one objective degrade the performance of another.

The authors explore whether the multi-stream architecture of mHC can provide a structural solution to this. Specifically, they look at Information Retrieval (IR), which typically relies on two complementary signals:

  1. Lexical (Sparse) Matching: Finding exact word overlaps (e.g., "BM25" style).
  2. Semantic (Dense) Matching: Finding conceptual similarity (e.g., "vector embeddings").

Usually, these are handled by separate models or a single stream forced to juggle both. This paper investigates if dedicated "lanes" for each can improve the final result.

Methods

The researchers retrofitted ModernBERT (base and large) with mHC. In a standard Transformer, a sublayer (like Attention or an MLP) reads from the residual stream and writes its update back to it. In mHC, this process is governed by three learned components:

  • Read Gates: How much each parallel stream contributes to the sublayer's input.
  • Write Gates: How the sublayer's output is distributed back across the streams.
  • Mixing Matrix: How the streams exchange information with each other between layers.

The core experiment compares three setups:

  1. Single-stream: The standard Transformer baseline.
  2. Non-specialized mHC: Multiple streams, but both sparse and dense heads read from all of them.
  3. Objective-specialized mHC: Disjoint sets of streams are assigned to the sparse and dense objectives at the output layer.
Schematic of the three configurations: Single-stream, Non-specialized mHC, and Objective-specialized mHC.

Datasets

  • Training: The models were fine-tuned on the Natural Questions (NQ) dataset (approx. 100k query-passage pairs).
  • Evaluation: To test generalization, the authors used the BEIR benchmark, a suite of 13 diverse retrieval datasets (e.g., HotpotQA, FEVER, ArguAna).

Key Insights and Ideas

  • Depth-Dependent Specialization: The model doesn't specialize immediately. For the first ~75% of the layers, the streams remain highly similar and the gradient flow is distributed. Specialization is a "late-stage" phenomenon, occurring sharply in the final layers.
  • Routing Over Mixing: Surprisingly, the benefit doesn't come from clever "mixing" of streams. When the authors fixed the mixing matrix to a simple identity matrix (no cross-talk), the performance gains remained. The magic happens in the read/write gates, where the model learns to route specific information to specific lanes.
  • Coherent Grouping: In 4-stream models, the streams don't just become four random things. They form two coherent pairs, where streams assigned to the same objective stay similar, while those assigned to different objectives diverge sharply.
Figure 3: Four depth-resolved specialization probes at the final checkpoint, for n=2 (top) and n=4 (bottom) streams (lines are the mean and shaded bands ±1 standard deviation over 4 seeds; flat layers 0–9 omitted). From left: stream cosine similarity, residual-mixing identity retention diag(A), per-objective gradient share on the assigned stream(s), and read/write gate shift. Red: specialized; blue: non-specialized control. Solid vs. dashed distinguishes the two objectives / gates / stream-pair types (legends). Metrics are defined and discussed in Section 5.

Key Results

The specialized mHC models consistently outperformed both the single-stream and non-specialized mHC versions across the entire spectrum of sparse-dense fusion.

  • Performance Boost: On the BEIR benchmark (ModernBERT-base), objective specialization improved average nDCG@10 from 0.4310 to 0.4486 (2 streams) and from 0.4410 to 0.4529 (4 streams).
  • Scalability: The gains held true for ModernBERT-large, with the 4-stream specialized model achieving the highest overall scores (0.4748 nDCG@10).
  • Robustness: The specialized models were superior regardless of how much weight was given to sparse vs. dense results during final scoring (the "fusion weight").
Figure 2: Average BEIR nDCG@10 as a function of the fusion weight α, for ModernBERT-base (left) and ModernBERT-large (right); both mean over two seeds. α = 0 and α = 1 correspond to pure sparse and pure dense retrieval, respectively. Color encodes objective specialization (red: specialized, blue: non-specialized); Sparse+Dense (n=1, grey) has no stream routing. Spe- cialized models (red) dominate at every α for both stream counts and at both base/large model scales.

Limitations and Future Work

  • Objective Diversity: The study only looked at sparse vs. dense retrieval. It remains to be seen if this works for more conflicting objectives (e.g., summarization vs. sentiment analysis).
  • Architectural Scope: The experiments were limited to encoder-only models. Applying this to decoder-based generative models (like Llama or GPT) is a natural next step.
  • Stream Allocation: The authors split streams 50/50 between objectives. Future work could explore "asymmetric" allocation—perhaps one task is harder and deserves 3 out of 4 streams.

Summary updated

Abstract

Manifold-constrained Hyper-Connections (mHC) extend a Transformer's residual stream into multiple parallel streams with learned cross-stream connections. Prior work trains all streams toward a shared objective. We instead study whether assigning distinct learning objectives to different streams can improve task performance and induce objective-specific specialization. Using complementary lexical (sparse) and semantic (dense) retrieval objectives as a test case, we find that objective-specialized mHC consistently outperforms a non-specialized mHC model across the full sparse--dense fusion range, for both two- and four-stream models and at two model scales. We then examine how specialization changes the model internally using probes of stream representations, residual mixing, objective-specific gradient flow, and read/write gates. The specialized and non-specialized models behave similarly through most of the network but diverge in the final layers: the specialized model develops increasingly objective-specific gradient flow, distinct read/write routing patterns, and reduced cross-stream mixing, and streams assigned to different objectives become increasingly dissimilar while those trained toward the same objective remain highly similar. Fixing the residual mixing to the identity leaves the specialization benefit intact, indicating that the benefit stems from objective-specific read/write routing rather than learned cross-stream mixing. These results show that assigning distinct objectives to mHC streams can improve multi-objective retrieval while inducing structured, depth-dependent specialization in the residual computation.
BibTeX
@misc{agarwal2026objective,
  author = {Shantanu Agarwal and Ruchita V. Maitri and Zhiqi Huang and Vivek Datla and Alfy Samuel},
  title = {{Objective-Specialized Residual Streams in Manifold-Constrained Hyper-Connections}},
  year = {2026},
  eprint = {2611.24567},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.24567},
}
Figure