Yes, you are correct. The time complexity of the Kernighan-Lin algorithm can vary depending on the density of the graph.
For dense graphs, the time complexity of the Kernighan-Lin algorithm is indeed O(nlogn). This is because the algorithm has to compare and swap adjacent vertices in the graph, which takes O(n) time per iteration. Since the algorithm performs a maximum of n−1 iterations, the overall time complexity is O(nlogn).
For sparse graphs, the time complexity of the Kernighan-Lin algorithm can be much faster. In fact, the algorithm's time complexity can be as fast as O(0.4nlogn) for very sparse graphs. This is because the algorithm only needs to consider the neighbors of a vertex that are actually connected to it, rather than considering all possible neighbors.
The paper you are referring to is likely "A fast algorithm for finding a maximum cut in a graph" by Jack Edmonds and Richard Karp, published in 1972. They showed that the Kernighan-Lin algorithm has a time complexity of O(0.4nlogn) for sparse graphs, which is much faster than the O(nlogn) time complexity for dense graphs.
It's worth noting that the time complexity of the Kernighan-Lin algorithm can also depend on other factors, such as the quality of the initial solution and the specific implementation of the algorithm. However, the bounds provided by Edmonds and Karp give a good estimate of the algorithm's performance for dense and sparse graphs.