Learning predictable and robust neural representations by straightening image sequences

Authors: xueyan  niu
cristina  savin
eero p simoncelli
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 19:38:50

Abstract: Prediction is a fundamental capability of all living organisms, and has been proposed as an objective for learning sensory representations.  Recent work demonstrates that in primate visual systems, prediction is facilitated by neural representations that follow straighter temporal trajectories than their initial photoreceptor encoding, which allows for prediction by linear extrapolation. Inspired by these experimental findings, we develop a self-supervised learning (SSL) objective that explicitly quantifies and promotes straightening. We demonstrate the power of this objective in training deep feedforward neural networks on smoothly-rendered synthetic image sequences that mimic commonly-occurring properties of natural videos. The learned model contains neural embeddings that are predictive, but also factorize the geometric, photometric, and semantic attributes of objects. The representations also prove more robust to noise and adversarial attacks compared to previous SSL methods that optimize for invariance to random augmentations. Moreover, these beneficial properties can be transferred to other training procedures by using the straightening objective as a regularizer, suggesting a broader utility for straightening as a principle for robust unsupervised learning.

Main paper: 
 introduction: 
 All organisms make predictions, and their survival generally depends on the accuracy of these predictions. In simple organisms, these predictions are reflexive and operate over short time scales (e.g., moving toward or away from light, heat, or food sources). In more complex organisms, they involve internal state (memories, plans, emotions) and operate over much longer timescales. Prediction has the potential to provide an organizing principle for overall brain function, and a source of inspiration for learning representations in artificial systems. However, natural visual scenes evolve according to highly nonlinear dynamics that make prediction difficult. Recent experimentsboth perceptual (in humans) and neurophysiological (in macaques) -indicate that the visual system transforms these complex pixel dynamics into straighter temporal trajectories [22, 23] . As an alternative to full temporal prediction, straight representations facilitate predictability through linear extrapolations (Fig. 1A, red arrows ). Yet, the utility of straightening as a learning principle for organizing representations remains underexplored.Here, we ask whether straightening is sufficiently powerful to be used as a primary objective in self-supervised learning (SSL). Our contributions are as follows:• We developed an SSL objective function that aims to straighten spatio-temporal visual inputs.We demonstrated on simulated data that this objective, coupled with a whitening regularizer Although the straightening objective is unsupervised (no object labels), the learned representation clearly isolates the trajectories corresponding to different digits (right).that prevents representational collapse, can successfully straighten visual inputs containing both geometric and photometric transformations.• We show that the trained network is effective in extracting and predicting various visual attributes including object identity, location, size, and orientations.• We provide geometric intuition for how straightening yields class separability.• We show that representations learned by straightening are significantly more robust than those learned by multi-view invariance, when trained on the same model architecture and dataset. Moreover, straightening can be used as a regularizer to enhance the robustness of state-of-the-art SSL methods.The implementation can be found at https://github.com/xyniu1/learning-by-straightening.Temporal invariance. Many successful SSL methods aim to learn representations that are invariant to simple transformations, with additional regularization incorporated to prevent representational collapse (e.g., constant response independent of input). Depending on the exact implementation of these components, three categories of SSL objectives are identified in review [2] : 1) contrastive SSL [7, 11] , which encourages representation similarity between two augmented views of the same image (positive pairs) and dissimilarity of different images (negative pairs); 2) self-distillation [18, 8, 6] , which uses two different encoders to process two views of the same image, and maps the two representations by a predictive projection; and 3) canonical correlation analysis [3, 35, 14] that aims to whiten the cross-correlation matrix of neural representations estimated over augmented pairs of the same image. Most of the invariance-based methods subserve tasks that operate on static images rather than spatio-temporal inputs. This is because invariance is a strict constraint and equating representations over time necessarily means losing the time-varying features in the inputs. For example, for a video that contains moving objects, learning invariant representations across frames may help to encode the identity of the object but not its location or relative size. In contrast, straightening is designed to not only capture all predictable features in the spatio-temporal inputs, static and dynamic alike, but also predict their future states using a predefined operator.Temporal prediction. Temporal prediction as a fundamental goal for learning visual representations dates back to [16] . Many theories rooted in predictability have been successful in characterizing the properties of early visual areas [4, 28, 15] . Invariance is the simplest form of prediction. Linear predictions have been extensively studied. Notably, [27, 21] achieved great success in unsupervised object recognition by learning a linear predictor that maps current states to future states for each step into the future. In [25] , this paradigm was extended to allow a context-dependent, dynamic selection of linear predictors. Straightening differs from these methods in that straightening is parameter-free and the prediction can adapt to different contexts, while previous methods rely on parametrization that scales quadratically with the feature dimension. The work most similar to ours is [17] , which uses auxiliary architectural elements such as phase-pooling and further relies on an autoencoder structure and a pixel-level prediction loss to prevent information collapse. Our solution uses a much simpler architecture, and we also provide a more extensive quantitative evaluation of the resulting straightened representations.Straightening and robustness. Although straightening has been documented in human perception and macaque physiology, it is not an inherent property of deep neural networks [22] , including supervised and self-supervised recognition networks, and video prediction networks [31, 19] . Some non-parametric formulations of early visual processes demonstrate a degree of straightness, but the effect does not seem to survive to downstream layers [22] . Recently, [31, 19] demonstrated that straightening can be an emerging property of robustified networks: if networks are trained to tolerate Gaussian noise or adversarial perturbations, they would generate straightened responses without being explicitly trained to do so. In this work, we provide the complementary observation: if networks are trained to straighten, the representation is robust to corruptions including Gaussian noise and adversarial perturbations.Apart from straightening, other learning objectives that exploit the temporal structures of natural video statistics have also been shown to improve adversarial robustness, such as temporal classification (classifying frames to the episode they belong to) and temporal contrastive learning (temporally adjacent frames are used as positive examples) in [26] . 
