Decoding mental contents from brain activity is a long-standing goal in theoretical neuroscience and neural engineering. While current methods perform well in tasks with externally timed events, such as perception or motor execution, decoding covert cognitive processes like imagery or memory recall remains challenging due to uncertainty in the timing of underlying neural dynamics. In these settings, neurophysiological responses are not reliably linked to observable behaviour and likely vary in latency across trials. This complicates the use of time-locked analysis techniques, which perform decoding time point by time point across trials, thus assuming consistent signal timing. This problem corresponds to an understudied class of supervised learning where input features may be effectively mislabelled and need to be aligned across cases. To address this, we present the Adaptive Decoding Algorithm (ADA), a nonparametric method based on a two-level prediction. First, we estimate, for each trial, the temporal window most likely to reflect task-relevant signals; second, we decode the test trials based on the selection of informative windows. Using controlled simulations as well as a model of memory recall based on real perception data, we show that ADA outperforms alternative methods that assume fixed temporal structure. These results provide evidence that explicitly accounting for trial-specific timing can substantially improve decoding performance when the timing of relevant neural activity is unknown.