SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.01575 · 2022

CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 11 functions out of this paper's own repositories and ran 7 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
salesforce/CoST canonical 7 of 11
FunctionStatusWhere it lives
cal_metrics Ran salesforce/CoST/tasks/forecasting.py
code served (permissive licence) · get_code("a4750195b8805692")
fit_ridge Ran salesforce/CoST/tasks/_eval_protocols.py
code served (permissive licence) · get_code("1d3809217bd3608f")
generate_binomial_mask Ran salesforce/CoST/models/encoder.py
code served (permissive licence) · get_code("fd10054ec4772b80")
generate_continuous_mask Ran salesforce/CoST/models/encoder.py
code served (permissive licence) · get_code("acda587a1d1be3bf")
pad_nan_to_target Ran salesforce/CoST/utils.py
code served (permissive licence) · get_code("5254eb44ce12370e")
pkl_load Ran salesforce/CoST/utils.py
code served (permissive licence) · get_code("645d1fdb1dc0e80c")
torch_pad_nan Ran salesforce/CoST/utils.py
code served (permissive licence) · get_code("79783deb10f33397")
eval_forecasting Not yet run salesforce/CoST/tasks/forecasting.py
code served (permissive licence) · get_code("a0b497709017e0db")
generate_pred_samples Not yet run salesforce/CoST/tasks/forecasting.py
code served (permissive licence) · get_code("63e193a1a856ae88")
load_forecast_csv Not yet run salesforce/CoST/datautils.py
code served (permissive licence) · get_code("3dc27cba7950c088")
load_forecast_npy Not yet run salesforce/CoST/datautils.py
code served (permissive licence) · get_code("ee0abcf391ea662f")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Deep learning has been actively studied for time series forecasting, and the mainstream paradigm is based on the end-to-end training of neural network architectures, ranging from classical LSTM/RNNs to more recent TCNs and Transformers. Motivated by the recent success of representation learning in computer vision and natural language processing, we argue that a more promising paradigm for time series forecasting, is to first learn disentangled feature representations, followed by a simple regression fine-tuning step -- we justify such a paradigm from a causal perspective. Following this principle, we propose a new time series representation learning framework for time series forecasting named CoST, which applies contrastive learning methods to learn disentangled seasonal-trend representations. CoST comprises both time domain and frequency domain contrastive losses to learn discriminative trend and seasonal representations, respectively. Extensive experiments on real-world datasets show that CoST consistently outperforms the state-of-the-art methods by a considerable margin, achieving a 21.3% improvement in MSE on multivariate benchmarks. It is also robust to various choices of backbone encoders, as well as downstream regressors. Code is available at https://github.com/salesforce/CoST.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2202.01575")
get_code_for_paper("2202.01575")
have("2202.01575")

Connect an agent — have() is free.