straightening videos: 
 Objective function. We aim to learn a representation of video frames that follows a straight trajectory over time by transforming each frame, x t , into network response z t = f θ (x t ), where f θ denotes the learned transformation. We measure straightness of an output sequence {z t } T t=1 as the average cosine similarity (normalized dot product) between the two successive difference vectors of any three temporally adjacent points. Our goal is to train f θ to maximize straightness, or minimize the loss:EQUATION)where the expectation is taken over sequences and time, t. This objective is scale-invariant, and bounded within [-1, 1]. By default, the straightness loss is applied to the output layer, but it can be applied to any (or several) layer(s) of a network. 1 Once straightness is established, one-step prediction takes the form of linear extrapolation:z t+2 = 2z t+1 -z t .Straightness alone is not sufficient to learn meaningful representations because it can be minimized by trivial solutions (z t = ct or z t = c for ∀t). To avoid this form of collapse, we incorporate a form of regularization borrowed from [3] , which essentially aims to statistically whiten the outputs using two terms. First, a variance term for each output dimension, essentially preventing different inputs from collapsing to the same output,L variance = E 1 d d i=1 max 0, 1 -S z i t , ϵ, where S(x, ϵ) = Var(x) + ϵ, d is the output dimensionality, and ϵ = 10 -4 . Second, a covariance term decorrelates each pair of output dimensions to minimize redundancies,L covariance = E 1 d i̸ =j [Cov(z t )] 2 i,j .Taken together, the complete learning objective to minimize is given byEQUATIONwhere hyperparameters α and β control the relative strength of the two regularizers.Comparing straightening with invariance. To assess the benefits of straightening, we compare it to the popular invariance objective, which encourages outputs of distinct views of the same scene to be similar to each other:EQUATIONwhere F denotes the Frobenius norm, t 0 is randomly chosen from {1, 2, . . . , T } and independent of t. As in the straightening case, additional regularization is necessary to prevent collapse. For a fair comparison, we use the same variance and covariance terms as in the straightening model, and thus the total loss is identical to that used in [3] ,EQUATIONCreating synthetic video sequences from images. For training data, we generated artificial videos by applying temporally structured augmentations, intended to mimic natural transformations, to static images in common image datasets. The reasons for this choice, as opposed to using a dataset of natural videos, are multifaceted. First, we want to match other image-based SSL models in terms of training data and evaluation pipeline for a direct comparison. Second, models trained on natural videos are known to struggle with image recognition tasks because typical video datasets lack sufficient object class variety [29] (for example, object-centric natural video datasets such as ImageNet VID [30] or Objectron [1] contain only 30 and 9 object classes, respectively). Efforts are being made to align the data distribution of the two domains, but well-accepted benchmarks have not been established yet. Finally, while data augmentation is widely used for generating distinct views of the same image [7] , it is uncommon to introduce temporal correlations in the applied transformations (since the goal is to maximize the richness of the training set). This however allows us to create image sequences that have predictable temporal structure that the straightened representation can latch onto.To create temporally consistent geometric transformations, we can do either of the following: 1) construct a cropping window of a pre-determined size, then gradually move the window in one direction ("translation"), akin to smooth gaze changes; 2) fix the center location of a cropping window, then monotonically increase or decrease its size ("rescaling"), akin to approaching or receding objects; 3) fix the location and size of a cropping window, and rotate the window ("rotation"). We combine these with appearance transformations, in which we linearly adjust the photometric parameters (brightness, contrast, saturation, and hue) across frames within a sequence. This mimics gradual changes in lighting conditions over time. The rate of these geometric and photometric transformations is held constant within each sequence, but varies across sequences.For the first set of experiments, we created a sequential MNIST dataset, in which images of single digits are transformed according to one of the three geometric transformations (Fig. 2A ). Each frame contains one digit, randomly selected from the MNIST dataset, moving inside a 64 × 64 patch. Each video is 20 frames in duration. For translations, the digits were placed at random locations initially; for rescaling and rotation, the digits are always at the center of the patch. Transformations ramp linearly over time with two exceptions: for translations, digits "bounce" off of the edges, abruptly changing direction, while for rescaling the direction of enlargement or contraction reverses if the size exceeds a preset range. These special cases generate motion discontinuities, where prediction is expected to fail.For a second set of experiments, we generated a sequential CIFAR-10 dataset, each with a duration of three frames (Fig. 4A ). We eliminated the rotational transformation, as it tends to create boundary artifacts on the nonzero background. Following standard practice in self-supervised learning [7] , we also included random horizontal flips, grayscale, and solarization to increase dataset diversity. Horizontal flips, if present, were applied to all frames in the sequence to preserve the frame-to-frame spatial relationships, while the other transformations were applied independently to each frame.Network architecture. The network architecture is dataset specific. For sequential MNIST, we instantiated f θ as a 7-layer convolutional neural network with simple half-wave rectifier (ReLU) nonlinearities and no skip connections. For sequential CIFAR-10 we used ResNet-18 [20] as the model backbone and attached to the end a projector with 3 fully-connected layers, following the standard practice in [3] . Throughout the experiments we used the same model architecture for the straightening objective (2) and the invariance objective (4); the hyperparameters were optimized separately for each loss so that both models achieve their best recognition performance. 
