Skip to content

5c MinGRU resets hidden state one step late during training #622

Description

@MischaU8

In 5c, MinGRU training resets hidden state on terminal[t-1], while rollout inference resets on terminal[t]. Since terminal[t] belongs to observation[t], training carries state from the previous episode into the first observation of the next, then resets one step late. Gradients also cross the episode boundary.

This was introduced in a6066343 on July 21th; the previous scan used the current terminal. It potentially affects every native 5c checkpoint & environment trained since then, especially in short-episode environments. In my SCS environment I notice a -1% evaluation score due to this.

Problematic code: forward and backward.

Expected: use terminal[t], matching rollout inference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions