﻿# Original SALMONN: dual audio encoders meet through a window-level Q-Former

Trace original SALMONN speech and sound features through temporal padding, feature concatenation, window queries, and projection into the language model input space.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-salmonn-dual-encoder-window-qformer-fusion/
Language: en

## Select the original architecture

The [original SALMONN paper](https://arxiv.org/abs/2310.13289) integrates a text language model with speech and audio encoders. The project has expanded into a family, so the [original implementation branch](https://github.com/bytedance/SALMONN/tree/salmonn) matters when reproducing this architecture. A later family member can have different components and capabilities. Preserve the branch and configuration rather than using the family name as a complete description of the deployed auditory processing path.

## Keep complementary feature streams

The original design combines a speech encoder with BEATs audio features. This supplies a representation of auditory input rather than only a transcript string. The distinction matters when a spoken utterance is accompanied by environmental events or music. Removing the audio branch or substituting recognized words creates a different information boundary. It may be useful in another system, but it should not silently be described as an equivalent export of the original multimodal bridge.

## Inspect alignment and windowing

The [model implementation](https://raw.githubusercontent.com/bytedance/SALMONN/salmonn/models/salmonn.py) normalizes the feature streams, pads the shorter temporal sequence, and concatenates features along the feature dimension. In its window-level path, unfolding constructs temporal windows for learned query tokens. The Q-Former output is projected into the language model embedding space and reassembled into an audio-token sequence. Temporal padding here is a concrete tensor operation; it should not be interpreted as a proof of perfect acoustic alignment between independently computed feature streams.

## Diagnose a bridge-porting mistake

Consider a recording containing a spoken instruction over an alarm. A port may preserve encoder outputs yet reshape windows in a different order before querying them. The final embedding width can still look correct while temporal organization changes. Save intermediate stream lengths, concatenated features, window ordering, and projected tokens in a small fixture. This separates feature extraction from bridge assembly without claiming that a particular alarm will always be recognized or that transcript-free reasoning is infallible.

## Evaluate the actual auditory pathway

Record encoder artifacts, branch revision, window configuration, query count, projection weights, and prompt assembly. Guides to [tensor axes](/journal/tensor-axes-batch-sequence-hidden/) and [audio representations](/journal/audio-codec-token-generation/) support the audit. Compare speech-only and sound-dependent questions using the same controlled input. The useful question is whether the implemented bridge preserves the intended information and ordering, before broader answer quality is attributed to a model-family name or to the language model alone.