straightening learns meaningful representations: 
 How straight can the representations become, and how is straightening achieved? To answer this question, we trained f θ on sequential MNIST and measured the straightness of embeddings along every transformation of the network (Fig. 2B ). Embeddings learned by the straightening objective (2) are progressively straighter throughout the network, with the largest increases occurring near the last layer (on which the loss function is imposed). In contrast, those learned by the invariance objective (4) initially increase in straightness but then fall, ending at a value slightly more curved than the pixel-domain input, consistent with observations in [22] . All linear operations (convolutions, spatial blurring, and fully-connected linear projections) contribute to increasing straightness, whereas the rectifying non-linearities usually reduce it. Geometrically, this is because the rectifiers project the embeddings onto the positive orthant, bending temporal trajectories that cross rectifier boundaries.To better understand the nature of the representations, we visualized the temporal trajectories of digit sequences using a 2D t-SNE embedding [32] . Fig. 1B shows 200 trajectories from the translation subset, in both the pixel domain (left) and the learned representation (right). Even in this non-linear, low-dimensional projection space, the individual representation trajectories are noticeably straighter than their pixel-domain counterparts. Furthermore, the representations clearly separate the digit classes, despite the fact that training was unsupervised, with no explicit knowledge of digit identity.Decoding untrained visual features. Ideally, straightened representations should encode all predictable information in the input video and nothing more. Explicit predictions can be made in the representation space by linear extrapolations. The design of our dataset ensures that visual features such as location, size, and orientation of the digits are predictable, and therefore, should be preserved in straightened representations. On the contrary, representations learned by the invariance objective should be agnostic to any temporally-varying information, including these features. To test this hypothesis, we trained a support vector machine (SVM) regressor with radial basis kernels (RBF) to read out those attributes from the learned representations. We also trained a linear classifier to decode digit identity. Fig. 2C shows that digit identity can be read out from both models, while only the straightened representations maintain the dynamic features of the inputs. Notice that respecting temporal order is critical for straightening to learn anything meaningful -training the same objective on temporally shuffled frames gives poor decoding performance. This demonstrates another distinction between straightening and invariance: the latter is, by definition, agnostic to temporal ordering.To test predictability, we used the same decoder to read out location, size, and orientation in the next frame from the linearly extrapolated (predicted) representations. We compared this prediction performance against a naive control that simply uses representations of the last frame. The performance of the straightening predictor is found to be substantially better than the control, and close to the decodability of the current frame. To further examine the image information contained in the straightened representations, we froze the representations and trained a decoder network (another 7-layer convolutional neural network) to reconstruct frames at the pixel level. We then used the same decoder to visualize the predicted responses given by linear extrapolation. We found that this enables accurate prediction of future frames (Fig. 2D , bottom; additional examples in Appendix), despite the fact that our learning objective did not explicitly optimize for such reconstruction error. Exceptions occur when transformations change direction: switching between expansion/contraction; or bouncing off of boundaries. In particular, the predicted "7" continued to expand when the actual inputs suddenly began to contract. This shows that the representation is able to capture smooth transformations in the input, but not the macro-structure of the transformation statistics. 
