Clear Sky Science · en

Contextual classification of network traffic through rough set theory and convolutional neural networks

· Back to index

Why your internet behavior matters to the network

Every time you watch a movie, join a video call, or leave a tab sitting idle, your devices send tiny bursts of data that crisscross the internet. Modern networks are flooded with this traffic, and service providers need to recognize what each packet is doing—streaming video, uploading files, or just idling—to keep connections fast, secure, and reliable. This paper explores a new way to teach computers to understand that “context” automatically, so networks can respond more intelligently to how we actually use them.

Figure 1
Figure 1.

From raw clicks to meaningful patterns

The researchers start with a large, real-world dataset of network events collected from everyday activities such as video streaming, bulk file transfers, web browsing, interactive sessions like video calls, and idle connections. Each event looks like a row in a spreadsheet, with details such as when it happened, which internet protocol was used, how big the data packet was, and which ports and addresses were involved. Before any learning can happen, this raw information is cleaned, checked for missing or extreme values, and converted into consistent numerical form. Time stamps become human-friendly clues like hour of day and day of week, which turn out to be surprisingly useful for guessing what a user is doing.

Picking just the clues that really matter

Instead of feeding every possible detail into an algorithm, the team uses a mathematical approach called rough set theory as a smart filter. Rough set methods look for groups of traffic records that are effectively indistinguishable based on a subset of features, then ask which features are truly essential for telling one activity type from another. This pruning step strips away redundant or noisy information while keeping the logic interpretable—humans can still see which attributes drive the decisions. In this work, three simple features emerge as especially powerful: the length of each packet, the time of day, and the day of the week. Together they capture patterns such as large, sustained transfers late at night or short, sporadic bursts during work hours.

Figure 2
Figure 2.

Training a compact, self-tuning AI

Once the best features are chosen, they are reshaped into a form that suits a one-dimensional convolutional neural network, a type of AI model better known for recognizing patterns in images and sound. Here, it scans sequences of packet characteristics to spot telltale shapes associated with different activities. The network includes familiar building blocks—convolution layers, pooling to compress information, and dropout to avoid overfitting—and ends with a softmax layer that outputs the probability of each context (for example, video streaming versus interactive traffic). To squeeze out even better performance, the authors add a layer of optimization inspired by the hunting behavior of grey wolves: a meta-heuristic search that automatically tunes four key settings of the neural network, such as learning rate and batch size, until the model balances accuracy and speed.

Building a full pipeline for real-time decisions

The final system is not just a single model but a carefully staged pipeline. Raw packet logs are first preprocessed and balanced so that rare activities, like some types of bulk transfers, are not ignored. Rough set theory trims the feature list; an additional multi-objective search refines which combination of features works best; and a game-theory-inspired scoring method (Shapley values) removes any remaining low-impact features before training. The streamlined set of inputs then flows into the compact neural network whose hyperparameters are tuned by the grey wolf optimizer. Tested on benchmark data, this end-to-end design classifies traffic across multiple activity types with a macro-F1 score of about 0.96 while labeling each packet in roughly 0.22 milliseconds, fast enough for practical, real-time network management.

What this means for your online experience

To a non-specialist, the result is a smarter way for networks to “understand” what you are doing online without peeking into the actual content of your messages or videos. By focusing on a few key clues and a lean, optimized AI model, the proposed system can quickly tell idle connections from active video calls or heavy downloads, even under changing conditions. This allows network operators to allocate bandwidth more fairly, spot unusual behavior sooner, and design more responsive services—helping keep video conferences smooth, streaming crisp, and background apps from silently clogging the pipes.

Citation: Priyanka, D., Sundara Krishna, Y.K. Contextual classification of network traffic through rough set theory and convolutional neural networks. Sci Rep 16, 6259 (2026). https://doi.org/10.1038/s41598-026-35693-1

Keywords: network traffic classification, user activity context, convolutional neural networks, feature selection, real-time network management