liveBook · Manning

Order property

As explained in Deep Learning with Python, Third Edition

Information carried by the order of tokens in text, as opposed to only their presence or count.

Order property is the information carried by token arrangement rather than token presence or count. Shuffling a sentence may preserve some clues while creating serious ambiguity, so models must decide whether and how to represent order. section 14.3

From words to sequences

Compare “the quick brown fox jumped over the lazy dog” with “the slow brown badger.” Tokenization turns each sentence into an integer sequence, then padding makes shorter sequences rectangular for batch computation. A model can discard order with bag-of-words, process tokens sequentially with an RNN, or inject positional information while comparing locations in parallel with a Transformer. section 14.3 section 14.5

Use the order property as a practical model-selection question:

  • Discard it when token counts or presence are sufficient; choose a bag-of-words representation. section 14.3
  • Preserve it when local or long-range positional dependencies affect meaning; use an RNN, 1D ConvNet, or Transformer. section 14.3 section 14.5
  • Do not assume pooling preserves useful order: max pooling and global average pooling can destroy recency information in forecasting. section 13.2.4

How Deep Learning with Python, Third Edition covers it

How deep it goes
Compares bag-of-words, RNNs, ConvNets, and Transformers, but stops short of detailed positional-encoding internals.
Examples
Uses IMDb reviews, toy sentences, and Jena temperature forecasting to show when ordering matters and when pooling loses it.
What it assumes
Assumes familiarity with tokenization and introduces the need to convert variable-length token lists into padded integer sequences.
What you can do after
Apply sequence-aware preprocessing and choose architectures according to whether local, sequential, or positional information matters.
How it connects
Connects tokenization and padding with bag-of-words, RNNs, 1D ConvNets, Transformers, and sequence models.

Also explained in

Compare how 8 books explain Order property →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.