Resources
This page provides access to software tools, code repositories, and methods developed by the Computational Memory Lab for analyzing brain activity and modeling memory.
BOSC: Better OSCillation Detection
BOSC (Better OSCillation detection) is a method for detecting oscillatory activity in EEG and other electrophysiological signals. Unlike traditional spectral analysis methods, BOSC produces systematic, objective, and consistent results across frequencies, brain regions, and tasks by modeling the functional form of the background spectrum.
The method works by:
- Modeling the background spectrum as colored noise (power scaling as 1/frequency)
- Fitting the background with linear regression in log-log coordinates
- Setting a power threshold based on the 95th percentile of the theoretical chi-square distribution
- Applying a duration threshold (typically 3 cycles) that scales with frequency
- Detecting oscillations only when both thresholds are exceeded
This approach minimizes bias in oscillation detection across frequency, brain region, and task, and has been shown to be robust to dramatic changes in brain state. The method produces a useful quantitative measure called Pepisode: the proportion of time during which detected oscillations are present.
Whitten, T. A., Hughes, A. M., Dickson, C. T., and Caplan, J. B. (2011). A better oscillation detection method robustly extracts EEG rhythms across brain state changes: The human alpha rhythm as a test case. NeuroImage, 54(2), 860-874. [BOSC scripts]
Optimized BOSC
Optimized BOSC is an enhanced version of the BOSC method that incorporates several improvements for increased robustness, particularly when using short time windows or when analyzing signals with oscillations at the edges of the measured frequency spectrum.
Key improvements include:
- High-power value removal: Removes power values exceeding a high threshold (99.9th percentile) to reduce the influence of oscillatory activity or artifacts on the background estimate
- Median-based regression: Uses median rather than mean power values at each frequency, which reduces the influence of outliers
- Robust regression: Employs iteratively reweighted least squares regression to further downweight outliers in the power spectrum
The optimized method shows enhanced performance when:
- Using shorter time windows (less than 30 seconds)
- Substantial power exists at one end of the measured spectrum
- High-power artifacts are present in the signal
For signals with no prominent peak or a peak near the middle of the power spectrum (like the alpha range), the standard BOSC method performs well. The optimized version is recommended for less conventional scenarios.
Pawluk, K. A., Shalamberidze, T., and Caplan, J. B. (2025). Making oscillation detection more robust. Journal of Neuroscience Methods, 422(110510).
REM Model Implementation
Code for the REM (Retrieving Effectively from Memory) model implementation used in our research on associative recognition memory. This implementation demonstrates how item memory can emerge from an associative memory system without requiring separate hippocampal associations for item recognition.
Caplan, J. B. and Guitard, D. (in press). Spaced repetition and list-strength in recognition memory. Memory & Cognition.