the geometry of straight representations: 
 To understand how straightening enables class identification, we analyzed the representation geometry induced by the straightening loss. The t-SNE embedding in Fig. 1B implies that the temporal trajectories of images with the same digit and transformation type are more parallel than expected by chance. To verify this intuition, we computed the cosine similarity of velocity (difference) vectors drawn from trajectories of the same digit and the same transformation (Fig. 3A ). This is compared to the equivalent measure for the representation obtained via the invariance objective, and to the distribution expected for random vectors in the output space (d = 128).For comparison, we also measured the cosine similarity of trajectories from different classes. Compared with the random distribution, and the values computed from the invariant representations, the straightened representations showed a substantial bias toward parallelism for trajectories within the same [digit, transformation] class, and toward orthogonality for trajectories across different classes. We hypothesize that trajectories from the same [digit, transformation] class are more likely to have samples that are close to each other in the representation space; these proximal points may have similar local gradients since the model architecture is composed of locally affine operations. When the straightening loss stretches the trajectories into straight lines, they end up being stretched into similar directions, resulting in a larger cosine similarity. On the other hand, the whitening regularizer tries to fill the output space, causing trajectories from different classes to be pushed into orthogonal directions in order to achieve a high variance in every output dimension. This leads to a cosine similarity for across-class vectors that is more concentrated at zero than expected by chance.We further corroborated this finding by quantifying the dimensionality of the with-class and across-class network responses. Specifically, we quantified "effective dimensionality" using theparticipation ratio, R = ( i λi) 2 i λ 2 i, where {λ i } are the eigenvalues of the covariance matrices of responses in each condition. It is clear from Fig. 3F that representations from the same [digit, transformation] class are much more compact under straightening than under invariance, although the straightened representations exhibit a higher effective dimension overall. How can this geometry give rise to class separation? Here we use digit identity as an example. We hypothesized that since outputs from the same class take up fewer dimensions, if classifiers (w i ∈ R 10×128 , where 10 is the number of possible classes) are chosen to be orthogonal to that subspace, then all the within-class variations can be projected out. This would make classification a much easier task. To test this hypothesis, we computed the cosine similarity of the classifier's decision axis and the trajectory velocities (Fig. 3E ). Compared with the distribution of random vectors and the invariance case, the straightened trajectories are more orthogonal to the classifiers, confirming our intuitions. Thus, information about other visual features is preserved in the null space of the decision axis for digit identity. 
