Writing History into Weights: Streaming Video Long-Term Memory

    Streaming video understanding needs memory that supports later questions without crowding the current input. This article explains why long visual history strains real-time VLMs, how low-rank adapters and hypernetworks can encode history as lightweight parameter updates, and how training, forgetting, deployment, and evaluation determine whether the system actually recalls events while remaining usable.

    Why streaming video needs a different memory mechanism

    Streaming video understanding is not simply image QA with more frames. The system must keep an evolving model of events in a changing environment.

    A video assistant watching a procedure may face questions at three levels:

    • What is happening now: which object is the operator moving?
    • What changed: has this object been relocated?
    • What happened earlier: who placed it on the workbench minutes ago?

    The first class depends on current-frame recognition. The latter two require associations among time, agents, actions, and objects. Scattered visual features may show that an object appeared, without who moved it, when, or how its state changed.

    Memory in streaming video is therefore not a cache. It is a history representation for unknown future questions, under limited resources. Common practice puts keyframes, text summaries, or visual features into context. As video lengthens, history and the current observation share input capacity and attention. The system wants more of the past and more compute on the present.

    Encoding history into updatable adapter weights is one research response: instead of only expanding the input, change the parameter state used on the current input.

    Why historical input slows real-time understanding

    Vision-language models jointly handle vision and language. Video is sampled and encoded into internal representations. Longer duration means more historical tokens. In full attention, cost typically grows steeply with sequence length; even optimized implementations add compute, cache, and transfer load.

    “More history means less attention on now” is only an analogy. Models do not have a fixed, evenly split attention budget. Long history makes relevant versus irrelevant signals harder to separate, and can add visual repetition, event confusion, and temporal interference.

    Typical history strategies involve trade-offs:

    1. Keep a recent window

    A short window controls latency and suits current-action recognition, but drops everything outside the window.

    2. Save keyframes

    Keyframes reduce redundancy but miss brief actions. The same stills can correspond to different action orders, which often define event meaning.

    3. Generate text summaries

    Summaries compress and retrieve well, but they are lossy. Details deemed unimportant at summary time may be exactly what a later question needs.

    4. Put all history in context

    This retains more information, but cost keeps growing, and keeping details in the input does not guarantee the model can find and use them.

    Long-term memory must not only “fit,” but also be findable, correctly used, and timely.

    Core idea: let history change parameters, not occupy the input forever

    Weight-based memory turns historical video into lightweight parameter updates so current frames and questions are processed under that history.

    Two parameter classes matter:

    • Base model parameters: general vision and language ability; typically frozen.
    • Dynamic adapter parameters: smaller, video-history-dependent, encoding session or stream memory.

    Writing memory into weights does not store every frame, nor grant exact video playback. It is task-relevant compression: adapters change internal computation so answers stay consistent with past events.

    The systems problem shifts from organizing ever-longer inputs to producing a parameter state that carries history.

    Low-rank adapters as a compact memory substrate

    Low-rank adaptation is a common parameter-efficient method. For a linear map:

    W_effective = W_base + ΔW

    with frozen W_base and extra ΔW. Low-rank form:

    ΔW = s · B · A

    If W_base is d_out × d_in, A and B can be r × d_in and d_out × r, with rank r and scale s. For small r, extra parameters are about r × (d_in + d_out), not d_in × d_out.

    Those adapters carry history: different video histories yield different parameter states on the same frozen base. Rank, which layers are adapted, and how history is encoded bound capacity. More parameters do not automatically mean more accurate memory; they can raise training difficulty and deployment cost.

    How a hypernetwork maps video history to adapters

    A hypernetwork generates other networks’ parameters. Here it does not answer the user; it maps a history representation to dynamic adapters.

    Abstractly:

    1. History encoding: convert observed clips into visual and temporal features.
    2. State update: fuse the new clip with prior history into a memory representation.
    3. Parameter generation: map that representation to low-rank adapters for the answering model.

    Conceptually:

    ht = U(h(t-1), E(v_t))

    θ_t = G(h_t)

    answer = F(x_current, question; W_base, θ_t)

    E encodes video, U updates history, G generates parameters, F is the answering model. This is an information-flow sketch, not a full architecture. Systems may aggregate history differently or update adapters directly from history features.

    At inference, the model need not reread the entire video. It uses the current frame, the question, and the current parameter state. History processing still happens—encoding, aggregation, generation—but some cost moves from each Q&A into continuous video intake.

    Training decides what is remembered

    Dynamic parameters do not become useful memory by default. The hypernetwork must learn which history should induce which parameter change.

    Training should cover at least:

    1. Historical fact recall

    Questions about earlier agents, actions, objects, and locations, so the model cannot rely only on the current frame or general knowledge.

    2. Cross-time relations

    Whether an object moved multiple times, action order, and differences between current and earlier states—event structure, not mere object presence.

    3. Preserving current observation

    Remembering the past must not destroy live recognition. Training and evaluation should track both.

    Freezing the base model does not remove training compute. Loss still flows to the hypernetwork and other trainable parts; frozen weights are not updated.

    Avoid leakage: inputs used to form memory at a given time must not include later video, or apparent long-term memory may be future peeking.

    Forgetting, interference, and session isolation

    As video arrives, memory must update. New events can reinforce or overwrite old ones. If parameters mainly fit recent frames, the system may know the current location and forget the initial one; if old states are too sticky, obsolete facts may be treated as current.

    Design should treat history types differently:

    • Current state can be replaced.
    • Past events should keep temporal attributes.
    • Repeated frames can be compressed.
    • Rare but critical events need higher retention priority.

    Forgetting control, importance weighting, and multi-timescale memory are design directions; they are not automatic properties of weight-based memory and need experiments.

    Dynamic weights should bind to a stream or session. Sharing one mutable state across sessions causes crosstalk. Systems need initialization, versioned updates, and cleanup after a session ends.

    Throughput and consistency at deployment

    The base model can be shared, but each session keeps its own adapter state. At high concurrency, storing, loading, and scheduling those parameters can bottleneck.

    Focus on:

    Update frequency. Not every frame needs new parameters. Segment, event change, or budget can drive updates; lower frequency can lag memory.

    Read consistency. When answering, use a complete, stable parameter snapshot, not a half-updated state.

    Time alignment. Memory versions should record how far video has been processed, so “what happened before” has a defined horizon.

    Failure recovery. Checkpoints and limited retained clips can restore progress; do not assume adapter state never vanishes.

    Sensitive data. Weights carry information. Privacy still needs access control, session isolation, retention limits, and deletion.

    How to test whether long-term understanding actually improves

    Do not rely on a few plausible answers. Under comparable resources, compare recent windows, keyframes, text summaries, and history retrieval.

    Measure at least:

    • Current-event accuracy: live understanding should not collapse.
    • Recall vs. temporal distance: short, medium, and long-range questions.
    • Order and state-change accuracy: whether temporal structure is kept.
    • First-response and overall Q&A latency: online update vs. answering cost.
    • Single- and multi-stream resource use: parameter state, cache, compute.
    • Unanswerable questions: whether the system admits uncertainty when evidence is missing.

    Use counterfactuals and distractors: change action order in similar scenes; flood with repeated frames and check whether key events survive.

    Claims such as “what happened tens of minutes ago” need test conditions. Span, video complexity, question grain, and allowed resources change results; mechanism alone does not prove reliable long-term memory.

    Weight memory as one layer, not the sole source of truth

    Weight-based memory reduces history’s hold on the input window and supplies compressed historical conditioning. It is not a precise database or a full video archive.

    For procedure review or incident investigation, a hybrid is safer:

    • Dynamic adapters for fast, gist-level history.
    • Structured event logs for time, agents, and state changes.
    • Selected clips as evidence.

    The system can interpret a question with compressed memory, then retrieve original evidence for precise times, critical actions, or high-stakes conclusions.

    Encoding history as weights is a shift from growing the input to evolving internal state. It may ease the conflict between recall and live observation, but usable systems still need the right training tasks, explicit capacity limits, reliable state management, and traceable evidence. The goal is not looking like it remembers for a long time, but using history accurately when needed—and stating limits when memory is insufficient.