Optical hyperdimensional soft sensing: Speckle-based touch interface and tactile sensor

Hyperdimensional computing (HDC) is an emerging computing paradigm that exploits the distributed representation of input data in a hyperdimensional space, the dimensions of which are typically between 1,000--10,000. The hyperdimensional distributed representation enables energy-efficient, low-latency, and noise-robust computations with low-precision and basic arithmetic operations. In this study, we propose optical hyperdimensional distributed representations based on laser speckles for adaptive, efficient, and low-latency optical sensor processing. In the proposed approach, sensory information is optically mapped into a hyperdimensional space with>250,000 dimensions, enabling HDC-based cognitive processing. We use this approach for the processing of a soft-touch interface and a tactile sensor and demonstrate to achieve high accuracy of touch or tactile recognition while significantly reducing training data amount and computational burdens, compared with previous machine-learning-based sensing approaches. Furthermore, we show that this approach enables adaptive recalibration to keep high accuracy even under different conditions.


I. INTRODUCTION
Hyperdimensional computing (HDC), also known as vector symbolic architecture, is a brain-inspired computing paradigm [1][2][3] that has attracted significant attention driven by global trends in the search for alternatives to the conventional von Neumann computing paradigm.HDC takes advantage of the high-dimensional distributed representation of input data.For example, an input is represented by a long binary (or bipolar) quasi-random vector, frequently referred to as a hyper vector (HV), the dimensions of which are typically greater than 1,000 [1].HV representation enables basic arithmetic operations, such as multiplication and addition for HVs, with simple logic operations, such as logical exclusive OR and counters, to build composite HVs that represent objects of interest.Because of the hyperdimensional space, two different HVs are likely to be almost orthogonal, which can lead to a holographic representation of input information [1].Another significant advantage of the HV representation is its fault-robust characteristic, that is, the HV representation avoids error-prone bits, such as the most significant bits and the sign bit in conventional binary representation.Considering the aforementioned advantages, HDC offers remarkable efficiency as a promising alternative to traditional machine-learning models and has demonstrated its advantages in emerging hardware, such as in-memory computing [4].HDC-based cognitive processing has been achieved with non-iterative learning without requiring optimization and model turning and applied to various tasks, including language identification [5], speech recognition [6], and object recognition for robotics [7].It has also been used for analogy-based reasoning [8], bio-signal processing in electroencephalography [9], secure computing for the Internet of Things [10], and local processing in adaptive machine learning for wearable devices [11].
In-sensor computing (i.e., the local and real-time processing of sensory signals) has the advantage of reducing communication to computational devices and improving latency and security.HDC is promising for such in-sensor or near-sensor computing because HDC can encode various types of sensory information as a single HV and enables energy-efficient processing and low latency.In this study, we considered an HDC-based approach for optical touch-based or tactile sensing.In general, such sensors can acquire information regarding force, texture, shape, and temperature through the elastic deformation by a physical contact [12].They can be extended to various applications, such as robot interaction, medical probes, and haptic interfaces.
As opposed to electronics-based sensors, optical-sensing approaches exhibit remarkable features, such as high sensitivity, remote access, and immunity to electromagnetic interference.There are many optical-sensing approaches, including stretchable waveguide- [13,14] or fiber-based sensors [15], and speckle-based sensors [16][17][18].Among them, the speckle-based sensing approach enables highly sensitive detection, combined with an image correlation technique [16,17] or deep learning [18,19].However, the image correlation technique suffers from the limitation of vulnerability to noise and lack of dynamic range [19].Deep learning-based techniques can achieve higher accuracy and consistency with a wider dynamic range [19] and multimodal sensing [18].However, they normally require substantial training samples and suffer from the computational burden and adaptivity to environmental changes.
In this study, we employ the HDC concept for the efficient, adaptive, accurate processing of optical sensing data with low computational burden.The implementation of the HDC is based on an optical encoding for HV generation.Various types of sensory information can be encoded as a speckle pattern, which is used as a significantly long HV (typically with more than 250,000 dimensions).The high-dimensional distributed representation can be achieved naturally through optical scattering without additional computational burden.Similar speckle-based high-dimensional mapping techniques have already been utilized in extreme-learning machines and reservoir computing [20][21][22][23]; however, their application to HDC has not been reported to date.The proposed HV generation approach enables accurate cognitive processing based on a straightforward and low-precision operation without an iterative training process using a large amount of training data, which is different from traditional deep learning approaches.We apply the proposed approach to a soft touch sensor and a tactile sensor and demonstrate the features of the proposed approach.This approach paves the way for an optical in-sensor computing paradigm that seamlessly integrates optical-sensing capabilities and information processing.