straightening increases recognition robustness: 
 While typical recognition models do not naturally yield straight representations, explicitly training such models for noise robustness can increase straightness as a by-product [31, 19] .Here, we show that the converse is also true: straightening makes recognition models more immune to noise. Unless specified otherwise, for these experiments we focused on the sequential CIFAR-10 data (Fig. 4A ) and used ResNet-18 as the backbone representation network. Following the standard practice in [3] , we attached to the end of the backbone a projector with the training loss applied to its output. The outputs of the backbone were taken as the primary representations and used for the downstream recognition task. Representations were learned using the self-supervised learning objectives applied to clean image sequences. After learning, we froze the network parameters then trained linear classifiers on the representational layer to determine the corresponding image class. Hyperparameters were chosen to yield the best clean image recognition performance, individually for each objective. We used an adapted version of the solo-learn library to train all models in this section [10] .As a variation of the original learning setup, we added a second straightening loss, Eq. ( 1), to the outputs of the first ResNet block. The two straightening losses were equally weighted and averaged, while the whitening regularizer was only applied at the last layer. We empirically found that using straightening at multiple stages of the processing hierarchy can further improve robustness. Fig. 4B shows the straightness level of embeddings across every transformation of the network. Similar to the sequential MNIST case, straightness increased sharply near the layer where the straightening loss was applied, and gradually elsewhere under convolution, spatial pooling, and fullyconnected linear layers. In contrast, representations optimized for invariance were not straightened across processing stages. Examples of image sequences that produced the straightest trajectories (Fig. 4C , left) show clearly identifiable object contours and temporal transformations, while those that had the most curved trajectories (Fig. 4C , right) appear fuzzy with little identifiable structure and are inherently less predictable. Straightening is more robust than invariance. First, we assessed network robustness by evaluating recognition performance for images with increasingly larger levels of i.i.d. gaussian noise added to the pixels (Fig. 4D ). We found that the straightened representations proved substantially more robust for a wide range of noise levels with negligible cost for the no-noise recognition performance. Second, we tested robustness to adversarial perturbations, which are considered one of the hallmark failures of artificial vision models [12] . Not only are artificial models highly susceptible to small amounts of adversarial noise, but the adversarial examples are barely visible to humans, a notable discrepancy between artificial and biological perception. Therefore, adversarial robustness is an important metric of how brain-like the representations are. Specifically, we used untargeted projected gradient descent (PGD) with the L 2 norm constraint to generate adversarial perturbations [13] . For all attack budgets, we chose a step size that is 1/10 of the budget and set the number of PGD steps to be 500 to ensure that the attack optimization procedure had fully converged. We found that the straightening objective substantially increased the robustness to white box attacks over all attack budgets without degrading performance on clean images, as shown in Fig. 4E .We also tested recognition robustness on a composite of corruptions. We used the CIFAR-C dataset [24] , which defines 18 types of corruptions coarsely grouped into "noise", "blur", "weather" and "digital" categories and evaluated the models on corruptions of the highest intensity. Fig. 4F shows the relative performance of straightening versus invariance. Straightened representations were again more robust than those optimized for invariance for many forms of image corruption, most notably those in the noise category. All corruption types for which invariance proved superior to straightening were directly (brightness, saturate, and contrast) or indirectly (fog, as a specific form of contrast degradation) included as augmentations in the training set, and thus their robustness was a natural consequence of the invariance objective. Overall, these results demonstrate that learning by straightening brings with it a systematic benefit in robustness to a wide variety of input degradations, without the computational costs and complexity associated with directly optimizing for such robustness.Straightening also improves representational robustness for natural temporal transformations. Specifically, we used the same training procedure on the EgoGesture video dataset [5, 36] for egocentric hand gesture recognition. For simplicity, we used the depth channel as input, which circumvents the need for modeling the background. To preserve the motion structure we did not apply any frame augmentations. For this dataset, we found that the straightened representations were more robust than invariance-based solutions across a wide range of corruptions. See Appendix for results and implementation details.Straightening improves robustness in other SSL models. In principle, straightening can be incorporated into any SSL learning objectives as long as the inputs are a temporal sequence of at least three frames. Can straightening robustify representations when combined with other SSL losses? To answer this question, we regularized several existing SSL objectives using our straightening loss (1), trained the models on sequential CIFAR-10, and tested their recognition performance under adversarial attacks. In all cases, the straightening loss was added to the outputs of the projector as well as the first ResNet block, with the weight chosen from a parameter sweep that optimizes recognition performance. Other hyperparameters of the SSL models, including weights of other terms in the objective, and the architecture of the projector, were kept to their original values/setup. None of the original SSL models demonstrate straightening in their representations (Fig. 5A , gray), but a slight straightening regularization can significantly improve straightness beyond the pixel level (blue). Fig. 5B compares adversarial robustness under the original SSL loss [35, 7, 14, 6] and the corresponding variant regularized by straightening. For all objectives tested, straightening was shown to systematically improve representational robustness, even though the original training was already heavily tuned to optimize performance. We repeated the same robustness test on pixel-level white noise (see Appendix) and observed the same benefits of adding the straightening loss. This suggests that the idea of representational straightening and the use of temporally smooth image augmentations may prove of general practical utility for robust recognition, and makes straightening an important new tool in the SSL toolkit.Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?Answer: [Yes]Justification: We will publish all the data, code, and checkpoints before the meeting (github link included). In the meanwhile, I believe the information we provided in the main text should be sufficient to reproduce our results.Guidelines:• The answer NA means that paper does not include experiments requiring code. • At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable). • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
