aihwkit.inference.noise.reram module
Phenomenological noise models for ReRAM devices for inference.
- class aihwkit.inference.noise.reram.ReRamCMONoiseModel(coeff_dict=None, g_max=None, g_min=None, prog_noise_scale=1.0, read_noise_scale=1.0, drift_scale=1.0, decay_dict=None, read_dict=None, acceptance_range=0.02)[source]
Bases:
BaseNoiseModelNoise model inferred from Analog Filamentary Conductive-Metal-Oxide (CMO)/HfOx ReRAM devices from IBM Research Europe - Zurich.
This noise model is estimated from statistical characterization of CMO/HfOx devices from Falcone et al. (In Review)
- Programming noise:
Described by a linear function with respect to the G target. Coefficients are considered for two acceptance ranges, 0.2% and 2% of target conductance
- Conductance Decay:
Drift in CMO/HfOx devices showed independence of the target conductance value. Mean and STD of the conductance distribution were fitted with 1st-order polynomial as a function of the log(t) where t is the time of inference
TODO: Read noise (1/f) characterization of CMO/HfO<sub>x</sub> available at Lombardo et al. DRC (2024) but not implemented.
Note
To account for short-term read noise (about 1%) one should additional set the
forward.w_noiseparameter to about 0.01 (with w_noise_type=WeightNoiseType.ADDITIVE_CONSTANT)- Parameters:
coeff_dict (Dict[float, List] | None) – acceptance range with coefficients for the programming noise in \(\mu S\),
g_converter – Instantiated class of the conductance converter for a single device per
cross-point.
g_max (float | None) – In \(\mu S\), the maximal conductance, i.e. the value the absolute max of
to. (the weights will be mapped)
g_min (float | None) – In \(\mu S\), the minimal conductance, i.e. the value the absolute min of
to.
prog_noise_scale (float) – Scale for the programming noise.
read_noise_scale (float) – Scale for the read and accumulated noise.
drift_scale (float) – Scale for the drift coefficient.
uS. (since the result of the polynomial fit is given in)
decay_dict (Dict[str, List] | None) – mean and std coefficients for the drift noise in \(\mu S\),
read_dict (Dict[str, float] | None)
acceptance_range (float)
- apply_drift_noise_to_conductance(g_prog, drift_noise_param, t_inference)[source]
Apply the accumulated noise according to the time of inference.
Will use unique 1st-order polynomial fits the conductance mean shift and standard deviation shift from the ReRAM
- Parameters:
g_prog (Tensor) – target conductance values that will be used to add noise
drift_noise_param (Tensor) – ccoefficients of the mean and std drift
t_inference (float) – time of inference. Times in seconds
- Returns:
conductances with noise applied
- Return type:
Tensor
- apply_programming_noise_to_conductance(g_target)[source]
Apply programming noise to a target conductance Tensor.
Programming noise with additive Gaussian noise with conductance dependency of the variance given by a 1st-degree polynomial. Depends of the acceptance range of the program-and-verify loop
- Parameters:
g_target (Tensor)
- Return type:
Tensor
- class aihwkit.inference.noise.reram.ReRamWan2022NoiseModel(coeff_dic=None, g_converter=None, g_max=None, noise_scale=1.0, coeff_g_max_reference=None)[source]
Bases:
BaseNoiseModelNoise model that was inferred from ReRam publication data.
This ReRam model is and approximation to the data published by Wan et al. Nature (2022).
Conductance dependence of the deviations from the target conductance was estimated from the published figures and fitted with a 4-th order polynomial (only 1 sec, 1 day, 2 day).
No separate data is available for read noise (1/f).
Note
To account for short-term read noise (about 1%) one should additional set the
forward.w_noiseparameter to about 0.01 (with w_noise_type=WeightNoiseType.ADDITIVE_CONSTANT)- Parameters:
coeff_dic (Dict[float, List] | None) – polynomial coefficients in \(\mu S\), \(\sum_i c_i \left(\frac{g_t}{g_\max}\right)^i\) for each time. If not given, the fitted measurement is taken at selected time points only
g_converter (BaseConductanceConverter | None) – Instantiated class of the conductance converter (defaults to single pair).
g_max (float | None) – In \(\mu S\), the maximal conductance, i.e. the value the absolute max of the weights will be mapped to.
noise_scale (float) – Additional scale for the noise.
coeff_g_max_reference (float | None) – reference \(g_\max\) value when fitting the coefficients, since the result of the polynomial fit is given in uS. If
coeff_g_max_referenceis not given and coeffs are given explicitely, it will be set tog_maxof the conductance converter.
- apply_drift_noise_to_conductance(g_prog, g_target, t_inference)[source]
Apply the accumulated noise according to the time of inference.
Will use unique 4th-order polynomial fit to the ReRAM measurements to the target values.
- Parameters:
g_prog (Tensor) – will be ignored
g_target (Tensor) – target conductance values that will be used to add noise
t_inference (float) – time of inference.
- Returns:
conductances with noise applied
- Raises:
ArgumentError – if t_inference is not one of
(1, 24*3600, 2*24*3600)seconds (or any user-defined key incoeff_dic), the error will be raised.- Return type:
Tensor