A cognitive map enables animals to recall past journeys, plan future routes, and imagine unexperienced paths. How a single neural circuit generates such diverse sequential experiences from learned knowledge remains a fundamental open question. We propose that a cognitive map defines a reference path measure, a probability distribution over sequence spaces, and that the hippocampus constructs goal-directed episodes by solving a Schrödinger bridge problem under endpoint constraints. In this framework, present cues and terminal evidence modulate sequence generation through a continuation field that evaluates path reachability to target outcomes. We demonstrate that this computation is naturally realized by hippocampal circuit dynamics: recurrent relaxation computes the continuation field, dendritic gain modulates assembly transitions, and inhibitory competition governs event completion. Furthermore, offline replay supplies internal endpoint expectations, enabling contrastive calibration of boundary representations against waking experience. Across network simulations and large-scale hippocampal electrophysiological recordings (HC-3, HC-11, and DANDI 000978), our model recovers exact path laws, reveals reusable temporal structure, accurately predicts complete-event trajectories and durations under boundary conditioning, and accounts for experience-dependent shifts in sleep replay. This work unifies attractor dynamics with conditional generative modeling, providing a shared computational foundation for memory retrieval, prospective planning, and offline consolidation.
A child who learned to add small numbers adds numbers of any length. LSTMs and Transformers trained on short sequences fail on longer ones. We trace this to what learners read when deciding. A position, count or time takes new values as input grows: it is a coordinate, and a learner that reads one meets in every long input values its experience never covered. Whether two things are the same has the same two answers at every size: it is a coincidence, and a learner that reads only coincidences finds in a long input nothing that short inputs lacked, so finite experience fixes its rule for every size. The memory carries the size of the input and the rule stays finite, and this determines the memory a generalizing brain can have: a memory that grows while what the learner reads of it stays finite has to look the same from every place, so it is made of cycles, and the past is reached by asking what happened when the cycles last stood where they stand now. The cycles are the grid modules, the cells that detect their return the place cells, the records the hippocampal index; a prefrontal controller moves the cycles and never sees them. Reading only coincidences costs no power: what finite experience fixes in such a learner is what Turing machines compute in step with their input, which is why a circuit that evolved to find the way home can learn arithmetic and grammar. In a network of neurons this machine of cycles is the dynamics seen through its symmetry, and symbols are its invariants. Trained on strings up to 40 symbols, the machine solves five benchmark tasks that no LSTM or Transformer solves, among them duplication and binary addition, and beyond the reach of its cycles it fails on the curve the theory predicts. Given larger cycles after training, a machine that saw no string longer than five symbols reverses a string of a million without error. Its controllers run unchanged on neurons.