discussion: 
 We have shown that a biologically-inspired SSL objective which promotes straightening in the representation of image sequences leads to predictive neural representations that factorize geometric, photometric, and semantic attributes of the input. These embeddings also prove more robust to various forms of noise and other degradations, compared to SSL methods that optimize for augmentation invariance. Moreover, incorporating straightening as a regularizer extends these benefits to other SSL training procedures, suggesting a broader utility for straightening as a cost-effective mechanism for robust unsupervised learning.Directly improving robustness to adversarial attacks via optimization is difficult and computationally costly [12] . In contrast, our solution achieves similar results in an easy and computationally less demanding manner. The key ingredient for its success is having meaningful temporal structure in the input sequences. This could either come naturally through the use of video (although good datasets for that are scarce [29] ) or, more practically, can be artificially enforced by temporally correlated image augmentations. Thus, our results highlight a new useful form of data augmentation in support of learning predictive representations.In contrast to invariance, which aims to map all elements of a semantic class into unique points in representational space, discarding all within-category variability, straightening strives to encode all structured across-frame variations in the input. In doing so, it produces rich image embeddings containing structured information about class identity, as well as various transformations which are represented in different subspaces, and thus easy to decode. Geometrically, this means that straightening leads to overall higher dimensional embedding spaces but the individual semantic components (image class, or class × transformation) are much lower dimensional. This joint increase in embedding dimension and reduction in manifold dimensionality increases the model's representational capacity [9, 33] , which may explain its increased robustness.We have advocated for the replacement of hand-selected augmentations with the readily available temporal structure of natural visual experience [37, 29] . However, the predictable structure of natural videos evolves at multiple timescales. It is not clear whether a feedforward architecture that takes in one frame at a time and makes predictions at a single temporal scale is enough to fully take advantage of such structure. As the predictable horizon of different elements in our visual input varies across levels of abstraction, a natural extension would be to enforce straightening at multiple time scales and in multiple network stages. More work is needed to determine how to best incorporate a hierarchical temporal structure in the straightening loss to accommodate long horizon predictions, but we expect this type of hierarchical prediction to play a central role in developing models for both biological and machine vision. We applied either the straightening objective (2) or the invariance objective (4) to the outputs of the projector. The models are trained from scratch with no pretrained weights. No data augmentation is applied, so models can only rely on the natural frame-to-frame variations. We choose 6 frames with a fixed interval (4∆t) from each gesture clip. While this might not be the optimal setting if the goal is to optimize performance on gesture recognition, our purpose is to compare the straightening and the invariance learning objective in exactly the same setup.Evaluation pipeline For gesture classification we freeze the model and concatenate the outputs of the backbone of all 6 frames to train the linear classifier. To test robustness we add gaussian noise of various levels to pixels. The straightened representations are more noise robust than the invariance-based solutions. • The answer NA means that the paper does not include experiments.• If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not. • If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable. • Depending on the contribution, reproducibility can be accomplished in various ways.For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed. • While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. , with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes]Justification: Major settings (model architecture, data generating process) are described in the main text; more details on hyperparameters are provided in the appendix.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [No] Justification: The experiments are expensive to run for a sufficient number of times to provide error bars at this point.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper. • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [Yes] Justification: Relevant information is provided in the appendix.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?Answer: [Yes] Justification: This research conforms with the NeurIPS Code of Ethics.Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [Yes]Those points are addressed in the Discussion section.Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?Answer: [NA] For intermediate layers, straightness can be computed on the embeddings vectorized over space and channels. 
 
 Appendix:  


