﻿# PatchTST channel independence: shared weights and individual heads are different choices

Trace original PatchTST channel-independent encoding and shared or per-channel forecast heads without inferring cross-channel attention from multivariate input shape.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-patchtst-channel-independent-shared-versus-individual-heads/
Language: en

## Distinguish shared learning from joint attention

PatchTST's channel-independent design shares parameters across univariate channel histories. The [original paper](https://arxiv.org/abs/2211.14730) presents this choice alongside patching. Sharing trained weights allows experience across training channels without making every forward request one joint channel-attention problem. Describe those two ideas separately. A multivariate input tensor does not establish that one channel's current observations are directly used as attention context for another channel's forecast.

## Follow the encoder reshape

The [supervised backbone](https://raw.githubusercontent.com/yuqinie98/PatchTST/main/PatchTST_supervised/layers/PatchTST_backbone.py) reshapes channels into the encoder's effective batch while keeping each channel's patch sequence. A layout port must preserve that mapping, not concatenate all channel patches into a single attention sequence. The latter can run successfully but creates a different information path. Check evaluation mode and the reference implementation when testing forward independence, so training-time batch-dependent behavior is not confused with the intended inference architecture.

## Inspect the forecast-head choice independently

The same backbone offers a shared flattened head or separate per-channel heads. Individual heads can specialize output mappings without turning the encoder into cross-channel attention. The [model wrapper](https://raw.githubusercontent.com/yuqinie98/PatchTST/main/PatchTST_supervised/models/PatchTST.py) passes that option into construction. Preserve the selected state and channel schema when loading a checkpoint; replacing a shared head with multiple new heads changes parameter provenance rather than simply changing output formatting.

## Preserve channel identity where parameters depend on it

With separate heads, channel order identifies which learned mapping receives a representation. An adapter cannot freely reorder channels without carrying the same semantic mapping. The [TinyTimeMixer channel guide](/journal/fg2-tinytimemixer-channel-independent-mixing-training-state/) provides a related architectural comparison. Even with shared components, preserve units, normalization and output labels so that an apparently permutation-compatible numerical path does not attach correct predictions to the wrong measurement names.

## Test the information path before quality

Use an evaluation-mode fixture changing one input channel while holding others fixed, and compare with the pinned reference. Then check head selection and output-label mapping under a controlled channel permutation. The [Moirai packing guide](/journal/fg2-moirai-packed-sample-variate-identity-scaling/) offers another identity boundary. A reliable description states where weights are shared, where representations interact and where channel-specific parameters apply, rather than using the word multivariate as a substitute for the actual network structure.
