Skip to content

VLNActionDataset: Integer division (//) for num_rounds discards final action segments and STOP signals, leading to agent failing to learn to stop #88

Description

@followingcode

In streamvln/dataset/vln_action_dataset.py, line 657 calculates num_rounds using floor division (//):

num_rounds= (actions_len-valid_idx) //self.num_framesThenititeratesoverrange(num_rounds+1) andskipsthelastemptywindow (whenn*self.num_frames==actions_len-valid_idx), whichresultsinonlynum_roundssamplesbeingaddedperepisode.
Thismeans:
Foranyepisodewhere (actions_len-valid_idx) %self.num_frames!=0, thefinalactionsegment (includingtheSTOPstep) isdiscardedentirely.
ThetrainingsetlosesalargenumberofSTOPsignals, sotheagentneverseesenoughexamplesofwhentostopduringnavigation.
Thiscouldleadtotheagentfailingtostopatthetargetduringinference, severelyhurtingnavigationsuccessratesandSPLmetrics.
Exampleactions_len-valid_idx=87self.num_frames=32num_rounds=87//32=2Onlywindows0~31and32~63arekept; thefinalsegment64~87 (includingSTOP) islost.
SuggestedFixInsteadofdiscardingthefinalsegment, weshoulduseceilingdivisiontokeepallactionsegments (includingthelastpartialone) andpadshortersegmentstoself.num_frameslengthduringcollation. Thisway:
Noaction/STOPstepsarediscardedTheagentcanlearntorecognizeandexecutetheSTOPsignalTrainingstabilityismaintainedviapaddingCouldwemodifythesamplinglogictopreserveallactionsegments (includingpartialones) insteadofusingfloordivision?

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