Decision: There has been significant interest in the idea of predictive coding, both in neuroscience and also in computer science. Here the authors argue that “straightening” the dynamics of information representation can facilitate predictions and implement this idea in a novel algorithm.

There was enthusiasm among the reviewers for this work, noting that the problem is under-studied in the field, the paper is well written, and praising its simplicity. 

Some references were provided by reviewers (especially jxcp) for potential additional benchmarking/comparisons. 

The authors provided reasonable and adequate answers to the main concerns. 

I share the reviewers’ enthusiasm for this paper.

Reviews: review: paper_summary: paper_summary: This is a very interesting paper that wants to show that robustness is a consequence of perceptual straightening during training -- both areas that have largely remained disconnected in vision. In particular because adversarial robustness is generally studied from a theoretical perspective, or empirical cat-and-mouse scenarios of new attacks vs defense (or privacy). In the case of perceptual straightening, since it has only recently been introduced as a neuroAI-like inspired motif that should be added in machine vision systems it is not clear if straightening will provide robustness or the other way around (determining the causal factor -- though some previous work has shown this to certain degree). This paper shows that straightening a model will provide robustness.
strength_weakness: strength_weakness: - The paper could do a better job exploring the  **qualitative assessment** of the response of different training networks (with and with-out straightening and SSL) **for adversarial images**. Authors make a strong case that robustness to adversarial images is stronger for perceptually straightened (PS) neural networks, only showing curves, but is this actually the case if we qualitatively look at samples? Will attacking a PS-NN with a target fish label actually morph the image into a fish? See for example:  Berrios & Deza. SVRHM 2022. Santurkar et al. NeurIPS 2019 and recently Gaziv et al. NeurIPS 2023.

-	In Figure 2C I like that there is a shuffled condition to break the linearity of the straightening. What’s not clear to me is if in the other bar plots within figure C the shuffle condition has achieved 0 decording since it is not visible (eg. location, size, orientation)? Or was the experiment not ran? Would authors be able to clarify this?
questions: questions: * There is something odd about using synthesized data (of MNIST?) as a proxy for real video data with natural scene statistics. I wish there was an experiment with real video data such as down-sampled video data from YouTube or Autonomous driving video data (real vs shuffled). Perhaps I missed this in the paper, and am curious to know authors thoughts on this.
limitations: limitations: Missing papers:

- Santurkar et al. NeurIPS 2019. Image Synthesis with a Single (Robust) Classifier
- **Kong & Norcia. SVRHM 2021. Are models trained on temporally-continuous data streams more adversarially robust?**
- Berrios & Deza. SVRHM 2022. Joint rotational invariance and adversarial training of a dual-stream Transformer yields state of the art Brain-Score for Area V4
- Gaziv et al. NeurIPS 2023. Robustified ANNs Reveal Wormholes Between Human Category Percepts
paper_summary: paper_summary: the current manuscript introduces a self-supervised learning (SSL) objective inspired by biological vision systems. It proposes an objective that promotes the "straightening" of neural representations of image sequences, facilitating linear prediction. The proposed method is tested on small and synthetic datasets like sequential MNIST and CIFAR-10, demonstrating that the learned representations are more predictive, robust to noise and adversarial attacks, and can enhance other SSL methods when used as a regularizer.
strength_weakness: strength_weakness: - The main weakness is the novelty claim regarding the objective function. Similar loss functions and concepts have been explored in other works. Examples are: [1-5]
- The paper needs to better differentiate its approach from existing methods that use linear predictors or phase-pooling for straightening.
- another major issue is the experimental settings that are primarily conducted on synthetic datasets. While this allows controlled comparisons, it limits the demonstration of the method's applicability to real-world data.
- and comparisons to existing state-of-the-art SSL methods are somewhat limited. More extensive benchmarking against a broader range of methods could strengthen the claims.

References:
[1] VICReg: Variance-Invariance-Covariance Regularization for Self-Supervised Learning published at ICLR 2022 
[2] Learning a Depth Covariance Function published at CVPR 2023
[3] MLVICX: Multi-Level Variance-Covariance Exploration for Chest X-ray Self-Supervised Representation Learning 
[4] Variance Covariance Regularization Enforces Pairwise Independence in Self-Supervised Representations
[5] An Information-Theoretic Perspective on Variance-Invariance-Covariance Regularization
questions: questions: Please see the weaknesses and limitations.
limitations: limitations: The paper presents an interesting approach to SSL by leveraging a biologically inspired objective that promotes the *straightening of neural representations over time*. This approach is evaluated on synthetic datasets, showing improved robustness and predictive performance. However, the novelty of the objective function is not fully established, as similar concepts have been previously explored. Additionally, the reliance on synthetic datasets limits the demonstration of the method's real-world applicability. While the paper provides a clear geometric intuition for its approach and shows promising results, more extensive comparisons with state-of-the-art methods and testing on real-world datasets would strengthen the claims. Therefore, based on the current presentation and evaluation, the novelty and practical impact of the proposed objective function is not sufficiently justified.
paper_summary: paper_summary: This paper presents a simple self-supervised learning objective which aims to "straighten" representation trajectories in latent space - maximizing cosine similarity of consecutive deltas of representation (i.e take three time steps, calculate the difference in representation between each pair of consecutive representations and calculate the cosine similarity over these differences).
To prevent collapse the author suggest using two common regularization losses - one pushes the variance of each representation dimension to one and one decorrelates the representation dimensions.
The objective is used to train networks on two simple, synthetic sequential datasets and is demonstrated to learn interesting representations demonstrated in a variety of ways - readout accuracy, robustness to noise and adversarial attacks.
strength_weakness: strength_weakness: *Scope of experiments:*
While I appreciated the depth and breadth of the existing experiments I think the scope of the experimental validation is still a bit limited. I appreciate the difficulty in running larger scale experiments with video data for many groups due to resource limitations, however, I feel that in this case, the use of synthetic data alone, and beyond that, just MNIST and CIFAR10, is a very limiting factor. I would have loved to see experiments on larger, natural(istic) datasets. For an objective like the one proposed in the paper, using sequences with very simple, almost linear transformations across time makes the results a lot less interesting than they could have been - no wonder that a model trained to learn simple transformations actually does it with data which is only comprised of simple transformation. The interesting question is what this model can do when the transformation are complex and non-linear as the ones in natural video - multiple objects moving, viewpoint changes etc.

Beyond that I would be interested to see measures of straightness to some existing, pre-trained models - especially from the family of state-of-the-art SSLs like DINO v2, MAE etc. Do they naturally learn "straight" representation even though not trained on sequences? can you fine-tune them with a straightening loss?

To be clear, I do not expect the authors to run any new experiments during the rebuttal period as I appreciate what I am suggesting here may take more time and resources than is possible for this short amount of time (but needless to say I'm happy to see any results the authors may be able to produce in this context).

*Presentation (minor):*
While I enjoyed the presentation in general I think the use of coloured labels (Figure 2C for example) right on the plot is weird and confusing. A legend would have been more useful. A bit more content in the captions would have been nice as well - Figure 3, for example has insets which are not explained in the caption at all.
questions: questions: Beyond the comments above I have some more minor questions:

1. The text mentions that in order to calculate the "straightness" the representation needs to be flattened - while this makes sense, I do not understand why we see such a big jump in "straightness" around flatenning layers (Fig 2B and Fig 4B) - I would expect this layer to have no effect (because the flattening happens either way) but it's the biggest "jump" in the plots.

2. The authors suggest that adversarial examples for common networks have imperceptible perturbations and it is implied, I think, that adversarial examples for straightening models are different - but I think these are not shown in the paper, am I wrong?
limitations: limitations: The authors address some of the limitations in the paper, I hope to see a bit more of them in light of what's written above.

Comments: title: response by Reviewer  jxcp
Thank you for the detailed response.
comment: I have carefully reviewed the feedback from other reviewers, considered the author’s rebuttal, and global responses and followed the ensuing discussion. I appreciate the authors' thorough responses, particularly their clarification on W1 and new experimental results (B and C) during the rebuttal period. therefore I will raise my score from 4 to 6.
I thank the reviewers for the time and effort taken to respond to my (and other's) review.
As I mentioned in the original review I think that is very interesting work that should be accepted - many of my concerns have been answered in the rebuttal and the ones that haven't been (I still think natural video would have been cool to see here) are not a reason to reject the paper.
I am therefore increasing the score and am looking forward to see this line of work evolve in the future.