A. Classification using HDC
Here, we briefly describe the use of HDC in cognitive processing tasks, such as classification [24].HDC consists of an encoder and a memory and can achieve classification in a straightforward manner [Fig.1(a)].In HDC, the encoder is used to transform input data into HVs, while the memory is used to store and process the HVs.In general, HVs are represented as binary or bipolar vectors with D dimensions, which are chosen independently from {0, 1} D or {−1, 1} D .The probability of bit 1 is 0.5.Thus, the generated HVs are nearly orthogonal to each other.
Let {X i , l i } N i=1 be a training dataset with N samples, where X i and l i are the i-th input vector and target label, respectively.The number of the target labels is defined as L. X i is encoded as HV V i through the encoding function Ψ : X i → V i .Then, let P l be an HV representing class l, called a prototype vector.Let {V l k } N s k=1 be a set of the HVs belonging to class l, where k and N s are the sample index and the number of the HVs, respectively.For the sake of simplicity, we assumed N s = N/L.The prototype vector P l for class l is generated with point-wise addition as follows: where [•] is the binarization operation used to transform any D-dimensional vector into a D-dimensional binary vector based on the majority rule.In this study, we used a simple majority rule, in which "0"("1") is taken if the number of "0"("1") is larger.The bias of adding an even number of HVs can be reduced by adding an extra random vector [25]; however, this bias problem was not addressed in this study.All trained prototype vectors, {P 1 , P 2 , • • • , P L }, are stored in a memory.During the inference phase, unknown data can be classified as follows.First, the data value is mapped to a high-dimensional space using the same encoding scheme.This HV is called the query vector V q .Then, the similarity between the generated query vector and all stored prototype vectors is measured.For any two binary HVs, , the similarity can be measured using the Hamming distance, which is given by where ⊕ is the XOR operation, which is unity if and only if arguments A j and B j differ; otherwise, it is zero.Ham(A, B) = 0 only for A = B, whereas Ham(A, B) ≈ 0.5D if A and B are nearly orthogonal or dissimilar.Finally, the unknown data are classified into class l * , with which it has the highest similarity, that is, the shortest Hamming distance, as follows: Training

B. Optical hyperdimensional mapping for generating HVs
The core of HDC is its encoding process to map the input data into HVs.In conventional HDC, encoding methods are based on mathematical operations [24].For example, a record-based encoding scheme utilizes two types of HVs, representing the feature position and feature value [24].For the position encoding of a feature vector with m elements, m HVs are randomly generated.Then, each feature value is discretized to n levels.The level values are represented by n HVs, which in turn are generated such that HVs of neighbor levels are correlated.Details of this operation and various other encoding schemes can be found in the literature [26].These standard encoding schemes require arithmetic operations, which are typically computationally expensive.In contrast to previous work, we did not use arithmetic operations in this study; rather, an optical scattering process was used for HV generation.
The proposed HV generation is based on optical encoding using the modulation sensitivity of speckle patterns in soft materials [Fig.1(b)].As is well known, optical scattering in a diffusive material is highly sensitive to external stimuli to the material [27,28].Therefore, material deformation created by touch interactions is encoded as a speckle pattern.Thus, as opposed to conventional approaches, some arithmetic operations are skipped, and the memory for HV storage is not required in our optical approach.
The sensing of touch stimuli is treated as a classification problem using HDC (Fig. 2).To classify the stimulus information, speckle images are captured using a camera and then used as feature HVs.In our approach, the feature HVs are thresholded and binarized such that "0" and "1" appear with the same probability of 0.5.Within the same label, HVs are added to generate a prototype vector [see Eq. ( 1)].The prototype vector contains the information features of each class.The test data, which are also obtained as speckle patterns, are mapped to a query HV and classified using the similarity measurement of each prototype vector [Eq.( 3)].
A remarkable feature of the optical approach is the natural generation of HVs with more than 100,000 dimensions using a simple optical setup.The dimensions of the generated HVs depend on the number of pixels in the image sensor used to measure the speckle patterns.High dimensionality is important for the orthogonality between different HVs and a reliable symbolic representation.However, longer HVs require more memory for the storage; therefore, they should be shorter.Typically, existing HDC approaches use HVs with 1,000-10,000 dimensions and require them to be stored for each input value.Our approach can generate HVs directly from an external stimulus; thus, a significant memory usage reduction is expected.FIG. 2. Overview of the HDC-based classification approach for optical soft sensors.

