Neural Networks with Dynamic Input Dimensionality

83 concepts72 papers1 proposal

Standard deep learning architectures are built like rigid molds. A classical Multi-Layer Perceptron (MLP) expects an input vector of an exact, predetermined size. A standard Convolutional Neural Network (CNN) requires a fixed pixel grid, and traditional reinforcement learning models rely on static state vectors.

However, the real world is fluid. In autonomous driving, the number of surrounding vehicles and pedestrians changes from second to second. In multi-agent systems, teammates and adversaries constantly enter or exit the field. When forced to use rigid architectures, engineers typically resort to artificial workarounds like zero-padding or data truncation. These approaches are not only computationally wasteful, but they also fail to capture the underlying structure of dynamic environments.

To bridge this gap, a growing body of research focuses on architectures capable of handling dynamic input dimensionality—systems that natively adapt to variable-length state representations without requiring retraining or structural modifications.

The Problem with Rigid Tensors

To understand why standard networks struggle with variable inputs, consider a simple reinforcement learning agent trained to manage traffic. If the network expects a fixed-size vector representing exactly five nearby vehicles, what happens when a sixth vehicle enters the sensor range?

If we pad the input with zeros, the network must waste capacity learning that a vector of zeros means "nothing is here." Conversely, if we truncate the data, the agent becomes blind to critical threats.

Beyond the sheer count of entities, traditional architectures suffer from a lack of permutation invariance. As Dorsa Sadigh et al. demonstrate in Exchangeable Input Representations for Reinforcement Learning, standard networks treat the order of inputs as meaningful. If the network receives data from "Vehicle A then Vehicle B," it processes it differently than "Vehicle B then Vehicle A," wasting millions of training samples simply learning that the identity order of identical objects does not matter.

Permutation Invariance and Set-Based Processing

The foundational step toward handling dynamic input sizes is treating inputs not as ordered vectors, but as sets. Mathematically, a set has no inherent order, and it can grow or shrink seamlessly.

To process a set, an architecture must use operations that yield the same result regardless of how the inputs are ordered (such as summation, averaging, or maximization). By combining these permutation-invariant operators with standard neural layers, models can ingest variable numbers of entities.

For example, in strategic game theory, Jason Hartford et al. developed a matrix-based neural network in Deep Learning for Predicting Human Strategic Behavior capable of processing payoff matrices of entirely different dimensions while maintaining consistent strategic predictions.

This flexibility is equally vital in the physical sciences. In quantum chemistry, Nicholas Gao et al. show in Generalizing Neural Wave Functions how mapping molecular orbitals to spatial embeddings allows a single generalist network to solve the Schrödinger equation across diverse molecules, scaling naturally with the number of electrons and nuclei.

Relational Scaling via Graph Neural Networks

While set-based architectures solve the problem of variable entity counts, they often treat entities as isolated items. In complex environments, the interactions between entities are what matter most.

Graph Neural Networks (GNNs) provide an elegant solution by representing entities as nodes and their interactions as edges. Because the core mechanism of a GNN—message passing—occurs locally between neighboring nodes, the network structure naturally expands or contracts depending on the graph size.

[ Vehicle 1 ] <---> [ Ego Vehicle ] <---> [ Vehicle 2 ]
                           ^
                           |
                           v
                    [ Pedestrian ]

Figure 1: A graph representation allows an autonomous vehicle to scale its reasoning to any number of surrounding agents by treating them as dynamic nodes.

This relational flexibility is highly effective for spatial coordination. Maria Hügle et al. leverage this in Dynamic Interaction-Aware Scene Understanding for Reinforcement Learning in Autonomous Driving, combining GNNs with set-based processing to allow autonomous vehicles to navigate dense, unpredictable traffic without losing critical context.

Furthermore, this architecture enables remarkable zero-shot generalization. In multi-robot coordination, Siddharth Nayak et al. demonstrate in Scalable Multi-Agent Reinforcement Learning through Intelligent Information Aggregation that a GNN-based policy trained on just three robots can be deployed directly to a fleet of fifteen without any retraining. Similarly, in open ad hoc teamwork environments where teammates join or leave mid-task, Jing Sun utilizes heterogeneous GNNs to model fluid team relationships on the fly.

Transformers as Dynamic Sequence Processors

Although originally popularized in natural language processing, the self-attention mechanism at the heart of the Transformer is fundamentally a set-to-set operation. Before positional encodings are added, self-attention computes relationships between all tokens globally, making it uniquely suited for tracking a fluctuating number of entities.

In the domain of cybersecurity, Alberto Caron demonstrates in Entity-based Reinforcement Learning for Autonomous Cyber Defence that Transformer-based policies allow defensive agents to protect computer networks of varying shapes and sizes, successfully defending a 40-node network using a policy trained only on 10 nodes.

In computer vision and robotics, this sequence flexibility allows models to break down complex scenes into manageable components. Jianing Qian et al. show in Task-Oriented Hierarchical Object Decomposition for Visuomotor Control that feeding discrete object and part embeddings directly into a Transformer policy creates a variable-length input space. The robot can then adapt its manipulation strategies based on the visual complexity of the scene, bypassing the need for a rigid, one-size-fits-all scene vector.

The Frontier of Dynamic Outputs

Handling variable-sized inputs is only half of the equation; many real-world problems also require networks to generate a variable number of outputs. For instance, a scheduling network must assign tasks to a queue that changes size minute by minute, or a multi-agent controller must map actions to a fluctuating pool of targets.

When the available action set changes dynamically, standard fixed-dimension output layers fail. To address this, Jiajun Chai et al. introduce a two-stream action-value architecture in UNMAS: Multiagent Reinforcement Learning for Unshaped Cooperative Scenarios, allowing agents to map decisions to a changing number of external targets without losing semantic consistency.

In combinatorial optimization, where the number of constraints depends entirely on the problem instance, the challenges are even steeper. The authors of CombOptNet: Fit the Right NP-Hard Problem by Learning Integer Programming Constraints, Anselm Paulus et al., solved this by designing a differentiable optimization layer capable of adjusting to a variable number of constraints and variables. This allows deep learning models to solve NP-hard problems directly within neural architectures, regardless of how the problem scales.

By moving away from fixed tensor constraints and embracing sets, graphs, and attention mechanisms, modern deep learning architectures are becoming as dynamic as the environments they are designed to operate within.

Key Foundational Work

Deep Structured Models For Group Activity Recognition (2015) — contributed 1 concept elements to this direction.
Deep Learning for Predicting Human Strategic Behavior (2016) — contributed 1 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 75 papers
  2. Version 1 · 2026-10-04 · 65 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_dynamic_input_dimensionality_522717fc,
  title = {dynamic input dimensionality},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/dynamic-input-dimensionality/rdr_522717fc2549440db995578e7a31c628},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 2, frozen text):

@misc{lacuna_dynamic_input_dimensionality_522717fc_v2,
  title = {dynamic input dimensionality},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/dynamic-input-dimensionality/rdr_522717fc2549440db995578e7a31c628/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake