The year column doesn't match the sentences
Hi! I noticed something odd while working with this dataset, especially when using the year column for time-based train test splits.
It seems that the year values often don't match the actual time period of the sentences. Here are a few examples from train.csv
- "On balance, most participants still expected inflation to moderate later this year and in 2009." is assigned to 2005, even though it comes from the March 2008 minutes.
- "However, equity prices subsequently retraced some of the earlier declines as concerns about trade policy seemed to ease and corporate earnings reports for the first quarter of 2018 generally came in stronger than expected." is assigned to 2007, but comes from the May 2018 minutes.
- "Indeed, the National Bureau of Economic Research's Business Cycle Dating Committee determined in July that the recession that began in March of last year ended in April..." is assigned to 2005, despite coming from a November 2021 speech by Clarida.
I did a quick check using the dataset itself and found that this might be a fairly widespread issue
import re
import pandas as pd
base = 'https://huggingface.co/datasets/gtfintechlab/fomc_communication/resolve/main/'
df = pd.concat([pd.read_csv(base + f) for f in ['train.csv', 'test.csv']], ignore_index = True)
mentions = 0
later = 0
for sentence, year in zip(df['sentence'], df['year']):
numbers = [int(n) for n in re.findall(r'\b\d{4}\b', sentence)] # 4-digit numbers
found = [n for n in numbers if 1980 <= n <= 2039] # keep the ones that look like years
if found:
mentions += 1
if max(found) > year + 3:
later += 1
print(f'sentences mentioning a year: {mentions}')
print(f'sentences mentioning a year more than 3 years after the year column: {later}')
The result is that 198 sentences explicitly mention a year, and 70 of them mention a year more than three years after the assigned year.
I also looked into the original files in the GitHub repository, under data/filtered_data. Among the 2,178 sentences that could be matched to a single document, only 133 have a year value matching the document's actual year, which is about what you'd expect by chance.
Looking further into the original annotation files (data/annotated_data/manual-*.xlsx), I noticed that the sentences appear to be sorted alphabetically, while the year values are grouped in blocks of five. This makes me suspect that the sentence column may have been sorted independently, without applying the same sorting to the year column.
The labels themselves seem to be fine. The issue appears to be limited to the year column.
I think this is worth pointing out because anyone using year for time-based splits (for example, to prevent look-ahead bias) could end up with a split that is effectively random rather than chronological. The year-based split in the repository's look_ahead_bias/ folder seems to have the same issue.
Fortunately, the correct years seem recoverable from the filenames in filtered_data.
I haven't included the full mapping here, but I'm happy to share the sentence-to-file mapping if that would help with fixing the dataset.
Thanks!
Yes, please ignore the year column. We are no longer maintaining the dataset.