III. RESULTS
A. Optical touch sensor 1. Setup Figure 3(a) shows an optical touch sensor used for an interface device.The sensing part consists of a transparent silicone elastomer, which is coupled with an optical fiber and a compact camera.Laser light is scattered inside the silicone and forms speckle patterns owing to the complex scattering process.The speckle patterns are captured using the camera.(See Supplement 1, Sections 1A-1C, for the details.) Considering that the speckle patterns change depending on the contact with the surface of the sensing part, the information concerning the contact action can be identified by learning the change characteristics.We used the HDC-based approach to identify the contact positions in the sensing part.As a proof-of-concept, we demonstrated the identification of contact positions, labeled as L1, L2, R1, R2, and None [Fig.3(b)]."None" represents no contact with the sensing part.In this experiment, the training data were collected automatically using a robotic arm.
The silicone surface was pushed at the positions labeled L1, L2, R1, and R2 by a solid indenter mounted on the robotic arm.The contact positions (L1, L2, R1, and R2) were randomly chosen.The pushing depth was estimated as < 2 mm.The resulting speckle patterns were measured using the camera.The temperature was approximately 23.
were collected, where X i and l i ∈ {L1, L2, R1, R2, None} represent the i-th speckle pattern and the label of contact position, respectively.N T = 500 is the total number of collected data samples, and 80 % of the data samples were used for training (i.e., prototype vector generation).

Speckle, HVs, and prototype vectors
Each speckle pattern was trimmed into an image of approximately 500×500 pixels, flattened, and thresholded to generate binary HVs with approximately 250,000 dimensions.Subsequently, the prototype vectors for each class were generated according to Eq. ( 1). Figure 4(a) shows examples of the speckle patterns, the corresponding HVs, and the corresponding prototype vectors, for each contact position (L1, L2, R1, R2, and None), where the HVs and prototype vectors are reshaped to the same shape as the corresponding speckle images for comparison.Different speckle patterns were formed for each contact.To demonstrate this feature, we measured the mean correlation between the speckle patterns, where X lk (i, j) represents the k-th speckle pattern labeled by l ∈ {L1, L2, R1, R2, None}, M = N s (N s − 1), and N s = 100.(i, j) denotes the two-dimensional pixel coordinate in the speckle image.• i j represents the mean with respect to i and j. m x lk and σ x lk denote the mean and standard deviation of speckle pattern X lk (i, j), respectively.The correlation matrix C s ll ′ is shown in Fig. 4(b).The diagonal elements of the matrix C s ll (i.e., correlation values between speckle images belonging to the same class (l = l ′ )) are larger than the non-diagonal elements C s ll ′ (l l ′ ).However, C s ll was at most 0.178.The maximum contrast between correlation values ∆C s = max ll ′ |C s ll − C s ll ′ | was approximately 0.055.It is difficult to find any common features among the speckle images belonging to each class.
We also measured the mean correlation matrix between binary HVs, where V lk (i) represents the i-th component of the k-th sample HV labeled as l.m v lk and σ v lk denote the mean and standard deviation of V lk (i), respectively.The results are shown in Fig. 4(c).One can see a similar trend with the result shown in Fig. 4(b).The correlation values were low even for l = l ′ , and the correlation contrast for the binary HVs was approximately 0.036.However, the prototype vectors might contain the information of all HVs belonging to the same class by the bundling operation [Eq.( 1)] and constitute features representing each class.To gain further insight into the role of prototype vectors, we computed them with 80 HVs for each class and measured the correlation matrix between the prototype vectors and binary HVs for each class, where PV l (i) represents the i-th component of the prototype vector labeled as l.m p l and σ p l denote the mean and standard deviation of PV l (i), respectively.As seen in Fig. 4(d

Classification
Here, we discuss the classification of the contact positions.During the training phase, five prototype vectors were generated with N = 80 × 5 = 400 samples.For the performance evaluation, we used 100 different test samples and generated query HVs.The similarity between the query HVs and the prototype vectors was evaluated [Eq.( 2)], and the contact positions (class labels) were identified.The classification results are shown in Fig. 5(a), exhibiting an accuracy of 100%.Another advantage of the proposed HDC-based sensing approach is its straightforward learning method, which does not require an iterative training process using a large number of parameters, as opposed to traditional machine learning.We measured the training time of the HDC-based approach as the time required to generate the prototype vectors.The time was only 1.24 s for N = 400.For comparison, we also measured the training time, training accuracy, and test accuracy for several other machinelearning models.Softmax regression, a convolutional neural network (CNN) with a single convolutional layer and max pooling, and a CNN with three convolutional layers and max pooling.For these computations, a personal computer (Apple Mac mini 2020, OS: macOS 13.2.1,CPU: Apple M1, memory: 16GB) was used.The training for these machine learning models was unstable because the number of training samples N was limited to 400.The learning rate was set as 0.0001 to ensure stable training.The training time was measured as the time in which the accuracy exceeded 90%.The training accuracy and test accuracy were measured as the maximum values.As shown in Table I, the training time of the proposed HDC-based approach was significantly shorter than that of the Softmax regression and CNN models, and the test accuracy was slightly higher than those of these machine-learning models.The proposed approach reduces the computation burden for the training and enables high classification accuracy with only a limited number of the data samples.

Human-machine interface
In the above demonstration, a solid indenter was used to accurately push the silicone material with the same pressure and direction.However, when we utilize the proposed scheme in a human-machine interface, position identification for indentation under various conditions is required.We investigated whether the sensor could identify contact with a person's finger.Training samples were collected by repeatedly touching the surface of the sensing unit with a person's index or middle finger [Fig.6(a)].The classification results are shown in Fig. 6(b).The accuracy was approximately 87.9% for 20 test samples for each label.The error mainly occurred at positions R1, R2, and R3.R1 was confused with R2, whereas None was confused with R2 or R3.These contact positions are far from the camera, making it difficult to detect the optical signal including the information of the deformation around the contact positions using the camera.A straightforward approach to address this issue is to make the silicone material more diffusive by introducing scatterers inside the material, which generate stronger scattering, such that the optical signal containing contact information can be well detected by the camera.

Spatial resolution
The HDC-based sensing approach does not require the integration of multiple sensors or extensive wiring.Spatially continuous position sensing is possible via optical scattering.To roughly estimate the spatial resolution for identifying the contact positions, we measured the speckle patterns and corresponding HVs formed at certain contact positions.In this experiment, the contact positions were shifted at a 1-mm interval, and the speckle patterns were measured at 51 contact positions, as labeled as {"0", "1", • • • , "50"} [See the inset in Fig. 7(a)].The prototype vectors were computed using 80 samples for each position.Figure 7(a) shows the correlation matrix between the prototype vectors and the binary HVsThe correlation contrast shows that the sensor can identify different contact positions with a 1-mm resolution, which is close to the positioning precision of the indenter used in this experiment.Figure 7(b) shows the identification performance of 51 contact positions at a 1-mm resolution.The total accuracy was approximately 93%.These results suggest the scalability and capability of high-resolution identifications for the proposed speckle-based soft interface.

B. Adaptive update for varying conditions
Speckle-based sensing generally causes a stability issue because the speckle patterns are highly sensitive to external environmental variations, including temperature changes and laser fluctuations.For example, in our soft interface device, the accuracy was reduced to 32% 16 days after training due to an environmental change.To address this stability issue, an adaptive recalibration strategy can be incorporated [11].This enables updates of the prototype vectors and recovers accuracy without requiring a large number of training samples even under environmental changes.
In the update scheme [Fig.8(a)], the HVs are acquired in a newly experimental environment, and the new prototype vectors are computed.The number of the acquired samples used for the newly computed prototype vectors, N new , can be less than the number of samples used for the stored prototype vector, N old .Then, the stored prototype vectors are updated by merging the stored and newly computed prototype vectors with the weight parameter p [Fig.8(a)].Specifically, an updated prototype vector was made by randomly taking the elements from a newly computed prototype vector with the probability p and replacing the elements of the stored prototype vector with them.For the proof-of-concept, we measured HVs 16 days after training and updated the prototype vectors by the aforementioned scheme.The total number of the acquired samples was set as N new = N new s L, where N new s and L = 5 represent the number of the acquired samples for one prototype vector and the number of classes, respectively.Figure 8(b) shows the N new -dependence of the classification accuracy.We measured the accuracy for various values of p.For the stored (old) prototype vectors, the accuracy was 32 % but recovered up to 95 % when p = 0.5 or 0.75 and N new increases to 50, which is 1/8 of N old .The adaptivity (i.e., how much information on the old environment is forgotten and updated to that on the new environment) can be controlled by the parameter p.

C. Robotic finger for tactile sensing
Finally, we demonstrated that the proposed optical approach can be applied to a robotic finger for tactile identification.Figures 9(a) and 9(b) show the developed tactile sensor, which is deployed as a robotic finger.The simple sensor constitutes a soft silicone elastomer, coupled to an optical fiber, and a compact camera [Fig.9(c)].(See Supplement 1, Section 1D, for further details.)The tactile sensor differs from a vision-based tactile sensor [29] in the sense that markers are not used in the proposed approach.Instead, the speckle patterns were measured using the camera because the speckle-based approach allows for high sensitivity [18].In the training phase, this sensor was repeatedly touched with three objects, namely, paper, and two sandpapers with grit sizes of 40 and 120, and the training samples were collected.The grit size of the sandpaper refers to the particle size of the abrading materials embedded in the sandpaper.During training, we used 80 samples for each label (N = 80 × 3 = 240) and generated the prototype vectors.The performance was evaluated using 120 test samples.The results are shown in Fig. 9(d).The identification accuracy for touching objects was 100%.

IV. CONCLUSION
In this study, we presented an optical approach for HV generation in HDC.The proposed approach was applied to a soft interface for contact position identification and to an optical tactile sensor for touching object identification.The proposed approach enable fast and efficient cognitive processing without requiring an iterative training process using a large amount of data.The sensors can be adaptively recalibrated and maintained high classification accuracy by updating the prototype vectors.Such computational efficiency and adaptivity contrast with those of traditional techniques using deep learning.
Practically, it is important to increase the number of contact positions in the identifications for the interface device and touching objects for the tactile sensor.This can be overcome by increasing the number of optical fibers and/or introducing scatterers inside the elastomer for increased diffusivity.In addition, the HDC-based approach can be extended to infer continuous values using a recently developed algorithm [30].
The proposed approach enables the resolution of various issues inherent in speckle-based sensing techniques and can be utilized for low-latency and adaptive in-sensor optical processing.

FIG. 1 .
FIG. 1.(a) Classification using HDC.(b) Optical HV generation scheme using the speckle-based distributed representation of input sensory information.The touch sensory information is mapped into a speckle pattern, which is used to generate HVs.

FIG. 3 .
FIG. 3. (a) Optical touch sensor.(b) Schematic of the touch sensor.Contact positions can be identified using the HDC-based approach.

PFIG. 4 .
FIG. 4. (a) Measured speckle patterns, binary HV images, and prototype vector images for each label.(b) Correlation matrix C s between speckle patterns.(c) Correlation matrix C b between HVs.(d) Correlation matrix C p between prototype vectors and binary HVs.(e) Correlation contrasts for speckle patterns ∆C s , binary HVs ∆C b , and prototype vectors ∆C p .

Figure 5 (FIG. 5 .
FIG. 5. (a) Confusion matrix.The number of training samples, N = 400.(b) Accuracy dependence on the number of training samples N.

FIG. 7 .
FIG. 7. Correlation matrix between the prototype vectors and binary HVs.The inset in (a) shows the contact positions on the sensing unit.(b) Confusion matrix.

FIG. 8 .
FIG. 8. (a) Adaptive recalibration scheme based on the update of the prototype vectors.(b) Classification accuracy vs N new .For N new /N old = 1/8, the accuracy recovered to 95% from 32%.

FIG. 9 .
FIG. 9. (a) Optical tactile sensor mounted as a robotic finger.(b) Enlarged view of (a).(c) Dimensions and structure of the tactile sensor.(d) Confusion matrix.
Table I presents the comparison results in terms of the training time and classification accuracy.We used

TABLE I .
Comparisons of training time and classification accuracy.The number of training samples was set as N = 400.Softmax regression, a CNN with a single convolutional layer and max pooling [CNN (1 layer)], and a CNN with three convolutional layers and max pooling [CNN (3 layer)] were used in the comparison.